forked from nextcloud/notes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
76 lines (72 loc) · 2.13 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint',
ecmaVersion: 6,
},
settings: {
'import/resolver': {
webpack: {
config: 'webpack.common.js',
},
node: {
paths: ['src'],
extensions: ['.js', '.vue'],
},
},
},
extends: [
'eslint:recommended',
'plugin:import/recommended',
'plugin:vue/recommended',
'plugin:nextcloud/recommended',
'standard',
],
globals: {
$: 'readonly',
},
plugins: [
'vue',
],
rules: {
// allow space before function () (was "always" in "standard")
'space-before-function-paren': ['error', 'never'],
// stay consistent with array brackets (not in "standard")
'array-bracket-newline': ['error', 'consistent'],
// tabs only (was spaces in "standard")
'indent': ['error', 'tab'],
// allow tabs for indentation (was forbidden in "standard")
'no-tabs': ['error', { allowIndentationTabs: true }],
// indentation in vue's html should be tabs (was spaces in "vue/strongly-recommended")
'vue/html-indent': ['error', 'tab'],
// only debug console (not in "standard")
'no-console': ['error', { allow: ['error', 'warn', 'info', 'debug'] }],
// always add a trailing comma, for diff readability (was "never" in "standard")
'comma-dangle': ['warn', 'always-multiline'],
// always have the operator in front (was "after" in "standard")
'operator-linebreak': ['error', 'before'],
// ternary on multiline (not in "standard")
'multiline-ternary': ['error', 'always-multiline'],
// disallow use of "var" (not in "standard")
'no-var': 'error',
// Suggest using const
'prefer-const': 'warn',
// check case of component names (not in "vue/recommended")
'vue/component-name-in-template-casing': 'error',
// no ending html tag on a new line (was warn in "vue/strongly-recommended")
'vue/html-closing-bracket-newline': 'error',
// space before self-closing elements (was warn in "vue/strongly-recommended")
'vue/html-closing-bracket-spacing': 'error',
// code spacing with attributes (default is 1)
'vue/max-attributes-per-line': [
'error',
{
singleline: 3,
multiline: {
max: 3,
allowFirstLine: true,
}
}
],
},
}