eslint-config-deepcrawl 16.0.2 → 16.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +42 -20
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import jestPlugin from "eslint-plugin-jest";
|
|
|
8
8
|
import nodePlugin from "eslint-plugin-n";
|
|
9
9
|
import noLoopsPlugin from "eslint-plugin-no-loops";
|
|
10
10
|
import packageJsonPlugin from "eslint-plugin-package-json";
|
|
11
|
-
import perfectionist from "eslint-plugin-perfectionist"
|
|
11
|
+
import perfectionist from "eslint-plugin-perfectionist";
|
|
12
12
|
import promisePlugin from "eslint-plugin-promise";
|
|
13
13
|
import sonarjsPlugin from "eslint-plugin-sonarjs";
|
|
14
14
|
import typescriptEslint from "typescript-eslint";
|
|
@@ -38,6 +38,29 @@ export default defineConfig([
|
|
|
38
38
|
files: ["**/*.{cjs,js,jsx,mjs}"],
|
|
39
39
|
extends: [typescriptEslint.configs.disableTypeChecked],
|
|
40
40
|
},
|
|
41
|
+
{
|
|
42
|
+
plugins: { "import-x": importXPlugin },
|
|
43
|
+
files: ["**/*.{cjs,cts,js,jsx,mjs,mts,ts,tsx}"],
|
|
44
|
+
rules: {
|
|
45
|
+
"import-x/default": "off",
|
|
46
|
+
"import-x/named": "off",
|
|
47
|
+
"import-x/namespace": "off",
|
|
48
|
+
"import-x/newline-after-import": "error",
|
|
49
|
+
"import-x/no-default-export": "error",
|
|
50
|
+
"import-x/no-named-as-default": "off",
|
|
51
|
+
"import-x/no-named-as-default-member": "off",
|
|
52
|
+
"import-x/no-relative-packages": "error",
|
|
53
|
+
"import-x/no-unresolved": "off",
|
|
54
|
+
"import-x/order": [
|
|
55
|
+
"error",
|
|
56
|
+
{
|
|
57
|
+
alphabetize: { order: "asc", caseInsensitive: true },
|
|
58
|
+
"newlines-between": "always",
|
|
59
|
+
groups: ["builtin", "external", "internal", "parent", "sibling", "index"],
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
},
|
|
41
64
|
{
|
|
42
65
|
plugins: { "array-func": arrayFuncPlugin },
|
|
43
66
|
rules: { "array-func/avoid-reverse": "error" },
|
|
@@ -177,23 +200,6 @@ export default defineConfig([
|
|
|
177
200
|
rules: {
|
|
178
201
|
complexity: ["error", 15],
|
|
179
202
|
"default-case-last": "error",
|
|
180
|
-
"import-x/default": "off",
|
|
181
|
-
"import-x/named": "off",
|
|
182
|
-
"import-x/namespace": "off",
|
|
183
|
-
"import-x/newline-after-import": "error",
|
|
184
|
-
"import-x/no-default-export": "error",
|
|
185
|
-
"import-x/no-named-as-default": "off",
|
|
186
|
-
"import-x/no-named-as-default-member": "off",
|
|
187
|
-
"import-x/no-relative-packages": "error",
|
|
188
|
-
"import-x/no-unresolved": "off",
|
|
189
|
-
"import-x/order": [
|
|
190
|
-
"error",
|
|
191
|
-
{
|
|
192
|
-
alphabetize: { order: "asc", caseInsensitive: true },
|
|
193
|
-
"newlines-between": "always",
|
|
194
|
-
groups: ["builtin", "external", "internal", "parent", "sibling", "index"],
|
|
195
|
-
},
|
|
196
|
-
],
|
|
197
203
|
"jest/expect-expect": "error",
|
|
198
204
|
"jest/padding-around-after-all-blocks": "error",
|
|
199
205
|
"jest/padding-around-after-each-blocks": "error",
|
|
@@ -225,8 +231,24 @@ export default defineConfig([
|
|
|
225
231
|
"no-self-assign": "error",
|
|
226
232
|
"no-unreachable-loop": "error",
|
|
227
233
|
"object-shorthand": "error",
|
|
228
|
-
"perfectionist/sort-intersection-types":
|
|
229
|
-
|
|
234
|
+
"perfectionist/sort-intersection-types": [
|
|
235
|
+
"error",
|
|
236
|
+
{
|
|
237
|
+
type: "natural",
|
|
238
|
+
order: "asc",
|
|
239
|
+
ignoreCase: true,
|
|
240
|
+
specialCharacters: "keep",
|
|
241
|
+
},
|
|
242
|
+
],
|
|
243
|
+
"perfectionist/sort-union-types": [
|
|
244
|
+
"error",
|
|
245
|
+
{
|
|
246
|
+
type: "natural",
|
|
247
|
+
order: "asc",
|
|
248
|
+
ignoreCase: true,
|
|
249
|
+
specialCharacters: "keep",
|
|
250
|
+
},
|
|
251
|
+
],
|
|
230
252
|
"prefer-template": "error",
|
|
231
253
|
"promise/prefer-await-to-then": "error",
|
|
232
254
|
},
|