diff options
author | Joas Schilling <coding@schilljs.com> | 2020-03-04 12:44:03 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-03-04 12:44:03 +0300 |
commit | 43cb6417a54abfd2e373e33433771a9c393f7f56 (patch) | |
tree | 7d9826646724635f2a88e882a1cb07eca7e9974a /.eslintrc.js | |
parent | 0e8dd70d5f2ab1c5fa9984688d8b370f4372cf12 (diff) |
Add nextcloud eslint
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to '.eslintrc.js')
-rw-r--r-- | .eslintrc.js | 97 |
1 files changed, 2 insertions, 95 deletions
diff --git a/.eslintrc.js b/.eslintrc.js index de2b77c..701f97a 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,98 +1,5 @@ module.exports = { - root: true, - env: { - browser: true, - es6: true, - node: true - }, - globals: { - oc_config: true, - oca_contacts: true, - moment: true, - escapeHTML: true, - n: true, - t: true, - OC: true, - OCA: true, - OCP: true, - Vue: true, - $: true // FIXME should remove jQuery dependency - }, - parserOptions: { - parser: 'babel-eslint', - ecmaVersion: 6 - }, extends: [ - 'eslint:recommended', - 'plugin:import/errors', - 'plugin:import/warnings', - 'plugin:node/recommended', - 'plugin:vue/essential', - 'plugin:vue/recommended', - 'standard' - ], - settings: { - 'import/resolver': { - webpack: { - config: 'src/webpack.common.js' - }, - node: { - paths: ['src'], - extensions: ['.js', '.vue'] - } - } - }, - plugins: ['vue', 'node'], - rules: { - 'no-control-regex': 0, - // space before function () - 'space-before-function-paren': ['error', 'never'], - // curly braces always space - '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', 'info', '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'], - // force proper JSDocs - 'valid-jsdoc': [2, { - prefer: { - return: 'returns' - }, - requireReturn: false, - requireReturnDescription: false - }], - // 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', 'kebab-case'], - // space before self-closing elements - 'vue/html-closing-bracket-spacing': 'error', - // no ending html tag on a new line - 'vue/html-closing-bracket-newline': ['error', { multiline: 'never' }], - // code spacing with attributes - 'vue/max-attributes-per-line': ['error', { - singleline: 3, - multiline: { - max: 3, - allowFirstLine: true - } - }], - 'node/no-missing-import': ['error', { - tryExtensions: ['.js', '.vue'] - }], - 'vue/no-v-html': ['off'] - } + 'nextcloud' + ] } |