-
Notifications
You must be signed in to change notification settings - Fork 19
/
.eslintrc.js
78 lines (78 loc) · 2.62 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
module.exports = {
parser: 'babel-eslint',
plugins: [
'import',
],
env: {
browser: true,
node: true,
commonjs: true,
'shared-node-browser': true,
es6: true,
mocha: true,
amd: true,
},
globals: {
requestIdleCallback: true,
JSON: true,
alert: true,
chrome: true
},
rules: {
'no-unused-vars': ['error', { args: 'none' }],
'comma-dangle': ['warn', 'only-multiline'],
'prefer-const': 'warn',
'no-var': 'warn',
'no-new-object': 'error',
'quote-props': ['warn', 'as-needed'],
'no-array-constructor': 'error',
'array-callback-return': 'error',
'quotes': ['warn', 'single', { 'avoidEscape': true, 'allowTemplateLiterals': true }],
'template-curly-spacing': 'warn',
'no-useless-escape': 'warn',
'func-style': ['warn',
'declaration', { 'allowArrowFunctions': true }],
'wrap-iife': ['error', 'any', {'functionPrototypeMethods': true}],
'prefer-rest-params': 'warn',
'no-new-func': 'error',
'space-before-function-paren': ['warn', {
'anonymous': 'never',
'named': 'never',
'asyncArrow': 'always'
}],
'space-before-blocks': ['warn', 'always'],
'no-param-reassign': 'error',
'prefer-spread': 'warn',
'prefer-arrow-callback': 'warn',
'arrow-spacing': 'warn',
'arrow-body-style': 'error',
'arrow-parens': ['error', 'as-needed'],
'no-useless-constructor': 'warn',
'no-dupe-class-members': 'error',
'no-duplicate-imports': 'error',
'generator-star-spacing': ['warn', {'before': false, 'after':true}],
'no-undef': 'error',
'eqeqeq': 'error',
'no-case-declarations': 'error',
'no-unneeded-ternary': 'warn',
'no-nested-ternary': 'warn',
'brace-style': ['error', '1tbs', { 'allowSingleLine': true }],
'spaced-comment': ['warn', 'always'],
'indent': ['error', 4, { 'SwitchCase': 1 }],
'keyword-spacing': 'error',
'space-infix-ops': 'warn',
'eol-last': 'warn',
'no-whitespace-before-property': 'error',
'padded-blocks': ['warn', 'never'],
'space-in-parens': 'warn',
'array-bracket-spacing': 'warn',
'object-curly-spacing': ['warn', 'always'],
'semi': 'warn',
'radix': 'error',
'new-cap': 'error',
'no-extra-boolean-cast': 'off',
'no-loop-func': 'error',
'import/no-webpack-loader-syntax': 'error',
'import/first': 'error',
}
};