-
Notifications
You must be signed in to change notification settings - Fork 9
/
.eslintrc.cjs
60 lines (58 loc) · 1.85 KB
/
.eslintrc.cjs
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
module.exports = {
'parser': '@babel/eslint-parser',
'env': {
'browser': true,
'es6': true,
'node': true
},
'extends': 'eslint:recommended',
'parserOptions': {
'sourceType': 'module',
'ecmaFeatures': {
'importAssertions': true
}
},
'rules': {
'strict': 'off',
'indent': [ 'warn', 2 ],
'quotes': [ 'warn', 'single', { 'allowTemplateLiterals': true } ],
'semi': [ 'warn', 'always' ],
'eqeqeq': [ 'warn', 'always' ],
'no-else-return': 'warn',
'block-spacing': [ 'warn', 'always' ],
'brace-style': [ 'warn', '1tbs' ],
'object-curly-spacing': [ 'warn', 'always' ],
'array-bracket-spacing': [ 'warn', 'always', { 'objectsInArrays': false, 'arraysInArrays': false } ],
'comma-spacing': [ 'warn', { 'after': true, 'before': false } ],
'comma-style': [ 'warn', 'last' ],
'computed-property-spacing': [ 'warn', 'never' ],
'func-call-spacing': [ 'warn', 'never' ],
'key-spacing': [ 'warn', {
'beforeColon': false,
'afterColon': true,
'mode': 'strict'
} ],
'keyword-spacing': [ 'warn', { 'after': true, 'before': true } ],
'no-trailing-spaces': 'warn',
'padded-blocks': [ 'warn', 'never' ],
'semi-spacing': 'warn',
'space-unary-ops': [ 'warn', { 'words': true, 'nonwords': false } ],
'prefer-destructuring': 'warn',
'linebreak-style': [ 'error', 'unix' ],
'default-case': 'error',
'no-eval': 'error',
'no-throw-literal': 'error',
'no-with': 'error',
'radix': 'error',
'no-whitespace-before-property': 'error',
'no-unneeded-ternary': 'error',
'no-unused-vars': [ 'error', {
'varsIgnorePattern': '^_',
'argsIgnorePattern': '^_',
} ],
'no-duplicate-imports': 'error',
'no-useless-computed-key': 'error',
'no-var': 'error',
'no-constant-condition': [ 'error', { 'checkLoops': false } ]
}
};