-
Notifications
You must be signed in to change notification settings - Fork 15
/
.eslintrc.js
66 lines (58 loc) · 1.8 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
module.exports = {
'env': {
'node': true
},
'rules': {
/* Errors */
'semi': 'error',
'eqeqeq': 'error',
'quotes': ['error', 'single'],
'camelcase': ['error', { 'properties': 'never' }],
// 'comma-dangle': 'error',
// 'max-len': ['error', 80, { 'ignoreUrls': true }],
'one-var': ['error', { 'initialized': 'never', 'uninitialized': 'always' }],
'eol-last': 'error',
'spaced-comment': ['error', 'always'],
'keyword-spacing': 'error',
'space-before-blocks': ['error', 'always'],
'object-curly-spacing': ['error', 'always'],
'array-bracket-spacing': ['error', 'never'],
'space-before-function-paren': ['error', {
'anonymous': 'never',
'named': 'never'
}],
'no-eval': 'error',
'no-with': 'error',
'no-empty': 'error',
'no-undef': 'error',
'no-debugger': 'error',
'no-dupe-keys': 'error',
'no-dupe-args': 'error',
'no-redeclare': 'error',
'no-unused-vars': 'error',
'no-unreachable': 'error',
'no-func-assign': 'error',
'no-const-assign': 'error',
'no-class-assign': 'error',
'no-multi-spaces': 'error',
'no-sparse-arrays': 'error',
'no-duplicate-case': 'error',
'no-trailing-spaces': 'error',
'no-this-before-super': 'error',
'no-irregular-whitespace': 'error',
'no-unexpected-multiline': 'error',
'no-multiple-empty-lines': ['error', { 'max': 1 }],
'no-empty-character-class': 'error',
/* Warnings */
'curly': ['warn', 'multi', 'consistent'],
'indent': ['warn', 2, { 'SwitchCase': 1 }],
'use-isnan': 'warn',
'quote-props': ['warn', 'consistent'],
'block-scoped-var': 'warn',
'no-console': 'warn',
'no-extra-semi': 'warn',
'no-self-assign': 'warn',
'no-extra-boolean-cast': 'warn',
'no-useless-computed-key': 'warn'
}
};