-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
45 lines (45 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
module.exports = {
env: {
node: true,
mocha: true,
},
extends: ['airbnb-base'],
plugins: ['chai-friendly'],
overrides: [{
files: '*.test.js',
rules: {
'no-unused-expressions': 'off',
'chai-friendly/no-unused-expressions': 'error',
},
}],
rules: {
'object-curly-spacing': ['error', 'never'],
'object-curly-newline': ['error', {
ObjectExpression: {minProperties: 5, multiline: true, consistent: true},
ObjectPattern: {minProperties: 5, multiline: true, consistent: true},
ImportDeclaration: {minProperties: 5, multiline: true, consistent: true},
ExportDeclaration: {minProperties: 5, multiline: true, consistent: true},
}],
'arrow-parens': ['error', 'as-needed'],
'max-len': ['error', 100, 2, {
ignoreUrls: true,
ignoreComments: true,
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreTemplateLiterals: true
}],
'prefer-const': ['error', {destructuring: 'all'}],
'operator-linebreak': ['error', 'before', {overrides: {'+': 'after'}}],
'consistent-return': 'off',
'nonblock-statement-body-position': 'off',
'no-shadow': 'off',
'no-plusplus': 'off',
'no-bitwise': 'off',
curly: 'off',
'import/no-unresolved': 'off',
'no-param-reassign': 'off',
'no-multi-assign': 'off',
'no-confusing-arrow': 'off',
'lines-between-class-members': 'off',
},
};