@jimmy.codes/eslint-config 6.26.0 → 6.27.0
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/dist/index.d.mts +886 -531
- package/dist/index.mjs +37 -20
- package/dist/{jest-BxCbmb4w.mjs → jest-Dm9_cuf3.mjs} +3 -0
- package/package.json +9 -9
package/dist/index.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import nodePlugin from "eslint-plugin-n";
|
|
|
9
9
|
import arrowReturnStylePlugin from "eslint-plugin-arrow-return-style-x";
|
|
10
10
|
import eslint from "@eslint/js";
|
|
11
11
|
import jsdocPlugin from "eslint-plugin-jsdoc";
|
|
12
|
-
import perfectionist from "eslint-plugin-perfectionist";
|
|
12
|
+
import perfectionist, { configs as configs$1 } from "eslint-plugin-perfectionist";
|
|
13
13
|
import eslintConfigPrettier from "eslint-config-prettier/flat";
|
|
14
14
|
import * as regexpPlugin from "eslint-plugin-regexp";
|
|
15
15
|
import stylisticPlugin from "@stylistic/eslint-plugin";
|
|
@@ -255,39 +255,56 @@ const nodeConfig = () => {
|
|
|
255
255
|
//#endregion
|
|
256
256
|
//#region src/rules/perfectionist.ts
|
|
257
257
|
const perfectionistRules = {
|
|
258
|
-
...
|
|
258
|
+
...configs$1["recommended-natural"].rules,
|
|
259
259
|
"perfectionist/sort-imports": ["error", {
|
|
260
|
-
customGroups: {
|
|
261
|
-
type: {},
|
|
262
|
-
value: {}
|
|
263
|
-
},
|
|
264
260
|
environment: "node",
|
|
265
261
|
groups: [
|
|
266
262
|
"side-effect-style",
|
|
267
|
-
"
|
|
268
|
-
"type",
|
|
269
|
-
"
|
|
270
|
-
"
|
|
271
|
-
"internal",
|
|
263
|
+
"side-effect",
|
|
264
|
+
["type-builtin", "type-external"],
|
|
265
|
+
"value-builtin",
|
|
266
|
+
"value-external",
|
|
267
|
+
"type-internal",
|
|
268
|
+
"value-internal",
|
|
272
269
|
[
|
|
273
|
-
"parent
|
|
274
|
-
"sibling
|
|
275
|
-
"index
|
|
270
|
+
"type-parent",
|
|
271
|
+
"type-sibling",
|
|
272
|
+
"type-index"
|
|
276
273
|
],
|
|
277
274
|
[
|
|
278
|
-
"parent",
|
|
279
|
-
"sibling",
|
|
280
|
-
"index"
|
|
275
|
+
"value-parent",
|
|
276
|
+
"value-sibling",
|
|
277
|
+
"value-index"
|
|
281
278
|
],
|
|
282
|
-
"object",
|
|
283
279
|
"style",
|
|
280
|
+
"value-subpath",
|
|
281
|
+
"ts-equals-import",
|
|
284
282
|
"unknown"
|
|
285
283
|
],
|
|
286
284
|
internalPattern: ["^~/.*", "^@/.*"],
|
|
287
285
|
order: "asc",
|
|
288
286
|
type: "natural"
|
|
289
287
|
}],
|
|
290
|
-
"perfectionist/sort-modules": "
|
|
288
|
+
"perfectionist/sort-modules": ["error", {
|
|
289
|
+
groups: [
|
|
290
|
+
"enum",
|
|
291
|
+
["declare-interface", "declare-type"],
|
|
292
|
+
"type",
|
|
293
|
+
"interface",
|
|
294
|
+
"declare-class",
|
|
295
|
+
"class",
|
|
296
|
+
"declare-function",
|
|
297
|
+
"function",
|
|
298
|
+
"export-enum",
|
|
299
|
+
["export-interface", "export-type"],
|
|
300
|
+
"export-class",
|
|
301
|
+
"export-function",
|
|
302
|
+
"unknown"
|
|
303
|
+
],
|
|
304
|
+
order: "asc",
|
|
305
|
+
partitionByNewLine: true,
|
|
306
|
+
type: "natural"
|
|
307
|
+
}]
|
|
291
308
|
};
|
|
292
309
|
|
|
293
310
|
//#endregion
|
|
@@ -508,7 +525,7 @@ const defineConfig = async ({ astro = false, autoDetect = true, gitignore = fals
|
|
|
508
525
|
isReactEnabled && unwrap(import("./react-6Ule3BqW.mjs"), react),
|
|
509
526
|
isTanstackQueryEnabled && unwrap(import("./tanstack-query-BVXIAVcv.mjs"), tanstackQuery),
|
|
510
527
|
isAstroEnabled && unwrap(import("./astro-BnZ2LIR3.mjs"), astro),
|
|
511
|
-
isJestEnabled && unwrap(import("./jest-
|
|
528
|
+
isJestEnabled && unwrap(import("./jest-Dm9_cuf3.mjs"), jest),
|
|
512
529
|
isVitestEnabled && unwrap(import("./vitest-BiF4sMhO.mjs"), vitest),
|
|
513
530
|
isTestingLibraryEnabled && unwrap(import("./testing-library-BFsBlKXl.mjs"), testingLibrary),
|
|
514
531
|
isPlaywrightEnabled && unwrap(import("./playwright-ChDf6HhZ.mjs"), playwright),
|
|
@@ -22,6 +22,7 @@ const jestRules = async (options) => {
|
|
|
22
22
|
"jest/no-restricted-jest-methods": "off",
|
|
23
23
|
"jest/no-restricted-matchers": "off",
|
|
24
24
|
"jest/no-test-return-statement": "error",
|
|
25
|
+
"jest/no-unneeded-async-expect-function": "error",
|
|
25
26
|
"jest/no-untyped-mock-factory": "off",
|
|
26
27
|
"jest/padding-around-all": "error",
|
|
27
28
|
"jest/prefer-called-with": "error",
|
|
@@ -38,6 +39,8 @@ const jestRules = async (options) => {
|
|
|
38
39
|
"jest/prefer-snapshot-hint": "error",
|
|
39
40
|
"jest/prefer-spy-on": "off",
|
|
40
41
|
"jest/prefer-strict-equal": "error",
|
|
42
|
+
"jest/prefer-to-have-been-called": "error",
|
|
43
|
+
"jest/prefer-to-have-been-called-times": "error",
|
|
41
44
|
"jest/prefer-todo": "warn",
|
|
42
45
|
"jest/require-hook": "error",
|
|
43
46
|
"jest/require-to-throw-message": "error",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jimmy.codes/eslint-config",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.27.0",
|
|
4
4
|
"description": "A simple, modern ESLint config that covers most use cases.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
43
|
-
"@eslint/js": "^9.39.
|
|
43
|
+
"@eslint/js": "^9.39.2",
|
|
44
44
|
"@next/eslint-plugin-next": "^16.0.10",
|
|
45
45
|
"@stylistic/eslint-plugin": "^5.6.1",
|
|
46
46
|
"@tanstack/eslint-plugin-query": "^5.91.2",
|
|
47
47
|
"@types/eslint": "9.6.1",
|
|
48
|
-
"@typescript-eslint/parser": "^8.
|
|
49
|
-
"@typescript-eslint/utils": "^8.
|
|
48
|
+
"@typescript-eslint/parser": "^8.50.0",
|
|
49
|
+
"@typescript-eslint/utils": "^8.50.0",
|
|
50
50
|
"@vitest/eslint-plugin": "^1.5.2",
|
|
51
51
|
"astro-eslint-parser": "^1.2.2",
|
|
52
52
|
"eslint-config-flat-gitignore": "^2.1.0",
|
|
@@ -56,28 +56,28 @@
|
|
|
56
56
|
"eslint-plugin-astro": "^1.5.0",
|
|
57
57
|
"eslint-plugin-erasable-syntax-only": "0.4.0",
|
|
58
58
|
"eslint-plugin-import-x": "^4.16.1",
|
|
59
|
-
"eslint-plugin-jest": "^29.
|
|
59
|
+
"eslint-plugin-jest": "^29.5.0",
|
|
60
60
|
"eslint-plugin-jest-dom": "^5.5.0",
|
|
61
61
|
"eslint-plugin-jsdoc": "^61.5.0",
|
|
62
62
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
63
63
|
"eslint-plugin-n": "^17.23.1",
|
|
64
|
-
"eslint-plugin-perfectionist": "^
|
|
64
|
+
"eslint-plugin-perfectionist": "^5.0.0",
|
|
65
65
|
"eslint-plugin-playwright": "^2.4.0",
|
|
66
66
|
"eslint-plugin-react-compiler": "19.1.0-rc.2",
|
|
67
67
|
"eslint-plugin-react-dom": "^2.3.13",
|
|
68
68
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
69
69
|
"eslint-plugin-react-hooks-extra": "^2.3.13",
|
|
70
70
|
"eslint-plugin-react-naming-convention": "^2.3.13",
|
|
71
|
-
"eslint-plugin-react-refresh": "0.4.
|
|
71
|
+
"eslint-plugin-react-refresh": "0.4.26",
|
|
72
72
|
"eslint-plugin-react-web-api": "^2.3.13",
|
|
73
73
|
"eslint-plugin-react-x": "^2.3.13",
|
|
74
74
|
"eslint-plugin-regexp": "^2.10.0",
|
|
75
75
|
"eslint-plugin-storybook": "0.12.0",
|
|
76
|
-
"eslint-plugin-testing-library": "^7.
|
|
76
|
+
"eslint-plugin-testing-library": "^7.15.1",
|
|
77
77
|
"eslint-plugin-unicorn": "^62.0.0",
|
|
78
78
|
"globals": "^16.5.0",
|
|
79
79
|
"local-pkg": "^1.1.2",
|
|
80
|
-
"typescript-eslint": "^8.
|
|
80
|
+
"typescript-eslint": "^8.50.0"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
83
|
"eslint": "^9.10.0"
|