@jimmy.codes/eslint-config 6.26.0 → 6.28.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 from "eslint-plugin-perfectionist";
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: { "arrow-style": arrowReturnStylePlugin },
189
+ plugins: {
190
+ "arrow-style": arrowReturnStylePlugin,
191
+ "de-morgan": deMorganPlugin
192
+ },
188
193
  rules: javascriptRules
189
194
  }, {
190
195
  files: GLOB_TESTS,
@@ -255,39 +260,56 @@ const nodeConfig = () => {
255
260
  //#endregion
256
261
  //#region src/rules/perfectionist.ts
257
262
  const perfectionistRules = {
258
- ...perfectionist.configs["recommended-natural"].rules,
263
+ ...configs$2["recommended-natural"].rules,
259
264
  "perfectionist/sort-imports": ["error", {
260
- customGroups: {
261
- type: {},
262
- value: {}
263
- },
264
265
  environment: "node",
265
266
  groups: [
266
267
  "side-effect-style",
267
- "builtin",
268
- "type",
269
- "external",
270
- "internal-type",
271
- "internal",
268
+ "side-effect",
269
+ ["type-builtin", "type-external"],
270
+ "value-builtin",
271
+ "value-external",
272
+ "type-internal",
273
+ "value-internal",
272
274
  [
273
- "parent-type",
274
- "sibling-type",
275
- "index-type"
275
+ "type-parent",
276
+ "type-sibling",
277
+ "type-index"
276
278
  ],
277
279
  [
278
- "parent",
279
- "sibling",
280
- "index"
280
+ "value-parent",
281
+ "value-sibling",
282
+ "value-index"
281
283
  ],
282
- "object",
283
284
  "style",
285
+ "value-subpath",
286
+ "ts-equals-import",
284
287
  "unknown"
285
288
  ],
286
289
  internalPattern: ["^~/.*", "^@/.*"],
287
290
  order: "asc",
288
291
  type: "natural"
289
292
  }],
290
- "perfectionist/sort-modules": "off"
293
+ "perfectionist/sort-modules": ["error", {
294
+ groups: [
295
+ "enum",
296
+ ["declare-interface", "declare-type"],
297
+ "type",
298
+ "interface",
299
+ "declare-class",
300
+ "class",
301
+ "declare-function",
302
+ "function",
303
+ "export-enum",
304
+ ["export-interface", "export-type"],
305
+ "export-class",
306
+ "export-function",
307
+ "unknown"
308
+ ],
309
+ order: "asc",
310
+ partitionByNewLine: true,
311
+ type: "natural"
312
+ }]
291
313
  };
292
314
 
293
315
  //#endregion
@@ -508,8 +530,8 @@ const defineConfig = async ({ astro = false, autoDetect = true, gitignore = fals
508
530
  isReactEnabled && unwrap(import("./react-6Ule3BqW.mjs"), react),
509
531
  isTanstackQueryEnabled && unwrap(import("./tanstack-query-BVXIAVcv.mjs"), tanstackQuery),
510
532
  isAstroEnabled && unwrap(import("./astro-BnZ2LIR3.mjs"), astro),
511
- isJestEnabled && unwrap(import("./jest-BxCbmb4w.mjs"), jest),
512
- isVitestEnabled && unwrap(import("./vitest-BiF4sMhO.mjs"), vitest),
533
+ isJestEnabled && unwrap(import("./jest-Dm9_cuf3.mjs"), jest),
534
+ isVitestEnabled && unwrap(import("./vitest-WmpT3DEl.mjs"), vitest),
513
535
  isTestingLibraryEnabled && unwrap(import("./testing-library-BFsBlKXl.mjs"), testingLibrary),
514
536
  isPlaywrightEnabled && unwrap(import("./playwright-ChDf6HhZ.mjs"), playwright),
515
537
  isStorybookEnabled && unwrap(import("./storybook-BfbeHUhi.mjs"), storybook),
@@ -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",
@@ -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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jimmy.codes/eslint-config",
3
- "version": "6.26.0",
3
+ "version": "6.28.0",
4
4
  "description": "A simple, modern ESLint config that covers most use cases.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -40,44 +40,45 @@
40
40
  ],
41
41
  "dependencies": {
42
42
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
43
- "@eslint/js": "^9.39.1",
44
- "@next/eslint-plugin-next": "^16.0.10",
43
+ "@eslint/js": "^9.39.2",
44
+ "@next/eslint-plugin-next": "^16.1.0",
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.0",
49
- "@typescript-eslint/utils": "^8.49.0",
50
- "@vitest/eslint-plugin": "^1.5.2",
48
+ "@typescript-eslint/parser": "^8.50.0",
49
+ "@typescript-eslint/utils": "^8.50.0",
50
+ "@vitest/eslint-plugin": "^1.5.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.2.1",
60
+ "eslint-plugin-jest": "^29.5.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": "^4.15.1",
65
+ "eslint-plugin-perfectionist": "^5.0.0",
65
66
  "eslint-plugin-playwright": "^2.4.0",
66
67
  "eslint-plugin-react-compiler": "19.1.0-rc.2",
67
68
  "eslint-plugin-react-dom": "^2.3.13",
68
69
  "eslint-plugin-react-hooks": "^7.0.1",
69
70
  "eslint-plugin-react-hooks-extra": "^2.3.13",
70
71
  "eslint-plugin-react-naming-convention": "^2.3.13",
71
- "eslint-plugin-react-refresh": "0.4.24",
72
+ "eslint-plugin-react-refresh": "0.4.26",
72
73
  "eslint-plugin-react-web-api": "^2.3.13",
73
74
  "eslint-plugin-react-x": "^2.3.13",
74
75
  "eslint-plugin-regexp": "^2.10.0",
75
76
  "eslint-plugin-storybook": "0.12.0",
76
- "eslint-plugin-testing-library": "^7.13.6",
77
+ "eslint-plugin-testing-library": "^7.15.1",
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.49.0"
81
+ "typescript-eslint": "^8.50.0"
81
82
  },
82
83
  "peerDependencies": {
83
84
  "eslint": "^9.10.0"