-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.js
58 lines (58 loc) · 1.58 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
module.exports = {
env: {
browser: true,
commonjs: true,
node: true,
es6: true
},
globals: {
atom: false
},
extends: 'eslint:recommended',
parserOptions: {
sourceType: 'module'
},
rules: {
indent: ['error', 'tab', {
SwitchCase: 1
}],
'linebreak-style': ['error', 'unix'],
quotes: ['error', 'single'],
semi: ['error', 'always'],
'no-empty': 'off',
'no-unused-vars': ['error', { args: 'none' }],
'object-curly-spacing': ['error', 'always'],
'key-spacing': ['error', {
singleLine: { mode: 'strict' },
multiLine: { mode: 'minimum' }
}],
'object-curly-newline': 'error',
'object-property-newline': 'error',
'array-bracket-spacing': ['error', 'never'],
'computed-property-spacing': ['error', 'never'],
'keyword-spacing': 'error',
'space-infix-ops': 'error',
'space-unary-ops': ['error', { words: true, nonwords: false }],
'space-before-function-paren': ['error', {
anonymous: 'always',
named: 'never',
asyncArrow: 'always'
}],
'newline-per-chained-call': 'error',
'one-var': ['error', 'never'],
'quote-props': ['error', 'as-needed', { keywords: true, numbers: true }],
curly: 'error',
'no-trailing-spaces': ['error', {skipBlankLines: true}],
'no-whitespace-before-property': 'error',
'comma-dangle': ['error', {
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'never',
exports: 'never',
functions: 'never',
}],
'arrow-body-style': ['error', 'as-needed', { requireReturnForObjectLiteral: true }],
'arrow-parens': ['error', 'as-needed'],
'arrow-spacing': 'error',
}
}