-
Notifications
You must be signed in to change notification settings - Fork 101
/
.eslintrc.js
71 lines (69 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module'
},
env: {
browser: true,
node: true
},
globals: {
Promise: true,
$: true,
jQuery: true,
echarts: true,
clay: true,
Float32Array: true,
Uint32Array: true,
Float64Array: true,
Uint8Array: true,
Uint16Array: true
},
rules: {
'eqeqeq': [2, 'allow-null'],
'quotes': [2, 'single', {
allowTemplateLiterals: true
}],
'no-dupe-keys': 2,
'no-func-assign': 2,
'no-invalid-regexp': 2,
'no-unreachable': 2,
'valid-typeof': 2,
'no-loop-func': 1,
'no-lone-blocks': 1,
'no-undef': 2,
'no-unused-vars': 1,
// 'no-use-before-define': [2, {
// functions: false,
// }],
'no-unneeded-ternary': 2,
'no-self-compare': 2,
'brace-style': [2, 'stroustrup', {
allowSingleLine: true
}],
'comma-style': [2, 'last'],
'comma-spacing': [2, {
'before': false,
'after': true
}],
'no-spaced-func': 2,
'no-trailing-spaces': 2,
'one-var': [1, 'never'],
'no-duplicate-imports': 2,
'block-scoped-var': 2,
"indent": [1, 2, {
SwitchCase: 1
}],
"key-spacing": [2, {
afterColon: true,
beforeColon: false,
mode: "strict"
}],
"comma-spacing": [2, {
before: false,
after: true
}],
"semi": [2, 'always']
}
}