-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
50 lines (50 loc) · 1.39 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
module.exports = {
parserOptions: {
ecmaVersion: 2018,
},
env: {
browser: true,
es6: true,
},
rules: {
'no-console': 'off',
'no-extra-parens': ['error', 'all'],
'array-callback-return': 'error',
curly: 'error',
'default-case': 'warn',
eqeqeq: ['error', 'always'],
'guard-for-in': 'warn',
'no-caller': 'error',
'no-empty-function': 'error',
'no-eval': 'error',
'no-extra-bind': 'error',
'no-floating-decimal': 'error',
'no-lone-blocks': 'error',
'no-multi-spaces': 'error',
'no-new': 'warn',
'no-return-assign': 'error',
'no-self-compare': 'error',
'no-useless-call': 'error',
'no-undef-init': 'error',
'block-spacing': 'error',
'brace-style': 'error',
'func-call-spacing': ['error', 'never'],
'max-len': ['error', {code: 120, ignoreComments: true}],
'new-cap': ['error', {newIsCap: true}],
'new-parens': 'error',
'no-nested-ternary': 'error',
'no-unneeded-ternary': 'error',
quotes: [
'warn',
'single',
{avoidEscape: true, allowTemplateLiterals: true},
],
'arrow-spacing': ['error', {before: true, after: true}],
'no-useless-computed-key': 'error',
'no-useless-constructor': 'error',
'no-prototype-builtins': 'off',
'no-var': 'warn',
'no-unused-vars': ['error', {vars: 'local'}],
'no-magic-numbers': ['warn', {ignore: [0, 1]}],
},
};