-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.js
96 lines (87 loc) · 2.9 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
module.exports = {
root: true,
extends: 'eslint:recommended',
parserOptions: {
ecmaVersion: 8,
ecmaFeatures: {
impliedStrict: true,
},
},
env: {
es6: true,
browser: true,
worker: true,
webextensions: true,
},
"rules": {
'linebreak-style': ['warn', 'unix'],
'unicode-bom': ['warn', 'never'],
'no-trailing-spaces': ['warn'],
'no-multi-spaces': ['warn'],
'no-tabs': ['warn'],
'eol-last': ['warn'],
'indent': ['warn', 2, { flatTernaryExpressions: true }],
'semi': ['warn', 'always'],
'no-extra-semi': ['off'],
'comma-dangle': ['warn', {
"arrays": "always-multiline",
"objects": "always-multiline",
"functions": "never"
}],
'no-multiple-empty-lines': ['warn', { max: 2 }],
'quotes': ['warn', 'single', { avoidEscape: true, allowTemplateLiterals: true }],
'arrow-parens': ['warn', 'as-needed'],
'quote-props': ['warn', 'as-needed'],
'dot-notation': ['warn'],
'arrow-spacing': ['warn'],
'block-spacing': ['warn'],
'comma-spacing': ['warn'],
'semi-spacing': ['warn'],
'computed-property-spacing': ['warn'],
'func-call-spacing': ['warn'],
'key-spacing': ['warn'],
'switch-colon-spacing': ['warn'],
'keyword-spacing': ['warn'],
'object-curly-spacing': ['warn', 'always'],
'array-bracket-spacing': ['warn', 'never'],
'template-tag-spacing': ['warn'],
'space-unary-ops': ['warn'],
'rest-spread-spacing': ['warn'],
'space-infix-ops': ['warn'],
'operator-linebreak': ['warn', 'after'],
'implicit-arrow-linebreak': ['warn'],
'no-whitespace-before-property': ['warn'],
'space-before-function-paren': ['warn', {anonymous: 'always', named: 'never', asyncArrow: 'always'}],
'space-in-parens': ['warn'],
'spaced-comment': ['warn', 'always', {
line: { markers: ['/'] },
block: { markers: ['!'], exceptions: ['*'] }
}],
'brace-style': ['warn', '1tbs', { allowSingleLine: true }],
'func-style': ['warn', 'expression', { allowArrowFunctions: true }],
'id-length': ['warn', { min: 0, max: 40, properties: 'never' }],
'eqeqeq': ['warn', 'always', {'null': 'ignore'}],
'wrap-iife': ['warn', 'outside'],
'yoda': ['warn', 'never', { onlyEquality: true }],
'no-var': ['warn'],
'no-constant-condition': ['warn', { checkLoops: false }],
'no-empty': ['warn'],
'no-undefined': ['warn'],
'no-shadow-restricted-names': ['warn'],
'no-throw-literal': ['warn'],
'no-eval': ['error'],
'no-implied-eval': ['error'],
'no-unused-vars': ['off'],
'no-implicit-globals': ['error'],
'no-new-wrappers': ['warn'],
'no-proto': ['warn'],
'operator-assignment': ['warn', 'always'],
'no-extra-label': ['warn'],
'consistent-return': ['warn'],
'radix': ['warn'],
'complexity': ['warn'],
'no-console': ['off'],
'no-async-promise-executor': ['off'],
'require-atomic-updates': ['off'],
}
}