-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.eslintrc.js
90 lines (89 loc) · 1.88 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
90
module.exports = {
env: {
browser: true,
commonjs: true,
es6: true,
node: true,
mocha: true
},
extends: 'eslint:recommended',
parserOptions: {
ecmaVersion: 8,
ecmaFeatures: {
impliedScrict: true
}
},
rules: {
// Potential errors.
'semi': 'error',
'curly': 'error',
'no-else-return': 'error',
'no-eq-null': 'error',
'no-eval': 'error',
'no-implied-eval': 'error',
'no-labels': 'error',
'no-console': 'error',
'no-var': 'error',
'no-warning-comments': 'warn',
'max-depth': [
'error',
5
],
'no-mixed-operators': [
'error',
{'groups': [['&&', '||']]}
],
'no-unneeded-ternary': 'error',
'no-prototype-builtins': 'off', // Allow using hasOwnProperty.
'max-len': [
'warn',
100
],
// Styling.
'yoda': 'error',
'no-multi-spaces': 'error',
'camelcase': 'warn',
'quotes': [
'error',
'single'
],
'brace-style': [
'error',
'1tbs',
{'allowSingleLine': true}
],
'func-names': [
'error',
'never'
],
'indent': [
'error',
2,
{'SwitchCase': 1}
],
'operator-assignment': 'error',
'no-tabs': 'error',
'comma-spacing': 'error',
'block-spacing': 'error',
'space-before-blocks': 'error',
'func-call-spacing': 'error',
'key-spacing': 'error',
'keyword-spacing': 'error',
'no-whitespace-before-property': 'error',
'space-infix-ops': 'error',
'semi-spacing': 'error',
'space-unary-ops': 'error',
'space-before-function-paren': ['error', {
'anonymous': 'never',
'named': 'never',
'asyncArrow': 'always',
}],
'computed-property-spacing': 'error',
'space-in-parens': 'error',
/*'array-bracket-spacing': [
'error',
'never'
],
'object-curly-spacing': 'error',*/
}
};