@jimmy.codes/eslint-config 6.18.0 → 6.19.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
@@ -1,5 +1,5 @@
1
- import { i as GLOB_IGNORES, l as GLOB_TESTS, n as GLOB_CJS } from "./globs-vEjrVS_T.mjs";
2
- import { a as hasReact, c as hasTestingLibrary, d as hasVitest, i as hasPlaywright, l as hasTypescript, n as hasJest, o as hasReactQuery, r as hasNext, s as hasStorybook, t as hasAstro } from "./has-dependency-qBWsE3wC.mjs";
1
+ import { i as GLOB_IGNORES, l as GLOB_TESTS, n as GLOB_CJS } from "./globs-C_yfK842.mjs";
2
+ import { a as hasReact, c as hasTestingLibrary, d as hasVitest, i as hasPlaywright, l as hasTypescript, n as hasJest, o as hasReactQuery, r as hasNext, s as hasStorybook, t as hasAstro } from "./has-dependency-BreXO1rF.mjs";
3
3
  import gitignoreConfig from "eslint-config-flat-gitignore";
4
4
  import globals from "globals";
5
5
  import comments from "@eslint-community/eslint-plugin-eslint-comments/configs";
@@ -487,16 +487,16 @@ const defineConfig = async ({ astro = false, autoDetect = true, gitignore = fals
487
487
  stylisticConfig()
488
488
  ];
489
489
  const featureConfigs = await Promise.all([
490
- isTypescriptEnabled && unwrap(import("./typescript-8inYuw4v.mjs")),
491
- isReactEnabled && unwrap(import("./react-K_Z3YHim.mjs")),
492
- isTanstackQueryEnabled && unwrap(import("./tanstack-query-NIpT7cxZ.mjs")),
493
- isAstroEnabled && unwrap(import("./astro-BQtDqyG3.mjs")),
494
- isJestEnabled && unwrap(import("./jest-CErT1V1O.mjs")),
495
- isVitestEnabled && unwrap(import("./vitest-BLlFhoFJ.mjs")),
496
- isTestingLibraryEnabled && unwrap(import("./testing-library-CK_eSFw4.mjs")),
497
- isPlaywrightEnabled && unwrap(import("./playwright-BVt20EDw.mjs")),
498
- isStorybookEnabled && unwrap(import("./storybook-DNFUDICT.mjs")),
499
- isNextjsEnabled && unwrap(import("./nextjs-Bdvt4ntM.mjs"))
490
+ isTypescriptEnabled && unwrap(import("./typescript-NviGFD5G.mjs")),
491
+ isReactEnabled && unwrap(import("./react-sWdvHd_J.mjs")),
492
+ isTanstackQueryEnabled && unwrap(import("./tanstack-query-D1gpzKY3.mjs")),
493
+ isAstroEnabled && unwrap(import("./astro-D3Zl135N.mjs")),
494
+ isJestEnabled && unwrap(import("./jest-DZtYWPoX.mjs")),
495
+ isVitestEnabled && unwrap(import("./vitest-DCV0bIFB.mjs")),
496
+ isTestingLibraryEnabled && unwrap(import("./testing-library-BBWV3thw.mjs")),
497
+ isPlaywrightEnabled && unwrap(import("./playwright-CrBcE3qD.mjs")),
498
+ isStorybookEnabled && unwrap(import("./storybook-CyxpG33Q.mjs")),
499
+ isNextjsEnabled && unwrap(import("./nextjs-DEk_ANZ4.mjs"))
500
500
  ]);
501
501
  return [
502
502
  ...gitignore ? [gitignoreConfig({ strict: false })] : [],
@@ -1,5 +1,5 @@
1
- import { l as GLOB_TESTS, r as GLOB_E2E } from "./globs-vEjrVS_T.mjs";
2
- import { t as interopDefault } from "./interop-default-B8s_f9DT.mjs";
1
+ import { l as GLOB_TESTS, r as GLOB_E2E } from "./globs-C_yfK842.mjs";
2
+ import { t as interopDefault } from "./interop-default-Bn64p66u.mjs";
3
3
 
4
4
  //#region src/rules/jest.ts
5
5
  const jestRules = async () => {
@@ -1,6 +1,6 @@
1
- import { s as GLOB_NEXTJS } from "./globs-vEjrVS_T.mjs";
2
- import { t as interopDefault } from "./interop-default-B8s_f9DT.mjs";
3
- import { t as upwarn } from "./upwarn-B1BG5US9.mjs";
1
+ import { s as GLOB_NEXTJS } from "./globs-C_yfK842.mjs";
2
+ import { t as interopDefault } from "./interop-default-Bn64p66u.mjs";
3
+ import { t as upwarn } from "./upwarn-BWFMaOyK.mjs";
4
4
 
5
5
  //#region src/rules/nextjs.ts
6
6
  const nextjsRules = async () => {
@@ -1,5 +1,5 @@
1
- import { c as GLOB_PLAYWRIGHT } from "./globs-vEjrVS_T.mjs";
2
- import { t as interopDefault } from "./interop-default-B8s_f9DT.mjs";
1
+ import { c as GLOB_PLAYWRIGHT } from "./globs-C_yfK842.mjs";
2
+ import { t as interopDefault } from "./interop-default-Bn64p66u.mjs";
3
3
 
4
4
  //#region src/rules/playwright.ts
5
5
  const playwrightRules = async () => {
@@ -1,7 +1,7 @@
1
- import { d as GLOB_TSX, o as GLOB_JSX } from "./globs-vEjrVS_T.mjs";
2
- import { l as hasTypescript, r as hasNext, u as hasVite } from "./has-dependency-qBWsE3wC.mjs";
3
- import { t as interopDefault } from "./interop-default-B8s_f9DT.mjs";
4
- import { t as upwarn } from "./upwarn-B1BG5US9.mjs";
1
+ import { d as GLOB_TSX, o as GLOB_JSX } from "./globs-C_yfK842.mjs";
2
+ import { l as hasTypescript, r as hasNext, u as hasVite } from "./has-dependency-BreXO1rF.mjs";
3
+ import { t as interopDefault } from "./interop-default-Bn64p66u.mjs";
4
+ import { t as upwarn } from "./upwarn-BWFMaOyK.mjs";
5
5
  import globals from "globals";
6
6
 
7
7
  //#region src/rules/react.ts
@@ -21,35 +21,36 @@ const nextAllowedExportNames = [
21
21
  "generateViewport"
22
22
  ];
23
23
  const reactRules = async () => {
24
- const [{ configs: reactConfigs }, jsxA11yPlugin] = await Promise.all([interopDefault(import("@eslint-react/eslint-plugin")), interopDefault(import("eslint-plugin-jsx-a11y"))]);
24
+ const [{ configs: reactConfigs }, { flatConfigs: jsxA11yConfigs }, { configs: reactDomConfigs }, { configs: reactHooksExtraConfigs }, { configs: reactWebApiConfigs }, { configs: reactNamingConventionConfigs }] = await Promise.all([
25
+ interopDefault(import("eslint-plugin-react-x")),
26
+ interopDefault(import("eslint-plugin-jsx-a11y")),
27
+ interopDefault(import("eslint-plugin-react-dom")),
28
+ interopDefault(import("eslint-plugin-react-hooks-extra")),
29
+ interopDefault(import("eslint-plugin-react-web-api")),
30
+ interopDefault(import("eslint-plugin-react-naming-convention"))
31
+ ]);
25
32
  const isUsingNextjs = hasNext();
26
33
  const isUsingVite = hasVite();
27
- const reactPluginRules = hasTypescript() ? reactConfigs["strict-type-checked"].rules : reactConfigs.recommended.rules;
34
+ const isUsingTypesScript = hasTypescript();
35
+ const reactPluginRules = isUsingTypesScript ? reactConfigs["strict-type-checked"].rules : reactConfigs.strict.rules;
36
+ const reactDomPluginRules = isUsingTypesScript ? {
37
+ ...reactDomConfigs.strict.rules,
38
+ "react-dom/no-string-style-prop": "off",
39
+ "react-dom/no-unknown-property": "off"
40
+ } : {
41
+ ...reactDomConfigs.strict.rules,
42
+ "react-dom/no-string-style-prop": "error",
43
+ "react-dom/no-unknown-property": ["error", { requireDataLowercase: true }]
44
+ };
28
45
  return {
29
- ...jsxA11yPlugin.flatConfigs.recommended.rules,
46
+ ...jsxA11yConfigs.recommended.rules,
30
47
  ...upwarn(reactPluginRules),
31
- "@eslint-react/dom/no-missing-button-type": "error",
32
- "@eslint-react/dom/no-missing-iframe-sandbox": "error",
33
- "@eslint-react/dom/no-string-style-prop": "error",
34
- "@eslint-react/dom/no-unsafe-target-blank": "error",
35
- "@eslint-react/hooks-extra/no-direct-set-state-in-use-effect": "off",
36
- "@eslint-react/jsx-dollar": "off",
37
- "@eslint-react/jsx-key-before-spread": "error",
38
- "@eslint-react/jsx-shorthand-boolean": "error",
39
- "@eslint-react/jsx-shorthand-fragment": "error",
40
- "@eslint-react/naming-convention/component-name": "error",
41
- "@eslint-react/no-children-prop": "error",
42
- "@eslint-react/no-class-component": "error",
43
- "@eslint-react/no-missing-context-display-name": "error",
44
- "@eslint-react/no-unnecessary-key": "error",
45
- "@eslint-react/no-unnecessary-use-callback": "error",
46
- "@eslint-react/no-unnecessary-use-memo": "error",
47
- "@eslint-react/no-unstable-context-value": "error",
48
- "@eslint-react/no-unstable-default-props": "error",
49
- "@eslint-react/no-unused-state": "error",
50
- "@eslint-react/no-useless-fragment": "error",
51
- "@eslint-react/prefer-namespace-import": "error",
48
+ ...upwarn(reactDomPluginRules),
49
+ ...upwarn(reactHooksExtraConfigs.recommended.rules),
50
+ ...upwarn(reactWebApiConfigs.recommended.rules),
51
+ ...upwarn(reactNamingConventionConfigs.recommended.rules),
52
52
  "react-compiler/react-compiler": "error",
53
+ "react-hooks-extra/no-direct-set-state-in-use-effect": "off",
53
54
  "react-hooks/component-hook-factories": "error",
54
55
  "react-hooks/error-boundaries": "error",
55
56
  "react-hooks/exhaustive-deps": "error",
@@ -66,10 +67,16 @@ const reactRules = async () => {
66
67
  "react-hooks/unsupported-syntax": "error",
67
68
  "react-hooks/use-memo": "error",
68
69
  "react-hooks/void-use-memo": "error",
70
+ "react-naming-convention/component-name": "error",
69
71
  "react-refresh/only-export-components": ["warn", {
70
72
  allowConstantExport: isUsingVite,
71
73
  allowExportNames: isUsingNextjs ? nextAllowedExportNames : []
72
- }]
74
+ }],
75
+ "react-x/jsx-dollar": "off",
76
+ "react-x/jsx-shorthand-boolean": "error",
77
+ "react-x/jsx-shorthand-fragment": "error",
78
+ "react-x/no-missing-context-display-name": "error",
79
+ "react-x/prefer-namespace-import": "error"
73
80
  };
74
81
  };
75
82
 
@@ -77,7 +84,7 @@ const reactRules = async () => {
77
84
  //#region src/configs/react.ts
78
85
  async function reactConfig() {
79
86
  const [reactPlugin, jsxA11yPlugin, reactHooksPlugin, reactRefreshPlugin, reactCompilerPlugin, reactHooksExtraPlugin, reactDomPlugin, reactWebApiPlugin, reactNamingConventionPlugin] = await Promise.all([
80
- interopDefault(import("@eslint-react/eslint-plugin")),
87
+ interopDefault(import("eslint-plugin-react-x")),
81
88
  interopDefault(import("eslint-plugin-jsx-a11y")),
82
89
  interopDefault(import("eslint-plugin-react-hooks")),
83
90
  interopDefault(import("eslint-plugin-react-refresh")),
@@ -98,15 +105,15 @@ async function reactConfig() {
98
105
  },
99
106
  name: "jimmy.codes/react",
100
107
  plugins: {
101
- "@eslint-react": reactPlugin,
102
- "@eslint-react/dom": reactDomPlugin,
103
- "@eslint-react/hooks-extra": reactHooksExtraPlugin,
104
- "@eslint-react/naming-convention": reactNamingConventionPlugin,
105
- "@eslint-react/web-api": reactWebApiPlugin,
106
108
  "jsx-a11y": jsxA11yPlugin,
107
109
  "react-compiler": reactCompilerPlugin,
110
+ "react-dom": reactDomPlugin,
108
111
  "react-hooks": reactHooksPlugin,
109
- "react-refresh": reactRefreshPlugin
112
+ "react-hooks-extra": reactHooksExtraPlugin,
113
+ "react-naming-convention": reactNamingConventionPlugin,
114
+ "react-refresh": reactRefreshPlugin,
115
+ "react-web-api": reactWebApiPlugin,
116
+ "react-x": reactPlugin
110
117
  },
111
118
  rules: await reactRules(),
112
119
  settings: { react: { version: "detect" } }
@@ -1,5 +1,5 @@
1
- import { t as interopDefault } from "./interop-default-B8s_f9DT.mjs";
2
- import { t as upwarn } from "./upwarn-B1BG5US9.mjs";
1
+ import { t as interopDefault } from "./interop-default-Bn64p66u.mjs";
2
+ import { t as upwarn } from "./upwarn-BWFMaOyK.mjs";
3
3
 
4
4
  //#region src/configs/storybook.ts
5
5
  async function storybookConfig() {
@@ -1,5 +1,5 @@
1
- import { d as GLOB_TSX, o as GLOB_JSX } from "./globs-vEjrVS_T.mjs";
2
- import { t as interopDefault } from "./interop-default-B8s_f9DT.mjs";
1
+ import { d as GLOB_TSX, o as GLOB_JSX } from "./globs-C_yfK842.mjs";
2
+ import { t as interopDefault } from "./interop-default-Bn64p66u.mjs";
3
3
 
4
4
  //#region src/configs/tanstack-query.ts
5
5
  async function tanstackQueryConfig() {
@@ -1,5 +1,5 @@
1
- import { l as GLOB_TESTS, r as GLOB_E2E } from "./globs-vEjrVS_T.mjs";
2
- import { t as interopDefault } from "./interop-default-B8s_f9DT.mjs";
1
+ import { l as GLOB_TESTS, r as GLOB_E2E } from "./globs-C_yfK842.mjs";
2
+ import { t as interopDefault } from "./interop-default-Bn64p66u.mjs";
3
3
 
4
4
  //#region src/rules/testing-library.ts
5
5
  const testingLibraryRules = async () => {
@@ -1,4 +1,4 @@
1
- import { a as GLOB_JS, l as GLOB_TESTS, o as GLOB_JSX } from "./globs-vEjrVS_T.mjs";
1
+ import { a as GLOB_JS, l as GLOB_TESTS, o as GLOB_JSX } from "./globs-C_yfK842.mjs";
2
2
 
3
3
  //#region src/rules/typescript.ts
4
4
  const disabledEslintRules = { "no-use-before-define": "off" };
@@ -1,5 +1,5 @@
1
- import { l as GLOB_TESTS, r as GLOB_E2E } from "./globs-vEjrVS_T.mjs";
2
- import { t as interopDefault } from "./interop-default-B8s_f9DT.mjs";
1
+ import { l as GLOB_TESTS, r as GLOB_E2E } from "./globs-C_yfK842.mjs";
2
+ import { t as interopDefault } from "./interop-default-Bn64p66u.mjs";
3
3
 
4
4
  //#region src/rules/vitest.ts
5
5
  const vitestRules = async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jimmy.codes/eslint-config",
3
- "version": "6.18.0",
3
+ "version": "6.19.0",
4
4
  "description": "A simple, modern ESLint config that covers most use cases.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -40,14 +40,13 @@
40
40
  ],
41
41
  "dependencies": {
42
42
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
43
- "@eslint-react/eslint-plugin": "^2.3.4",
44
43
  "@eslint/js": "^9.39.1",
45
- "@next/eslint-plugin-next": "^15.5.6",
44
+ "@next/eslint-plugin-next": "^16.0.3",
46
45
  "@stylistic/eslint-plugin": "^5.5.0",
47
46
  "@tanstack/eslint-plugin-query": "^5.91.2",
48
47
  "@types/eslint": "9.6.1",
49
- "@typescript-eslint/parser": "^8.46.3",
50
- "@typescript-eslint/utils": "^8.46.3",
48
+ "@typescript-eslint/parser": "^8.46.4",
49
+ "@typescript-eslint/utils": "^8.46.4",
51
50
  "@vitest/eslint-plugin": "^1.4.2",
52
51
  "astro-eslint-parser": "^1.2.2",
53
52
  "eslint-config-flat-gitignore": "^2.1.0",
@@ -56,27 +55,28 @@
56
55
  "eslint-plugin-arrow-return-style-x": "^1.2.6",
57
56
  "eslint-plugin-astro": "^1.5.0",
58
57
  "eslint-plugin-import-x": "^4.16.1",
59
- "eslint-plugin-jest": "^29.0.1",
58
+ "eslint-plugin-jest": "^29.1.0",
60
59
  "eslint-plugin-jest-dom": "^5.5.0",
61
- "eslint-plugin-jsdoc": "^61.1.12",
60
+ "eslint-plugin-jsdoc": "^61.2.1",
62
61
  "eslint-plugin-jsx-a11y": "^6.10.2",
63
62
  "eslint-plugin-n": "^17.23.1",
64
63
  "eslint-plugin-perfectionist": "^4.15.1",
65
64
  "eslint-plugin-playwright": "^2.3.0",
66
65
  "eslint-plugin-react-compiler": "19.1.0-rc.2",
67
- "eslint-plugin-react-dom": "^2.3.4",
66
+ "eslint-plugin-react-dom": "^2.3.5",
68
67
  "eslint-plugin-react-hooks": "^7.0.1",
69
- "eslint-plugin-react-hooks-extra": "^2.3.4",
70
- "eslint-plugin-react-naming-convention": "^2.3.4",
68
+ "eslint-plugin-react-hooks-extra": "^2.3.5",
69
+ "eslint-plugin-react-naming-convention": "^2.3.5",
71
70
  "eslint-plugin-react-refresh": "0.4.24",
72
- "eslint-plugin-react-web-api": "^2.3.4",
71
+ "eslint-plugin-react-web-api": "^2.3.5",
72
+ "eslint-plugin-react-x": "^2.3.5",
73
73
  "eslint-plugin-regexp": "^2.10.0",
74
74
  "eslint-plugin-storybook": "0.12.0",
75
- "eslint-plugin-testing-library": "^7.13.3",
75
+ "eslint-plugin-testing-library": "^7.13.4",
76
76
  "eslint-plugin-unicorn": "^62.0.0",
77
77
  "globals": "^16.5.0",
78
78
  "local-pkg": "^1.1.2",
79
- "typescript-eslint": "^8.46.3"
79
+ "typescript-eslint": "^8.46.4"
80
80
  },
81
81
  "peerDependencies": {
82
82
  "eslint": "^9.10.0"
File without changes