-
Notifications
You must be signed in to change notification settings - Fork 24
/
.eslintrc.json
187 lines (187 loc) · 6.25 KB
/
.eslintrc.json
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
{
"env": {
"es6": true,
"es2020": true,
"node": true
},
"extends": "eslint:recommended",
"plugins": [
"unicorn"
],
"rules": {
"array-bracket-newline": ["warn", "consistent"],
"array-bracket-spacing": ["warn", "never"],
"array-element-newline": ["warn", "consistent"],
"arrow-body-style": ["warn", "as-needed"],
"arrow-spacing": ["warn", {
"after": true,
"before": true
}],
"brace-style": ["warn", "stroustrup", {
"allowSingleLine": true
}],
"comma-dangle": ["warn", "never"],
"curly": ["warn", "all"],
"dot-location": ["warn", "property"],
"dot-notation": "warn",
"eol-last": ["warn", "always"],
"eqeqeq": "error",
"function-call-argument-newline": ["warn", "consistent"],
"implicit-arrow-linebreak": ["error", "beside"],
"indent": ["warn", "tab", {
"SwitchCase": 1
}],
"key-spacing": ["warn", {
"afterColon": true,
"beforeColon": false,
"mode": "strict"
}],
"keyword-spacing": ["warn", {
"after": true,
"before": true
}],
"lines-between-class-members": ["warn", "always", {
"exceptAfterSingleLine": true
}],
"max-nested-callbacks": ["warn", {
"max": 2
}],
"max-params": ["warn", {
"max": 5
}],
"max-statements-per-line": ["error", {
"max": 1
}],
"multiline-ternary": ["warn", "always-multiline"],
"new-cap": ["warn", {
"capIsNew": false,
"newIsCap": true,
"properties": false
}],
"new-parens": ["error", "always"],
"newline-per-chained-call": ["warn", {
"ignoreChainWithDepth": 3
}],
"no-console": "off",
"no-control-regex": "off",
"no-duplicate-imports": "error",
"no-empty-pattern": "error",
"no-lonely-if": "warn",
"no-mixed-operators": "off",
"no-multi-assign": "error",
"no-multi-spaces": "warn",
"no-multi-str": "warn",
"no-multiple-empty-lines": ["warn", {
"max": 2,
"maxBOF": 0,
"maxEOF": 0
}],
"no-nested-ternary": "off",
"no-new": "warn",
"no-new-object": "error",
"no-new-wrappers": "error",
"no-proto": "error",
"no-return-assign": "error",
"no-return-await": "off",
"no-self-compare": "warn",
"no-sequences": "error",
"no-trailing-spaces": ["warn"],
"no-underscore-dangle": "off",
"no-unneeded-ternary": "warn",
"no-unused-vars": "warn",
"no-useless-computed-key": "warn",
"no-useless-constructor": "warn",
"no-useless-rename": "error",
"no-var": "error",
"no-whitespace-before-property": "warn",
"no-with": "error",
"object-curly-newline": ["warn", {
"consistent": true
}],
"object-curly-spacing": ["warn", "always", {
"arraysInObjects": false,
"objectsInObjects": true
}],
"object-property-newline": ["warn", {
"allowAllPropertiesOnSameLine": true
}],
"object-shorthand": ["warn", "properties"],
"one-var": ["warn", "never"],
"operator-linebreak": ["warn", "before"],
"padded-blocks": ["warn", "never"],
"prefer-arrow-callback": "warn",
"prefer-const": ["warn", {
"destructuring": "all"
}],
"prefer-exponentiation-operator": "warn",
"prefer-numeric-literals": "warn",
"prefer-object-spread": "warn",
"prefer-rest-params": "error",
"prefer-template": "warn",
"quote-props": ["warn", "as-needed"],
"quotes": ["warn", "double", {
"allowTemplateLiterals": true
}],
"rest-spread-spacing": ["warn", "never"],
"semi": ["warn", "always"],
"semi-spacing": ["warn", {
"before": false,
"after": true
}],
"semi-style": ["warn", "last"],
"sort-keys": ["off", "asc"],
"space-before-blocks": ["warn", "always"],
"space-before-function-paren": ["warn", "always"],
"space-in-parens": ["warn", "never"],
"space-infix-ops": "error",
"space-unary-ops": "warn",
"spaced-comment": ["warn", "always"],
"switch-colon-spacing": ["warn", {
"after": true,
"before": false
}],
"symbol-description": "off",
"template-curly-spacing": ["warn", "never"],
"template-tag-spacing": ["warn", "always"],
"unicorn/catch-error-name": ["warn", {
"name": "e"
}],
"unicorn/empty-brace-spaces": "warn",
"unicorn/new-for-builtins": "error",
"unicorn/no-array-for-each": "error",
"unicorn/no-array-push-push": "warn",
"unicorn/no-console-spaces": "warn",
"unicorn/no-lonely-if": "warn",
"unicorn/no-instanceof-array": "error",
"unicorn/no-nested-ternary": "warn",
"unicorn/no-new-buffer": "error",
"unicorn/no-unreadable-array-destructuring": "error",
"unicorn/no-unsafe-regex": "off",
"unicorn/number-literal-case": "warn",
"unicorn/numeric-separators-style": ["warn", {
"onlyIfContainsSeparator": true
}],
"unicorn/prefer-array-find": "warn",
"unicorn/prefer-array-flat": "warn",
"unicorn/prefer-array-flat-map": "warn",
"unicorn/prefer-array-index-of": "warn",
"unicorn/prefer-array-some": "warn",
"unicorn/prefer-regexp-test": "warn",
"unicorn/prefer-date-now": "warn",
"unicorn/prefer-includes": "warn",
"unicorn/prefer-math-trunc": "warn",
"unicorn/prefer-string-starts-ends-with": "warn",
"unicorn/prefer-string-trim-start-end": "warn",
"unicorn/throw-new-error": "error",
"wrap-iife": ["warn", "inside"],
"yoda": "error"
},
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaVersion": 2021,
"requireConfigFile": false
},
"globals": {
"app": "readonly"
}
}