-
Notifications
You must be signed in to change notification settings - Fork 35
/
.eslintrc.js
61 lines (56 loc) · 1.49 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
module.exports = {
root: true,
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@babel/eslint-parser',
sourceType: 'module'
},
env: {
browser: true,
node: true
},
extends: [
'eslint:recommended',
'standard',
'plugin:vue/recommended'
],
globals: {
__static: true
},
plugins: [
'vue'
],
rules: {
// disallow unused expressions
'no-unused-expressions': 'error',
// allow paren-less arrow functions
'arrow-parens': 'off',
// allow debugger only during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
// allow custom callbacks
'node/no-callback-literal': 'off',
// enforce (some of the) js rules in vue templates
'vue/array-bracket-spacing': ['error', 'never'],
'vue/arrow-spacing': ['error', { before: true, after: true }],
'vue/comma-dangle': ['error', {
arrays: 'never',
objects: 'never',
imports: 'never',
exports: 'never',
functions: 'never'
}],
'vue/dot-notation': ['error', { allowKeywords: true }],
'vue/eqeqeq': 'error',
'vue/no-irregular-whitespace': 'error',
'vue/no-empty-pattern': 'error',
'vue/object-curly-spacing': ['error', 'always'],
// enforce vue component names
'vue/match-component-file-name': ['error', {
extensions: ['vue'],
shouldMatchCase: true
}],
'vue/component-name-in-template-casing': ['error', 'PascalCase', {
registeredComponentsOnly: false
}]
}
}