-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
89 lines (88 loc) · 2.75 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
module.exports = {
root: true,
env: {
node: true,
browser: true,
es6: true
},
extends: ['plugin:vue/recommended', 'eslint:recommended'],
plugins: ['vue'],
parser: 'vue-eslint-parser',
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module',
ecmaVersion: 2020
},
rules: {
'prefer-template': 'warn',
'template-curly-spacing': ['warn', 'always'],
'no-multi-spaces': ['warn', { ignoreEOLComments: true }],
curly: 'warn',
'dot-location': ['warn', 'property'],
'no-empty-function': 'warn',
'no-extend-native': 'warn',
'no-extra-bind': 'warn',
'no-script-url': 'warn',
'no-self-compare': 'warn',
'no-unused-expressions': 'warn',
'no-useless-return': 'warn',
yoda: 'warn',
strict: 'warn',
'no-shadow': 'warn',
'block-spacing': 'warn',
'brace-style': ['warn', 'stroustrup'],
camelcase: 'warn',
'comma-dangle': ['warn', 'never'],
'comma-spacing': ['warn', { before: false, after: true }],
'comma-style': ['warn', 'last'],
'func-call-spacing': 'warn',
'func-style': ['warn', 'declaration'],
'id-length': ['warn', { min: 1, max: 30 }],
'lines-between-class-members': ['warn', 'always'],
'new-cap': 'warn',
'new-parens': 'warn',
'no-mixed-operators': ['warn', { groups: [['&&', '||']] }],
'no-nested-ternary': 'warn',
'no-unneeded-ternary': 'warn',
'no-trailing-spaces': 'warn',
'object-curly-spacing': ['warn', 'always'],
semi: ['warn', 'always'],
'semi-spacing': 'warn',
'semi-style': ['warn', 'last'],
'space-before-blocks': 'warn',
'space-in-parens': ['warn', 'never'],
'space-infix-ops': 'warn',
'space-unary-ops': 'warn',
'spaced-comment': ['warn', 'always'],
'switch-colon-spacing': ['warn', { before: false, after: false }],
'arrow-body-style': ['error', 'as-needed'],
'arrow-parens': ['warn', 'as-needed'],
'arrow-spacing': 'warn',
'no-confusing-arrow': 'warn',
'no-useless-computed-key': 'warn',
'no-useless-rename': 'warn',
'no-useless-concat': 'warn',
'prefer-const': 'warn',
quotes: ['warn', 'single', { avoidEscape: true }],
'no-unused-vars': 'warn',
'padding-line-between-statements': [
'warn',
{ blankLine: 'always', prev: 'multiline-block-like', next: '*' },
{ blankLine: 'always', prev: '*', next: 'return' },
{ blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' },
{
blankLine: 'any',
prev: ['const', 'let', 'var'],
next: ['const', 'let', 'var']
}
],
indent: ['warn', 'tab', { SwitchCase: 1 }],
// 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
// Vue
'vue/html-indent': ['warn', 'tab'],
'vue/no-unused-components':
process.env.NODE_ENV === 'production' ? 'error' : 'warn',
'vue/custom-event-name-casing': 'off'
}
};