-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.js
49 lines (49 loc) · 1.27 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
module.exports = {
env: {
node: true,
es6: true
},
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
ecmaFeatures: {
jsx: true
}
},
globals: {
_: true
},
extends: 'eslint:recommended',
rules: {
'indent': ['error', 'tab', { SwitchCase: 1 }],
'quotes': ['warn', 'single', { avoidEscape: true }],
'linebreak-style': ['error', 'unix'],
'no-mixed-spaces-and-tabs': ['warn', 'smart-tabs'],
'semi': ['error', 'always'],
'comma-dangle': ['error', 'only-multiline'],
'no-console': 'off',
'no-trailing-spaces': ['warn'],
'yoda': ['warn'],
'no-whitespace-before-property': ['warn'],
'no-unused-vars': ['error', { 'args': 'none' }],
'operator-linebreak': ['warn', 'before'],
'space-infix-ops': ['error'],
'space-unary-ops': ['error', { 'words': true, 'nonwords': false }],
'spaced-comment': ['error', 'always', {
line: {
'markers': ['/'],
'exceptions': ['-', '+']
},
'block': {
'markers': ['!'],
'exceptions': ['*'],
'balanced': true
}
}],
'comma-spacing': ['error', { 'after': true }],
'brace-style': ['error', 'stroustrup', { allowSingleLine: true }],
'space-in-parens': ['error', 'never'],
'space-before-function-paren': ['error', 'never'],
'keyword-spacing' : ['error', { before: true, after: true }],
}
}