1 | {
|
2 | "parserOptions": {
|
3 | "ecmaVersion": 2021,
|
4 | "ecmaFeatures": {
|
5 | "jsx": true
|
6 | },
|
7 | "sourceType": "module"
|
8 | },
|
9 |
|
10 | "env": {
|
11 | "es2021": true,
|
12 | "node": true
|
13 | },
|
14 |
|
15 | "plugins": [
|
16 | "import",
|
17 | "node",
|
18 | "promise"
|
19 | ],
|
20 |
|
21 | "globals": {
|
22 | "document": "readonly",
|
23 | "navigator": "readonly",
|
24 | "window": "readonly"
|
25 | },
|
26 |
|
27 | "rules": {
|
28 | "no-var": "warn",
|
29 |
|
30 | "accessor-pairs": ["error", { "setWithoutGet": true, "enforceForClassMembers": true }],
|
31 | "array-bracket-spacing": ["error", "never"],
|
32 | "array-callback-return": ["error", {
|
33 | "allowImplicit": false,
|
34 | "checkForEach": false
|
35 | }],
|
36 | "arrow-spacing": ["error", { "before": true, "after": true }],
|
37 | "block-spacing": ["error", "always"],
|
38 | "brace-style": ["error", "1tbs", { "allowSingleLine": true }],
|
39 | "camelcase": ["error", {
|
40 | "allow": ["^UNSAFE_"],
|
41 | "properties": "never",
|
42 | "ignoreGlobals": true
|
43 | }],
|
44 | "comma-dangle": ["error", {
|
45 | "arrays": "never",
|
46 | "objects": "never",
|
47 | "imports": "never",
|
48 | "exports": "never",
|
49 | "functions": "never"
|
50 | }],
|
51 | "comma-spacing": ["error", { "before": false, "after": true }],
|
52 | "comma-style": ["error", "last"],
|
53 | "computed-property-spacing": ["error", "never", { "enforceForClassMembers": true }],
|
54 | "constructor-super": "error",
|
55 | "curly": ["error", "multi-line"],
|
56 | "default-case-last": "error",
|
57 | "dot-location": ["error", "property"],
|
58 | "dot-notation": ["error", { "allowKeywords": true }],
|
59 | "eol-last": "error",
|
60 | "eqeqeq": ["error", "always", { "null": "ignore" }],
|
61 | "func-call-spacing": ["error", "never"],
|
62 | "generator-star-spacing": ["error", { "before": true, "after": true }],
|
63 | "indent": ["error", 2, {
|
64 | "SwitchCase": 1,
|
65 | "VariableDeclarator": 1,
|
66 | "outerIIFEBody": 1,
|
67 | "MemberExpression": 1,
|
68 | "FunctionDeclaration": { "parameters": 1, "body": 1 },
|
69 | "FunctionExpression": { "parameters": 1, "body": 1 },
|
70 | "CallExpression": { "arguments": 1 },
|
71 | "ArrayExpression": 1,
|
72 | "ObjectExpression": 1,
|
73 | "ImportDeclaration": 1,
|
74 | "flatTernaryExpressions": false,
|
75 | "ignoreComments": false,
|
76 | "ignoredNodes": ["TemplateLiteral *", "JSXElement", "JSXElement > *", "JSXAttribute", "JSXIdentifier", "JSXNamespacedName", "JSXMemberExpression", "JSXSpreadAttribute", "JSXExpressionContainer", "JSXOpeningElement", "JSXClosingElement", "JSXFragment", "JSXOpeningFragment", "JSXClosingFragment", "JSXText", "JSXEmptyExpression", "JSXSpreadChild"],
|
77 | "offsetTernaryExpressions": true
|
78 | }],
|
79 | "key-spacing": ["error", { "beforeColon": false, "afterColon": true }],
|
80 | "keyword-spacing": ["error", { "before": true, "after": true }],
|
81 | "lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }],
|
82 | "multiline-ternary": ["error", "always-multiline"],
|
83 | "new-cap": ["error", { "newIsCap": true, "capIsNew": false, "properties": true }],
|
84 | "new-parens": "error",
|
85 | "no-array-constructor": "error",
|
86 | "no-async-promise-executor": "error",
|
87 | "no-caller": "error",
|
88 | "no-case-declarations": "error",
|
89 | "no-class-assign": "error",
|
90 | "no-compare-neg-zero": "error",
|
91 | "no-cond-assign": "error",
|
92 | "no-const-assign": "error",
|
93 | "no-constant-condition": ["error", { "checkLoops": false }],
|
94 | "no-control-regex": "error",
|
95 | "no-debugger": "error",
|
96 | "no-delete-var": "error",
|
97 | "no-dupe-args": "error",
|
98 | "no-dupe-class-members": "error",
|
99 | "no-dupe-keys": "error",
|
100 | "no-duplicate-case": "error",
|
101 | "no-useless-backreference": "error",
|
102 | "no-empty": ["error", { "allowEmptyCatch": true }],
|
103 | "no-empty-character-class": "error",
|
104 | "no-empty-pattern": "error",
|
105 | "no-eval": "error",
|
106 | "no-ex-assign": "error",
|
107 | "no-extend-native": "error",
|
108 | "no-extra-bind": "error",
|
109 | "no-extra-boolean-cast": "error",
|
110 | "no-extra-parens": ["error", "functions"],
|
111 | "no-fallthrough": "error",
|
112 | "no-floating-decimal": "error",
|
113 | "no-func-assign": "error",
|
114 | "no-global-assign": "error",
|
115 | "no-implied-eval": "error",
|
116 | "no-import-assign": "error",
|
117 | "no-invalid-regexp": "error",
|
118 | "no-irregular-whitespace": "error",
|
119 | "no-iterator": "error",
|
120 | "no-labels": ["error", { "allowLoop": false, "allowSwitch": false }],
|
121 | "no-lone-blocks": "error",
|
122 | "no-loss-of-precision": "error",
|
123 | "no-misleading-character-class": "error",
|
124 | "no-prototype-builtins": "error",
|
125 | "no-useless-catch": "error",
|
126 | "no-mixed-operators": ["error", {
|
127 | "groups": [
|
128 | ["==", "!=", "===", "!==", ">", ">=", "<", "<="],
|
129 | ["&&", "||"],
|
130 | ["in", "instanceof"]
|
131 | ],
|
132 | "allowSamePrecedence": true
|
133 | }],
|
134 | "no-mixed-spaces-and-tabs": "error",
|
135 | "no-multi-spaces": "error",
|
136 | "no-multi-str": "error",
|
137 | "no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 0 }],
|
138 | "no-new": "error",
|
139 | "no-new-func": "error",
|
140 | "no-new-object": "error",
|
141 | "no-new-symbol": "error",
|
142 | "no-new-wrappers": "error",
|
143 | "no-obj-calls": "error",
|
144 | "no-octal": "error",
|
145 | "no-octal-escape": "error",
|
146 | "no-proto": "error",
|
147 | "no-redeclare": ["error", { "builtinGlobals": false }],
|
148 | "no-regex-spaces": "error",
|
149 | "no-return-assign": ["error", "except-parens"],
|
150 | "no-self-assign": ["error", { "props": true }],
|
151 | "no-self-compare": "error",
|
152 | "no-sequences": "error",
|
153 | "no-shadow-restricted-names": "error",
|
154 | "no-sparse-arrays": "error",
|
155 | "no-tabs": "error",
|
156 | "no-template-curly-in-string": "error",
|
157 | "no-this-before-super": "error",
|
158 | "no-throw-literal": "error",
|
159 | "no-trailing-spaces": "error",
|
160 | "no-undef": "error",
|
161 | "no-undef-init": "error",
|
162 | "no-unexpected-multiline": "error",
|
163 | "no-unmodified-loop-condition": "error",
|
164 | "no-unneeded-ternary": ["error", { "defaultAssignment": false }],
|
165 | "no-unreachable": "error",
|
166 | "no-unreachable-loop": "error",
|
167 | "no-unsafe-finally": "error",
|
168 | "no-unsafe-negation": "error",
|
169 | "no-unused-expressions": ["error", {
|
170 | "allowShortCircuit": true,
|
171 | "allowTernary": true,
|
172 | "allowTaggedTemplates": true
|
173 | }],
|
174 | "no-unused-vars": ["error", {
|
175 | "args": "none",
|
176 | "caughtErrors": "none",
|
177 | "ignoreRestSiblings": true,
|
178 | "vars": "all"
|
179 | }],
|
180 | "no-use-before-define": ["error", { "functions": false, "classes": false, "variables": false }],
|
181 | "no-useless-call": "error",
|
182 | "no-useless-computed-key": "error",
|
183 | "no-useless-constructor": "error",
|
184 | "no-useless-escape": "error",
|
185 | "no-useless-rename": "error",
|
186 | "no-useless-return": "error",
|
187 | "no-void": "error",
|
188 | "no-whitespace-before-property": "error",
|
189 | "no-with": "error",
|
190 | "object-curly-newline": ["error", { "multiline": true, "consistent": true }],
|
191 | "object-curly-spacing": ["error", "always"],
|
192 | "object-property-newline": ["error", { "allowMultiplePropertiesPerLine": true }],
|
193 | "one-var": ["error", { "initialized": "never" }],
|
194 | "operator-linebreak": ["error", "after", { "overrides": { "?": "before", ":": "before", "|>": "before" } }],
|
195 | "padded-blocks": ["error", { "blocks": "never", "switches": "never", "classes": "never" }],
|
196 | "prefer-const": ["error", {"destructuring": "all"}],
|
197 | "prefer-promise-reject-errors": "error",
|
198 | "prefer-regex-literals": ["error", { "disallowRedundantWrapping": true }],
|
199 | "quote-props": ["error", "as-needed"],
|
200 | "quotes": ["error", "single", { "avoidEscape": true, "allowTemplateLiterals": false }],
|
201 | "rest-spread-spacing": ["error", "never"],
|
202 | "semi": ["error", "never"],
|
203 | "semi-spacing": ["error", { "before": false, "after": true }],
|
204 | "space-before-blocks": ["error", "always"],
|
205 | "space-before-function-paren": ["error", "always"],
|
206 | "space-in-parens": ["error", "never"],
|
207 | "space-infix-ops": "error",
|
208 | "space-unary-ops": ["error", { "words": true, "nonwords": false }],
|
209 | "spaced-comment": ["error", "always", {
|
210 | "line": { "markers": ["*package", "!", "/", ",", "="] },
|
211 | "block": { "balanced": true, "markers": ["*package", "!", ",", ":", "::", "flow-include"], "exceptions": ["*"] }
|
212 | }],
|
213 | "symbol-description": "error",
|
214 | "template-curly-spacing": ["error", "never"],
|
215 | "template-tag-spacing": ["error", "never"],
|
216 | "unicode-bom": ["error", "never"],
|
217 | "use-isnan": ["error", {
|
218 | "enforceForSwitchCase": true,
|
219 | "enforceForIndexOf": true
|
220 | }],
|
221 | "valid-typeof": ["error", { "requireStringLiterals": true }],
|
222 | "wrap-iife": ["error", "any", { "functionPrototypeMethods": true }],
|
223 | "yield-star-spacing": ["error", "both"],
|
224 | "yoda": ["error", "never"],
|
225 |
|
226 | "import/export": "error",
|
227 | "import/first": "error",
|
228 | "import/no-absolute-path": ["error", { "esmodule": true, "commonjs": true, "amd": false }],
|
229 | "import/no-duplicates": "error",
|
230 | "import/no-named-default": "error",
|
231 | "import/no-webpack-loader-syntax": "error",
|
232 |
|
233 | "node/handle-callback-err": ["error", "^(err|error)$" ],
|
234 | "node/no-callback-literal": "error",
|
235 | "node/no-deprecated-api": "error",
|
236 | "node/no-exports-assign": "error",
|
237 | "node/no-new-require": "error",
|
238 | "node/no-path-concat": "error",
|
239 | "node/process-exit-as-throw": "error",
|
240 |
|
241 | "promise/param-names": "error"
|
242 | }
|
243 | }
|