@jimmy.codes/eslint-config 6.27.0 → 6.29.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.mjs
CHANGED
|
@@ -7,9 +7,10 @@ import { createTypeScriptImportResolver } from "eslint-import-resolver-typescrip
|
|
|
7
7
|
import { configs, importX } from "eslint-plugin-import-x";
|
|
8
8
|
import nodePlugin from "eslint-plugin-n";
|
|
9
9
|
import arrowReturnStylePlugin from "eslint-plugin-arrow-return-style-x";
|
|
10
|
+
import deMorganPlugin, { configs as configs$1 } from "eslint-plugin-de-morgan";
|
|
10
11
|
import eslint from "@eslint/js";
|
|
11
12
|
import jsdocPlugin from "eslint-plugin-jsdoc";
|
|
12
|
-
import perfectionist, { configs as configs$
|
|
13
|
+
import perfectionist, { configs as configs$2 } from "eslint-plugin-perfectionist";
|
|
13
14
|
import eslintConfigPrettier from "eslint-config-prettier/flat";
|
|
14
15
|
import * as regexpPlugin from "eslint-plugin-regexp";
|
|
15
16
|
import stylisticPlugin from "@stylistic/eslint-plugin";
|
|
@@ -175,7 +176,8 @@ const additionalRules = {
|
|
|
175
176
|
};
|
|
176
177
|
const javascriptRules = {
|
|
177
178
|
...eslint.configs.recommended.rules,
|
|
178
|
-
...additionalRules
|
|
179
|
+
...additionalRules,
|
|
180
|
+
...configs$1.recommended.rules
|
|
179
181
|
};
|
|
180
182
|
|
|
181
183
|
//#endregion
|
|
@@ -184,7 +186,10 @@ const javascriptConfig = () => {
|
|
|
184
186
|
return [{
|
|
185
187
|
linterOptions: { reportUnusedDisableDirectives: true },
|
|
186
188
|
name: "jimmy.codes/javascript",
|
|
187
|
-
plugins: {
|
|
189
|
+
plugins: {
|
|
190
|
+
"arrow-style": arrowReturnStylePlugin,
|
|
191
|
+
"de-morgan": deMorganPlugin
|
|
192
|
+
},
|
|
188
193
|
rules: javascriptRules
|
|
189
194
|
}, {
|
|
190
195
|
files: GLOB_TESTS,
|
|
@@ -254,8 +259,10 @@ const nodeConfig = () => {
|
|
|
254
259
|
|
|
255
260
|
//#endregion
|
|
256
261
|
//#region src/rules/perfectionist.ts
|
|
262
|
+
const recommendedNaturalConfig = configs$2?.["recommended-natural"];
|
|
263
|
+
const recommendedNaturalRules = recommendedNaturalConfig && "rules" in recommendedNaturalConfig ? recommendedNaturalConfig.rules : {};
|
|
257
264
|
const perfectionistRules = {
|
|
258
|
-
...
|
|
265
|
+
...recommendedNaturalRules,
|
|
259
266
|
"perfectionist/sort-imports": ["error", {
|
|
260
267
|
environment: "node",
|
|
261
268
|
groups: [
|
|
@@ -525,8 +532,8 @@ const defineConfig = async ({ astro = false, autoDetect = true, gitignore = fals
|
|
|
525
532
|
isReactEnabled && unwrap(import("./react-6Ule3BqW.mjs"), react),
|
|
526
533
|
isTanstackQueryEnabled && unwrap(import("./tanstack-query-BVXIAVcv.mjs"), tanstackQuery),
|
|
527
534
|
isAstroEnabled && unwrap(import("./astro-BnZ2LIR3.mjs"), astro),
|
|
528
|
-
isJestEnabled && unwrap(import("./jest-
|
|
529
|
-
isVitestEnabled && unwrap(import("./vitest-
|
|
535
|
+
isJestEnabled && unwrap(import("./jest-C3ee1wyj.mjs"), jest),
|
|
536
|
+
isVitestEnabled && unwrap(import("./vitest-BkzQGlIC.mjs"), vitest),
|
|
530
537
|
isTestingLibraryEnabled && unwrap(import("./testing-library-BFsBlKXl.mjs"), testingLibrary),
|
|
531
538
|
isPlaywrightEnabled && unwrap(import("./playwright-ChDf6HhZ.mjs"), playwright),
|
|
532
539
|
isStorybookEnabled && unwrap(import("./storybook-BfbeHUhi.mjs"), storybook),
|
|
@@ -17,11 +17,13 @@ const jestRules = async (options) => {
|
|
|
17
17
|
"jest/no-conditional-in-test": "error",
|
|
18
18
|
"jest/no-confusing-set-timeout": "error",
|
|
19
19
|
"jest/no-duplicate-hooks": "error",
|
|
20
|
+
"jest/no-error-equal": "off",
|
|
20
21
|
"jest/no-hooks": "off",
|
|
21
22
|
"jest/no-large-snapshots": "off",
|
|
22
23
|
"jest/no-restricted-jest-methods": "off",
|
|
23
24
|
"jest/no-restricted-matchers": "off",
|
|
24
25
|
"jest/no-test-return-statement": "error",
|
|
26
|
+
"jest/no-unnecessary-assertion": "off",
|
|
25
27
|
"jest/no-unneeded-async-expect-function": "error",
|
|
26
28
|
"jest/no-untyped-mock-factory": "off",
|
|
27
29
|
"jest/padding-around-all": "error",
|
|
@@ -36,6 +38,7 @@ const jestRules = async (options) => {
|
|
|
36
38
|
"jest/prefer-jest-mocked": "error",
|
|
37
39
|
"jest/prefer-lowercase-title": "off",
|
|
38
40
|
"jest/prefer-mock-promise-shorthand": "error",
|
|
41
|
+
"jest/prefer-mock-return-shorthand": "error",
|
|
39
42
|
"jest/prefer-snapshot-hint": "error",
|
|
40
43
|
"jest/prefer-spy-on": "off",
|
|
41
44
|
"jest/prefer-strict-equal": "error",
|
|
@@ -46,6 +49,7 @@ const jestRules = async (options) => {
|
|
|
46
49
|
"jest/require-to-throw-message": "error",
|
|
47
50
|
"jest/require-top-level-describe": "off",
|
|
48
51
|
"jest/unbound-method": "off",
|
|
52
|
+
"jest/valid-expect-with-promise": "off",
|
|
49
53
|
"jest/valid-title": ["error", { mustMatch: { it: "^should" } }],
|
|
50
54
|
...options?.overrides
|
|
51
55
|
};
|
|
@@ -27,6 +27,7 @@ const vitestRules = async (options) => {
|
|
|
27
27
|
"vitest/no-restricted-vi-methods": "off",
|
|
28
28
|
"vitest/no-test-prefixes": "error",
|
|
29
29
|
"vitest/no-test-return-statement": "error",
|
|
30
|
+
"vitest/no-unneeded-async-expect-function": "error",
|
|
30
31
|
"vitest/padding-around-all": "error",
|
|
31
32
|
"vitest/prefer-called-once": "error",
|
|
32
33
|
"vitest/prefer-called-times": "off",
|
|
@@ -43,12 +44,14 @@ const vitestRules = async (options) => {
|
|
|
43
44
|
"vitest/prefer-importing-vitest-globals": options?.globals === "explicit" ? "error" : "off",
|
|
44
45
|
"vitest/prefer-lowercase-title": "off",
|
|
45
46
|
"vitest/prefer-mock-promise-shorthand": "error",
|
|
47
|
+
"vitest/prefer-mock-return-shorthand": "error",
|
|
46
48
|
"vitest/prefer-snapshot-hint": "error",
|
|
47
49
|
"vitest/prefer-spy-on": "off",
|
|
48
50
|
"vitest/prefer-strict-boolean-matchers": "error",
|
|
49
51
|
"vitest/prefer-strict-equal": "error",
|
|
50
52
|
"vitest/prefer-to-be": "error",
|
|
51
53
|
"vitest/prefer-to-contain": "error",
|
|
54
|
+
"vitest/prefer-to-have-been-called-times": "error",
|
|
52
55
|
"vitest/prefer-to-have-length": "error",
|
|
53
56
|
"vitest/prefer-todo": "warn",
|
|
54
57
|
"vitest/prefer-vi-mocked": "error",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jimmy.codes/eslint-config",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.29.0",
|
|
4
4
|
"description": "A simple, modern ESLint config that covers most use cases.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -41,43 +41,44 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
43
43
|
"@eslint/js": "^9.39.2",
|
|
44
|
-
"@next/eslint-plugin-next": "^16.
|
|
44
|
+
"@next/eslint-plugin-next": "^16.1.1",
|
|
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.50.
|
|
49
|
-
"@typescript-eslint/utils": "^8.50.
|
|
50
|
-
"@vitest/eslint-plugin": "^1.
|
|
48
|
+
"@typescript-eslint/parser": "^8.50.1",
|
|
49
|
+
"@typescript-eslint/utils": "^8.50.1",
|
|
50
|
+
"@vitest/eslint-plugin": "^1.6.4",
|
|
51
51
|
"astro-eslint-parser": "^1.2.2",
|
|
52
52
|
"eslint-config-flat-gitignore": "^2.1.0",
|
|
53
53
|
"eslint-config-prettier": "^10.1.8",
|
|
54
54
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
55
55
|
"eslint-plugin-arrow-return-style-x": "^1.2.6",
|
|
56
56
|
"eslint-plugin-astro": "^1.5.0",
|
|
57
|
+
"eslint-plugin-de-morgan": "^2.0.0",
|
|
57
58
|
"eslint-plugin-erasable-syntax-only": "0.4.0",
|
|
58
59
|
"eslint-plugin-import-x": "^4.16.1",
|
|
59
|
-
"eslint-plugin-jest": "^29.
|
|
60
|
+
"eslint-plugin-jest": "^29.11.0",
|
|
60
61
|
"eslint-plugin-jest-dom": "^5.5.0",
|
|
61
62
|
"eslint-plugin-jsdoc": "^61.5.0",
|
|
62
63
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
63
64
|
"eslint-plugin-n": "^17.23.1",
|
|
64
|
-
"eslint-plugin-perfectionist": "^5.
|
|
65
|
+
"eslint-plugin-perfectionist": "^5.1.0",
|
|
65
66
|
"eslint-plugin-playwright": "^2.4.0",
|
|
66
67
|
"eslint-plugin-react-compiler": "19.1.0-rc.2",
|
|
67
|
-
"eslint-plugin-react-dom": "^2.
|
|
68
|
+
"eslint-plugin-react-dom": "^2.4.0",
|
|
68
69
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
69
|
-
"eslint-plugin-react-hooks-extra": "^2.
|
|
70
|
-
"eslint-plugin-react-naming-convention": "^2.
|
|
70
|
+
"eslint-plugin-react-hooks-extra": "^2.4.0",
|
|
71
|
+
"eslint-plugin-react-naming-convention": "^2.4.0",
|
|
71
72
|
"eslint-plugin-react-refresh": "0.4.26",
|
|
72
|
-
"eslint-plugin-react-web-api": "^2.
|
|
73
|
-
"eslint-plugin-react-x": "^2.
|
|
73
|
+
"eslint-plugin-react-web-api": "^2.4.0",
|
|
74
|
+
"eslint-plugin-react-x": "^2.4.0",
|
|
74
75
|
"eslint-plugin-regexp": "^2.10.0",
|
|
75
76
|
"eslint-plugin-storybook": "0.12.0",
|
|
76
|
-
"eslint-plugin-testing-library": "^7.15.
|
|
77
|
+
"eslint-plugin-testing-library": "^7.15.3",
|
|
77
78
|
"eslint-plugin-unicorn": "^62.0.0",
|
|
78
79
|
"globals": "^16.5.0",
|
|
79
80
|
"local-pkg": "^1.1.2",
|
|
80
|
-
"typescript-eslint": "^8.50.
|
|
81
|
+
"typescript-eslint": "^8.50.1"
|
|
81
82
|
},
|
|
82
83
|
"peerDependencies": {
|
|
83
84
|
"eslint": "^9.10.0"
|