diff options
author | dartcafe <github@dartcafe.de> | 2021-04-20 00:04:55 +0300 |
---|---|---|
committer | dartcafe <github@dartcafe.de> | 2021-04-20 00:04:55 +0300 |
commit | bba2035c96b4c54e4770ff0415429513bfd1ee15 (patch) | |
tree | e123451b50ccae7fc827dd9d8a9781ea7a50a9aa /.eslintrc.js | |
parent | 763da62caad7bdbba3ae47bdda9a6c33cd4f1769 (diff) |
use @nextcloud/eslint-config, lint:fix and tidy
Signed-off-by: dartcafe <github@dartcafe.de>
Diffstat (limited to '.eslintrc.js')
-rw-r--r-- | .eslintrc.js | 96 |
1 files changed, 7 insertions, 89 deletions
diff --git a/.eslintrc.js b/.eslintrc.js index 62f030c1..ef544223 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,105 +1,23 @@ module.exports = { - root: true, - env: { - browser: true, - es6: true, - node: true, - jest: true, - }, - globals: { - t: true, - n: true, - OC: true, - OCA: true, - Vue: true, - VueRouter: true, - moment: true, - }, - parserOptions: { - parser: '@babel/eslint-parser', - ecmaVersion: 6, - }, extends: [ - 'plugin:@nextcloud/recommended', - 'eslint:recommended', - 'plugin:node/recommended', - 'plugin:vue/essential', - 'plugin:vue/recommended', 'plugin:promise/recommended', - 'standard', + 'plugin:vue/essential', + '@nextcloud', ], plugins: [ - 'vue', - 'node', 'promise', ], rules: { - 'object-shorthand': 'error', 'arrow-parens': 'error', 'arrow-body-style': 'error', - 'no-plusplus': ['error', { allowForLoopAfterthoughts: true }], - 'no-negated-condition': 'error', - 'no-lonely-if': 'error', + 'brace-style': 'error', 'newline-per-chained-call': ['error', { ignoreChainWithDepth: 4 }], - 'no-continue': 'error', 'no-array-constructor': 'error', - '@nextcloud/no-deprecations': 'warn', - '@nextcloud/no-removed-apis': 'error', - 'node/no-missing-import': ['error', { - allowModules: [], - tryExtensions: ['.js', '.vue'], - }], - 'vue/no-unused-properties': ['error', { - groups: ['props'], - deepData: false, - }], + 'no-continue': 'error', 'no-else-return': 'error', - 'comma-dangle': ['error', 'always-multiline'], - // space before function () - 'space-before-function-paren': ['error', 'never'], - // curly braces always space + 'no-lonely-if': 'error', + 'no-negated-condition': 'error', + 'no-plusplus': ['error', { allowForLoopAfterthoughts: true }], 'object-curly-spacing': ['error', 'always'], - // stay consistent with array brackets - 'array-bracket-newline': ['error', 'consistent'], - // 1tbs brace style - 'brace-style': 'error', - // tabs only - indent: ['error', 'tab'], - 'no-tabs': 0, - 'vue/html-indent': ['error', 'tab'], - // only debug console - 'no-console': ['error', { allow: ['error', 'warn', 'debug'] }], - // classes blocks - 'padded-blocks': ['error', { classes: 'always' }], - // always have the operator in front - 'operator-linebreak': ['error', 'before'], - // ternary on multiline - 'multiline-ternary': ['error', 'always-multiline'], - // es6 import/export and require - 'node/no-unpublished-require': ['off'], - 'node/no-unsupported-features/es-syntax': ['off'], - // kebab case components for vuejs - 'vue/component-name-in-template-casing': ['error', 'PascalCase', { - registeredComponentsOnly: true, - ignores: [], - }], - // space before self-closing elements - 'vue/html-closing-bracket-spacing': 'error', - // code spacing with attributes - // newline before closing bracket - 'vue/html-closing-bracket-newline': ['error', { - singleline: 'never', - multiline: 'never', - }], - 'vue/max-attributes-per-line': [ - 'error', - { - singleline: 3, - multiline: { - max: 3, - allowFirstLine: true, - }, - }, - ], }, } |