|
1 | 1 | module.exports = { |
2 | | - root: true, |
3 | | - env: { |
4 | | - browser: true, |
5 | | - es6: true, |
6 | | - node: true |
7 | | - }, |
8 | | - globals: { |
9 | | - oc_config: true, |
10 | | - oca_contacts: true, |
11 | | - moment: true, |
12 | | - escapeHTML: true, |
13 | | - n: true, |
14 | | - t: true, |
15 | | - OC: true, |
16 | | - OCA: true, |
17 | | - OCP: true, |
18 | | - Vue: true, |
19 | | - $: true // FIXME should remove jQuery dependency |
20 | | - }, |
21 | | - parserOptions: { |
22 | | - parser: 'babel-eslint', |
23 | | - ecmaVersion: 6 |
24 | | - }, |
25 | 2 | extends: [ |
26 | | - 'eslint:recommended', |
27 | | - 'plugin:import/errors', |
28 | | - 'plugin:import/warnings', |
29 | | - 'plugin:node/recommended', |
30 | | - 'plugin:vue/essential', |
31 | | - 'plugin:vue/recommended', |
32 | | - 'standard' |
| 3 | + 'nextcloud' |
33 | 4 | ], |
34 | | - settings: { |
35 | | - 'import/resolver': { |
36 | | - webpack: { |
37 | | - config: 'src/webpack.common.js' |
38 | | - }, |
39 | | - node: { |
40 | | - paths: ['src'], |
41 | | - extensions: ['.js', '.vue'] |
42 | | - } |
43 | | - } |
| 5 | + globals: { |
| 6 | + 'moment': true, |
| 7 | + '$': true |
44 | 8 | }, |
45 | | - plugins: ['vue', 'node'], |
46 | 9 | rules: { |
47 | | - 'no-control-regex': 0, |
48 | | - // space before function () |
49 | | - 'space-before-function-paren': ['error', 'never'], |
50 | | - // curly braces always space |
51 | | - 'object-curly-spacing': ['error', 'always'], |
52 | | - // stay consistent with array brackets |
53 | | - 'array-bracket-newline': ['error', 'consistent'], |
54 | | - // 1tbs brace style |
55 | | - 'brace-style': 'error', |
56 | | - // tabs only |
57 | | - indent: ['error', 'tab'], |
58 | | - 'no-tabs': 0, |
59 | | - 'vue/html-indent': ['error', 'tab'], |
60 | | - // only debug console |
61 | | - 'no-console': ['error', { allow: ['error', 'warn', 'info', 'debug'] }], |
62 | | - // classes blocks |
63 | | - 'padded-blocks': ['error', { classes: 'always' }], |
64 | | - // always have the operator in front |
65 | | - 'operator-linebreak': ['error', 'before'], |
66 | | - // ternary on multiline |
67 | | - 'multiline-ternary': ['error', 'always-multiline'], |
68 | | - // force proper JSDocs |
69 | | - 'valid-jsdoc': [2, { |
70 | | - prefer: { |
71 | | - return: 'returns' |
72 | | - }, |
73 | | - requireReturn: false, |
74 | | - requireReturnDescription: false |
75 | | - }], |
76 | | - // es6 import/export and require |
77 | | - 'node/no-unpublished-require': ['off'], |
78 | | - 'node/no-unsupported-features/es-syntax': ['off'], |
79 | | - // kebab case components for vuejs |
80 | | - 'vue/component-name-in-template-casing': ['error', 'kebab-case'], |
81 | | - // space before self-closing elements |
82 | | - 'vue/html-closing-bracket-spacing': 'error', |
83 | | - // no ending html tag on a new line |
84 | | - 'vue/html-closing-bracket-newline': ['error', { multiline: 'never' }], |
85 | | - // code spacing with attributes |
86 | | - 'vue/max-attributes-per-line': ['error', { |
87 | | - singleline: 3, |
88 | | - multiline: { |
89 | | - max: 3, |
90 | | - allowFirstLine: true |
91 | | - } |
92 | | - }], |
93 | | - 'node/no-missing-import': ['error', { |
94 | | - tryExtensions: ['.js', '.vue'] |
95 | | - }], |
96 | | - 'vue/no-v-html': ['off'] |
| 10 | + 'no-control-regex': 1 |
97 | 11 | } |
98 | 12 | } |
0 commit comments