@jimmy.codes/eslint-config 7.0.0 → 7.2.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-Clb0IBKv.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 { GLOB_CJS, GLOB_IGNORES, GLOB_TESTS } from "./globs.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-B4KAkcAy.mjs";
3
3
  import gitignoreConfig from "eslint-config-flat-gitignore";
4
4
  import globals from "globals";
5
5
  import { recommended } from "@eslint-community/eslint-plugin-eslint-comments/configs";
@@ -571,16 +571,16 @@ const defineConfig = async ({ astro = false, autoDetect = true, gitignore = fals
571
571
  stylisticConfig()
572
572
  ];
573
573
  const featureConfigs = await Promise.all([
574
- isTypescriptEnabled && unwrap(import("./typescript-C3EaMK44.mjs"), typescript),
575
- isReactEnabled && unwrap(import("./react-BB8TmvhT.mjs"), react),
576
- isTanstackQueryEnabled && unwrap(import("./tanstack-query-B7uegJUc.mjs"), tanstackQuery),
577
- isAstroEnabled && unwrap(import("./astro-BI8oXYAa.mjs"), astro),
578
- isJestEnabled && unwrap(import("./jest-CmNjZKiP.mjs"), jest),
579
- isVitestEnabled && unwrap(import("./vitest-CVJ533UC.mjs"), vitest),
580
- isTestingLibraryEnabled && unwrap(import("./testing-library-DkaPPtoj.mjs"), testingLibrary),
581
- isPlaywrightEnabled && unwrap(import("./playwright-BIcLWIGu.mjs"), playwright),
582
- isStorybookEnabled && unwrap(import("./storybook-DgiiyOo_.mjs"), storybook),
583
- isNextjsEnabled && unwrap(import("./nextjs-fAJgoLmK.mjs"), nextjs)
574
+ isTypescriptEnabled && unwrap(import("./typescript-Cae66DX9.mjs"), typescript),
575
+ isReactEnabled && unwrap(import("./react-BkGA0owG.mjs"), react),
576
+ isTanstackQueryEnabled && unwrap(import("./tanstack-query-CJMINud2.mjs"), tanstackQuery),
577
+ isAstroEnabled && unwrap(import("./astro-qFFNUM9D.mjs"), astro),
578
+ isJestEnabled && unwrap(import("./jest-BYBtWryE.mjs"), jest),
579
+ isVitestEnabled && unwrap(import("./vitest-CHcEa7vN.mjs"), vitest),
580
+ isTestingLibraryEnabled && unwrap(import("./testing-library-DAOq7Q2E.mjs"), testingLibrary),
581
+ isPlaywrightEnabled && unwrap(import("./playwright-C7C5OcaE.mjs"), playwright),
582
+ isStorybookEnabled && unwrap(import("./storybook-vSHixqw5.mjs"), storybook),
583
+ isNextjsEnabled && unwrap(import("./nextjs-Q8LOBFAI.mjs"), nextjs)
584
584
  ]);
585
585
  return [
586
586
  ...gitignore ? [gitignoreConfig({ strict: false })] : [],
@@ -1,5 +1,5 @@
1
- import { l as GLOB_TESTS, r as GLOB_E2E } from "./globs-Clb0IBKv.mjs";
2
- import { n as extractOptions, t as interopDefault } from "./interop-default-Bax7ywKG.mjs";
1
+ import { GLOB_E2E, GLOB_TESTS } from "./globs.mjs";
2
+ import { n as extractOptions, t as interopDefault } from "./interop-default-DtvCAAmD.mjs";
3
3
 
4
4
  //#region src/rules/jest.ts
5
5
  const jestRules = async (options) => {
@@ -1,6 +1,6 @@
1
- import { s as GLOB_NEXTJS } from "./globs-Clb0IBKv.mjs";
2
- import { n as extractOptions, t as interopDefault } from "./interop-default-Bax7ywKG.mjs";
3
- import { t as upwarn } from "./astro-BI8oXYAa.mjs";
1
+ import { GLOB_NEXTJS } from "./globs.mjs";
2
+ import { n as extractOptions, t as interopDefault } from "./interop-default-DtvCAAmD.mjs";
3
+ import { t as upwarn } from "./astro-qFFNUM9D.mjs";
4
4
 
5
5
  //#region src/rules/nextjs.ts
6
6
  const nextjsRules = async (options) => {
@@ -1,5 +1,5 @@
1
- import { c as GLOB_PLAYWRIGHT } from "./globs-Clb0IBKv.mjs";
2
- import { n as extractOptions, t as interopDefault } from "./interop-default-Bax7ywKG.mjs";
1
+ import { GLOB_PLAYWRIGHT } from "./globs.mjs";
2
+ import { n as extractOptions, t as interopDefault } from "./interop-default-DtvCAAmD.mjs";
3
3
 
4
4
  //#region src/rules/playwright.ts
5
5
  const playwrightRules = async (options) => {
@@ -1,7 +1,7 @@
1
- import { d as GLOB_TSX, o as GLOB_JSX } from "./globs-Clb0IBKv.mjs";
2
- import { l as hasTypescript, r as hasNext, u as hasVite } from "./has-dependency-qBWsE3wC.mjs";
3
- import { n as extractOptions, t as interopDefault } from "./interop-default-Bax7ywKG.mjs";
4
- import { t as upwarn } from "./astro-BI8oXYAa.mjs";
1
+ import { GLOB_JSX, GLOB_TSX } from "./globs.mjs";
2
+ import { l as hasTypescript, r as hasNext, u as hasVite } from "./has-dependency-B4KAkcAy.mjs";
3
+ import { n as extractOptions, t as interopDefault } from "./interop-default-DtvCAAmD.mjs";
4
+ import { t as upwarn } from "./astro-qFFNUM9D.mjs";
5
5
  import globals from "globals";
6
6
 
7
7
  //#region src/rules/react.ts
@@ -21,13 +21,14 @@ const nextAllowedExportNames = [
21
21
  "generateViewport"
22
22
  ];
23
23
  const reactRules = async (options) => {
24
- const [{ configs: reactConfigs }, { flatConfigs: jsxA11yConfigs }, { configs: reactDomConfigs }, { configs: reactHooksExtraConfigs }, { configs: reactWebApiConfigs }, { configs: reactNamingConventionConfigs }] = await Promise.all([
24
+ const [{ configs: reactConfigs }, { flatConfigs: jsxA11yConfigs }, { configs: reactDomConfigs }, { configs: reactHooksExtraConfigs }, { configs: reactWebApiConfigs }, { configs: reactNamingConventionConfigs }, { configs: reactRscConfigs }] = await Promise.all([
25
25
  interopDefault(import("eslint-plugin-react-x")),
26
26
  interopDefault(import("eslint-plugin-jsx-a11y")),
27
27
  interopDefault(import("eslint-plugin-react-dom")),
28
28
  interopDefault(import("eslint-plugin-react-hooks-extra")),
29
29
  interopDefault(import("eslint-plugin-react-web-api")),
30
- interopDefault(import("eslint-plugin-react-naming-convention"))
30
+ interopDefault(import("eslint-plugin-react-naming-convention")),
31
+ interopDefault(import("eslint-plugin-react-rsc"))
31
32
  ]);
32
33
  const isUsingNextjs = hasNext();
33
34
  const isUsingVite = hasVite();
@@ -49,6 +50,7 @@ const reactRules = async (options) => {
49
50
  ...upwarn(reactHooksExtraConfigs.recommended.rules),
50
51
  ...upwarn(reactWebApiConfigs.recommended.rules),
51
52
  ...upwarn(reactNamingConventionConfigs.recommended.rules),
53
+ ...upwarn(reactRscConfigs.recommended.rules),
52
54
  "react-compiler/react-compiler": "error",
53
55
  "react-hooks-extra/no-direct-set-state-in-use-effect": "off",
54
56
  "react-hooks/component-hook-factories": "error",
@@ -88,7 +90,7 @@ const reactRules = async (options) => {
88
90
  //#region src/configs/react.ts
89
91
  async function reactConfig(options) {
90
92
  const extractedOptions = extractOptions(options);
91
- const [reactPlugin, jsxA11yPlugin, reactHooksPlugin, reactRefreshPlugin, reactCompilerPlugin, reactHooksExtraPlugin, reactDomPlugin, reactWebApiPlugin, reactNamingConventionPlugin] = await Promise.all([
93
+ const [reactPlugin, jsxA11yPlugin, reactHooksPlugin, reactRefreshPlugin, reactCompilerPlugin, reactHooksExtraPlugin, reactDomPlugin, reactWebApiPlugin, reactNamingConventionPlugin, reactRscPlugin] = await Promise.all([
92
94
  interopDefault(import("eslint-plugin-react-x")),
93
95
  interopDefault(import("eslint-plugin-jsx-a11y")),
94
96
  interopDefault(import("eslint-plugin-react-hooks")),
@@ -97,7 +99,8 @@ async function reactConfig(options) {
97
99
  interopDefault(import("eslint-plugin-react-hooks-extra")),
98
100
  interopDefault(import("eslint-plugin-react-dom")),
99
101
  interopDefault(import("eslint-plugin-react-web-api")),
100
- interopDefault(import("eslint-plugin-react-naming-convention"))
102
+ interopDefault(import("eslint-plugin-react-naming-convention")),
103
+ interopDefault(import("eslint-plugin-react-rsc"))
101
104
  ]);
102
105
  return [{
103
106
  files: [GLOB_JSX, GLOB_TSX],
@@ -117,6 +120,7 @@ async function reactConfig(options) {
117
120
  "react-hooks-extra": reactHooksExtraPlugin,
118
121
  "react-naming-convention": reactNamingConventionPlugin,
119
122
  "react-refresh": reactRefreshPlugin,
123
+ "react-rsc": reactRscPlugin,
120
124
  "react-web-api": reactWebApiPlugin,
121
125
  "react-x": reactPlugin
122
126
  },
@@ -1,5 +1,5 @@
1
- import { n as extractOptions, t as interopDefault } from "./interop-default-Bax7ywKG.mjs";
2
- import { t as upwarn } from "./astro-BI8oXYAa.mjs";
1
+ import { n as extractOptions, t as interopDefault } from "./interop-default-DtvCAAmD.mjs";
2
+ import { t as upwarn } from "./astro-qFFNUM9D.mjs";
3
3
 
4
4
  //#region src/configs/storybook.ts
5
5
  async function storybookConfig(options) {
@@ -1,5 +1,5 @@
1
- import { d as GLOB_TSX, o as GLOB_JSX } from "./globs-Clb0IBKv.mjs";
2
- import { n as extractOptions, t as interopDefault } from "./interop-default-Bax7ywKG.mjs";
1
+ import { GLOB_JSX, GLOB_TSX } from "./globs.mjs";
2
+ import { n as extractOptions, t as interopDefault } from "./interop-default-DtvCAAmD.mjs";
3
3
 
4
4
  //#region src/configs/tanstack-query.ts
5
5
  async function tanstackQueryConfig(options) {
@@ -1,5 +1,5 @@
1
- import { l as GLOB_TESTS, r as GLOB_E2E } from "./globs-Clb0IBKv.mjs";
2
- import { n as extractOptions, t as interopDefault } from "./interop-default-Bax7ywKG.mjs";
1
+ import { GLOB_E2E, GLOB_TESTS } from "./globs.mjs";
2
+ import { n as extractOptions, t as interopDefault } from "./interop-default-DtvCAAmD.mjs";
3
3
 
4
4
  //#region src/rules/testing-library.ts
5
5
  const testingLibraryRules = async (options) => {
@@ -1,5 +1,5 @@
1
- import { a as GLOB_JS, l as GLOB_TESTS, o as GLOB_JSX } from "./globs-Clb0IBKv.mjs";
2
- import { n as extractOptions, t as interopDefault } from "./interop-default-Bax7ywKG.mjs";
1
+ import { GLOB_JS, GLOB_JSX, GLOB_TESTS } from "./globs.mjs";
2
+ import { n as extractOptions, t as interopDefault } from "./interop-default-DtvCAAmD.mjs";
3
3
 
4
4
  //#region src/rules/typescript.ts
5
5
  const disabledEslintRules = {
@@ -1,5 +1,5 @@
1
- import { f as GLOB_TYPE_TESTS, l as GLOB_TESTS, r as GLOB_E2E } from "./globs-Clb0IBKv.mjs";
2
- import { n as extractOptions, t as interopDefault } from "./interop-default-Bax7ywKG.mjs";
1
+ import { GLOB_E2E, GLOB_TESTS, GLOB_TYPE_TESTS } from "./globs.mjs";
2
+ import { n as extractOptions, t as interopDefault } from "./interop-default-DtvCAAmD.mjs";
3
3
 
4
4
  //#region src/rules/vitest.ts
5
5
  const vitestRules = async (options) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jimmy.codes/eslint-config",
3
- "version": "7.0.0",
3
+ "version": "7.2.0",
4
4
  "description": "A simple, modern ESLint config that covers most use cases.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -41,13 +41,13 @@
41
41
  "dependencies": {
42
42
  "@eslint-community/eslint-plugin-eslint-comments": "^4.6.0",
43
43
  "@eslint/js": "^9.39.2",
44
- "@next/eslint-plugin-next": "^16.1.4",
45
- "@stylistic/eslint-plugin": "^5.7.0",
46
- "@tanstack/eslint-plugin-query": "^5.91.3",
44
+ "@next/eslint-plugin-next": "^16.1.6",
45
+ "@stylistic/eslint-plugin": "^5.8.0",
46
+ "@tanstack/eslint-plugin-query": "^5.91.4",
47
47
  "@types/eslint": "9.6.1",
48
- "@typescript-eslint/parser": "^8.53.1",
49
- "@typescript-eslint/utils": "^8.53.1",
50
- "@vitest/eslint-plugin": "^1.6.6",
48
+ "@typescript-eslint/parser": "^8.55.0",
49
+ "@typescript-eslint/utils": "^8.55.0",
50
+ "@vitest/eslint-plugin": "^1.6.7",
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",
@@ -57,28 +57,29 @@
57
57
  "eslint-plugin-de-morgan": "^2.0.0",
58
58
  "eslint-plugin-erasable-syntax-only": "0.4.0",
59
59
  "eslint-plugin-import-x": "^4.16.1",
60
- "eslint-plugin-jest": "^29.12.1",
60
+ "eslint-plugin-jest": "^29.13.0",
61
61
  "eslint-plugin-jest-dom": "^5.5.0",
62
- "eslint-plugin-jsdoc": "^62.3.1",
62
+ "eslint-plugin-jsdoc": "^62.5.4",
63
63
  "eslint-plugin-jsx-a11y": "^6.10.2",
64
64
  "eslint-plugin-n": "^17.23.2",
65
- "eslint-plugin-perfectionist": "^5.4.0",
66
- "eslint-plugin-playwright": "^2.5.0",
65
+ "eslint-plugin-perfectionist": "^5.5.0",
66
+ "eslint-plugin-playwright": "^2.5.1",
67
67
  "eslint-plugin-react-compiler": "19.1.0-rc.2",
68
- "eslint-plugin-react-dom": "^2.7.2",
68
+ "eslint-plugin-react-dom": "^2.12.4",
69
69
  "eslint-plugin-react-hooks": "^7.0.1",
70
- "eslint-plugin-react-hooks-extra": "^2.7.2",
71
- "eslint-plugin-react-naming-convention": "^2.7.2",
72
- "eslint-plugin-react-refresh": "0.4.26",
73
- "eslint-plugin-react-web-api": "^2.7.2",
74
- "eslint-plugin-react-x": "^2.7.2",
70
+ "eslint-plugin-react-hooks-extra": "^2.12.4",
71
+ "eslint-plugin-react-naming-convention": "^2.12.4",
72
+ "eslint-plugin-react-refresh": "0.5.0",
73
+ "eslint-plugin-react-rsc": "^2.12.4",
74
+ "eslint-plugin-react-web-api": "^2.12.4",
75
+ "eslint-plugin-react-x": "^2.12.4",
75
76
  "eslint-plugin-regexp": "^3.0.0",
76
77
  "eslint-plugin-storybook": "0.12.0",
77
78
  "eslint-plugin-testing-library": "^7.15.4",
78
- "eslint-plugin-unicorn": "^62.0.0",
79
- "globals": "^17.0.0",
79
+ "eslint-plugin-unicorn": "^63.0.0",
80
+ "globals": "^17.3.0",
80
81
  "local-pkg": "^1.1.2",
81
- "typescript-eslint": "^8.53.1"
82
+ "typescript-eslint": "^8.55.0"
82
83
  },
83
84
  "peerDependencies": {
84
85
  "eslint": ">=9.38.0"
@@ -1,80 +0,0 @@
1
- //#region src/globs.ts
2
- const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
3
- const GLOB_TS_EXT = "?([cm])ts";
4
- const GLOB_TSX_EXT = "?([cm])tsx";
5
- const GLOB_JS = "**/*.?([cm])js";
6
- const GLOB_JSX = "**/*.?([cm])jsx";
7
- const GLOB_CJS = "**/*.cjs";
8
- const GLOB_TS = `**/*.${GLOB_TS_EXT}`;
9
- const GLOB_TSX = `**/*.${GLOB_TSX_EXT}`;
10
- const GLOB_ASTRO = "**/*.astro";
11
- const GLOB_TESTS = [
12
- `**/__tests__/**/*.${GLOB_SRC_EXT}`,
13
- `**/*.spec.${GLOB_SRC_EXT}`,
14
- `**/*.test.${GLOB_SRC_EXT}`,
15
- `**/*.bench.${GLOB_SRC_EXT}`,
16
- `**/*.benchmark.${GLOB_SRC_EXT}`
17
- ];
18
- const GLOB_TYPE_TESTS = [
19
- `**/*.test-d.${GLOB_TS_EXT}`,
20
- `**/*.test-d.${GLOB_TSX_EXT}`,
21
- `**/*.spec-d.${GLOB_TS_EXT}`,
22
- `**/*.spec-d.${GLOB_TSX_EXT}`
23
- ];
24
- const GLOB_PLAYWRIGHT = [`**/e2e/**/*.spec.${GLOB_SRC_EXT}`, `**/e2e/**/*.test.${GLOB_SRC_EXT}`];
25
- const GLOB_E2E = [
26
- ...GLOB_PLAYWRIGHT,
27
- `**/cypress/**/*.spec.${GLOB_SRC_EXT}`,
28
- `**/cypress/**/*.test.${GLOB_SRC_EXT}`
29
- ];
30
- const GLOB_NEXTJS = [
31
- GLOB_JS,
32
- GLOB_JSX,
33
- GLOB_TS,
34
- GLOB_TSX
35
- ];
36
- const GLOB_IGNORES = [
37
- "**/node_modules",
38
- "**/dist",
39
- "**/package-lock.json",
40
- "**/yarn.lock",
41
- "**/pnpm-lock.yaml",
42
- "**/bun.lockb",
43
- "**/output",
44
- "**/coverage",
45
- "**/temp",
46
- "**/.temp",
47
- "**/tmp",
48
- "**/.tmp",
49
- "**/.history",
50
- "**/.vitepress/cache",
51
- "**/.nuxt",
52
- "**/.next",
53
- "**/.vercel",
54
- "**/.changeset",
55
- "**/.idea",
56
- "**/.cache",
57
- "**/.output",
58
- "**/.vite-inspect",
59
- "**/.yarn",
60
- "**/storybook-static",
61
- "**/.eslint-config-inspector",
62
- "**/playwright-report",
63
- "**/.astro",
64
- "**/.vinxi",
65
- "**/app.config.timestamp_*.js",
66
- "**/.tanstack",
67
- "**/.nitro",
68
- "**/CHANGELOG*.md",
69
- "**/*.min.*",
70
- "**/LICENSE*",
71
- "**/__snapshots__",
72
- "**/auto-import?(s).d.ts",
73
- "**/components.d.ts",
74
- "**/vite.config.ts.*.mjs",
75
- "**/*.gen.*",
76
- "!.storybook"
77
- ];
78
-
79
- //#endregion
80
- export { GLOB_JS as a, GLOB_PLAYWRIGHT as c, GLOB_TSX as d, GLOB_TYPE_TESTS as f, GLOB_IGNORES as i, GLOB_TESTS as l, GLOB_CJS as n, GLOB_JSX as o, GLOB_E2E as r, GLOB_NEXTJS as s, GLOB_ASTRO as t, GLOB_TS as u };