This repository has been archived by the owner on Aug 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.eslintrc.js
94 lines (88 loc) · 2.16 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
module.exports = {
root: true,
env: {
node: true
},
'extends': [
'plugin:vue/essential',
'eslint:recommended'
],
parserOptions: {
parser: 'babel-eslint'
},
overrides: [
{
files: [
'**/__tests__/*.{j,t}s?(x)'
],
env: {
mocha: true
}
}
],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'quotes': ['error', 'single'],
'semi': ['error', 'never'],
'comma-dangle': ['error', 'only-multiline'],
'space-before-function-paren': [2, { anonymous: 'always', named: 'never' }],
'indent': 'off',
'no-multiple-empty-lines': ['error', { 'max': 2, 'maxEOF': 1 }],
'no-unused-vars': ['warn'],
'prefer-const': ['warn'],
'require-await': ['warn'],
'no-unreachable': ['warn'],
// vue specific rules
'vue/script-indent': ['warn', 2, {
'baseIndent': 0
}],
'vue/max-attributes-per-line': ['warn', {
'singleline': 2,
'multiline': {
'max': 1,
'allowFirstLine': false
},
}],
'vue/html-self-closing': ['warn', {
'html': {
'void': 'always',
'normal': 'never',
'component': 'always'
},
'svg': 'always',
'math': 'never'
}],
'no-multi-spaces': ['error', {
'exceptions': { 'VariableDeclarator': true }
}],
'vue/order-in-components': ['error', {
'order': [
'el',
'name',
'parent',
'functional',
['delimiters', 'comments'],
['components', 'directives', 'filters'],
'extends',
'mixins',
'inheritAttrs',
'model',
['props', 'propsData'],
'asyncData',
'data',
'computed',
'watch',
'LIFECYCLE_HOOKS',
'methods',
['template', 'render'],
'renderError'
]
}],
'vue/no-unused-vars': ['warn'],
'vue/no-unused-components': ['warn'],
'vue/multiline-html-element-content-newline': 'off',
'vue/singleline-html-element-content-newline': 'off',
'vue/html-closing-bracket-newline': 'off',
}
}