This repository has been archived by the owner on Dec 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
71 lines (71 loc) · 1.71 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
module.exports = {
env: {
browser: true,
es6: true,
node: true
},
extends: [
'standard'
],
parser: '@babel/eslint-parser',
parserOptions: {
ecmaFeatures: {
jsx: true
},
ecmaVersion: 6,
sourceType: 'module'
},
plugins: [
'json',
'import'
],
rules: {
'brace-style': ['ERROR', '1tbs'],
complexity: ['ERROR', {
max: 4
}],
curly: ['ERROR', 'all'],
'global-require': 'WARN',
'handle-callback-err': 'ERROR',
'import/no-unresolved': 'OFF', // This doesn't play very nicely with Webpack at the moment.
'import/order': ['WARN', {
'newlines-between': 'never'
}],
indent: ['ERROR', 2, { // eslint-disable-line no-magic-numbers
SwitchCase: 1,
ignoredNodes: ['ConditionalExpression']
}],
'jsx-quotes': ['ERROR', 'prefer-single'],
'max-depth': ['ERROR', {
max: 3
}],
'max-lines-per-function': ['ERROR', {
max: 35,
skipBlankLines: true
}],
'max-nested-callbacks': ['ERROR', {
max: 3
}],
'max-params': ['ERROR', {
max: 5
}],
'no-async-promise-executor': 'ERROR',
'no-console': [process.env.BUILD_STAGE === 'production' ? 'ERROR' : 'WARN', { allow: ['warn', 'error'] }],
'no-magic-numbers': ['ERROR', {
ignoreArrayIndexes: true
}],
'no-new-require': 'ERROR',
'no-path-concat': 'ERROR',
'no-restricted-modules': ['ERROR', 'banned-module'],
'no-sync': ['ERROR', { allowAtRootLevel: true }],
'no-unneeded-ternary': 'ERROR',
'prefer-object-spread': 'ERROR',
'require-await': 'ERROR',
'sort-keys': 'ERROR',
'sort-vars': 'ERROR',
'vars-on-top': 'ERROR'
},
settings: {
'import/resolver': 'webpack'
}
}