@jimmy.codes/eslint-config 6.2.2 → 6.4.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/README.md +34 -10
- package/dist/{astro-CqgWkoKy.js → astro-Cc3Rxusf.js} +9 -5
- package/dist/{constants-dep165g5.js → globs-CRO5v7xy.js} +27 -28
- package/dist/globs.d.ts +14 -0
- package/dist/globs.js +3 -0
- package/dist/{has-dependency-B3Fi8OzA.js → has-dependency-7vimNBSE.js} +1 -2
- package/dist/index.d.ts +14 -7
- package/dist/index.js +16 -11
- package/dist/{jest-CzZHXxA7.js → jest-BhHoh4EB.js} +1 -1
- package/dist/{nextjs-Bh8fqE_o.js → nextjs-X6g9xH_I.js} +1 -1
- package/dist/{playwright-CHYoYi52.js → playwright-Cyd4gThA.js} +1 -1
- package/dist/{react-w3cMDj2s.js → react-B3j6NZ4U.js} +3 -2
- package/dist/{tanstack-query-DF8OWtLq.js → tanstack-query-DqqVfxJs.js} +1 -1
- package/dist/{testing-library-XmNQWB2F.js → testing-library-lJsmjyFo.js} +1 -1
- package/dist/{typescript-DhqJ_65V.js → typescript-B4UNt8qM.js} +7 -2
- package/dist/{vitest-J--7DiIk.js → vitest-DpQEe80J.js} +1 -1
- package/package.json +16 -9
package/README.md
CHANGED
|
@@ -6,17 +6,18 @@
|
|
|
6
6
|
|
|
7
7
|
> A simple, modern ESLint config that covers most use cases.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Why Use This?
|
|
10
10
|
|
|
11
|
-
A strict
|
|
11
|
+
A strict but practical ESLint config that works out of the box, adapts to your stack, and enforces good patterns without getting in the way. It catches real bugs, reduces ambiguity, and keeps your codebase consistent.
|
|
12
12
|
|
|
13
|
-
- **Auto-detects
|
|
14
|
-
- **Prevents real issues
|
|
15
|
-
- **
|
|
16
|
-
- **
|
|
17
|
-
- **
|
|
18
|
-
- **
|
|
19
|
-
- **
|
|
13
|
+
- **Auto-detects your stack**: React, TypeScript, Astro, Next.js, Vitest, Jest, Playwright, Storybook, and TanStack Query.
|
|
14
|
+
- **Prevents real issues**: Prioritizes rules that catch bugs and unsafe patterns.
|
|
15
|
+
- **Prevents confusion**: Flags ambiguous code, confusing promise usage, shadowed variables, and unused exports.
|
|
16
|
+
- **Enforces consistency**: Standardizes imports, naming, coding style, and testing conventions.
|
|
17
|
+
- **Fast and lightweight**: Loads only what your project needs.
|
|
18
|
+
- **Zero-config start**: Install it, extend it, done.
|
|
19
|
+
- **Customizable**: Turn off or override rules per project or file.
|
|
20
|
+
- **Test-ready**: Works with Vitest, Jest, Playwright, and Testing Library.
|
|
20
21
|
|
|
21
22
|
---
|
|
22
23
|
|
|
@@ -35,7 +36,7 @@ pnpm add -D @jimmy.codes/eslint-config
|
|
|
35
36
|
|
|
36
37
|
Add this to `eslint.config.ts`:
|
|
37
38
|
|
|
38
|
-
```
|
|
39
|
+
```ts
|
|
39
40
|
import { defineConfig } from "@jimmy.codes/eslint-config";
|
|
40
41
|
|
|
41
42
|
export default defineConfig();
|
|
@@ -97,6 +98,29 @@ export default defineConfig({
|
|
|
97
98
|
});
|
|
98
99
|
```
|
|
99
100
|
|
|
101
|
+
Or you can import [globs](src/globs.ts) for overrides instead of writing your own:
|
|
102
|
+
|
|
103
|
+
```ts
|
|
104
|
+
import { GLOB_JS, GLOB_TS } from "@jimmy.codes/eslint-config/globs";
|
|
105
|
+
|
|
106
|
+
export default defineConfig({
|
|
107
|
+
overrides: [
|
|
108
|
+
{
|
|
109
|
+
files: [GLOB_JS],
|
|
110
|
+
rules: {
|
|
111
|
+
"prefer-spread": "error",
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
files: [GLOB_TS],
|
|
116
|
+
rules: {
|
|
117
|
+
"prefer-const": "error",
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
],
|
|
121
|
+
});
|
|
122
|
+
```
|
|
123
|
+
|
|
100
124
|
---
|
|
101
125
|
|
|
102
126
|
## Plugins Used
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { GLOB_ASTRO } from "./
|
|
1
|
+
import { GLOB_ASTRO } from "./globs-CRO5v7xy.js";
|
|
2
2
|
import { interopDefault } from "./interop-default-D4l3hsYQ.js";
|
|
3
3
|
import globals from "globals";
|
|
4
4
|
|
|
5
5
|
//#region src/configs/astro.ts
|
|
6
6
|
async function astroConfig() {
|
|
7
7
|
const files = [GLOB_ASTRO];
|
|
8
|
-
const { configs, parser:
|
|
8
|
+
const { configs: tsConfigs, parser: tsParser } = await import("typescript-eslint");
|
|
9
9
|
const [astroPlugin, astroParser, jsxA11yPlugin] = await Promise.all([
|
|
10
10
|
import("eslint-plugin-astro"),
|
|
11
11
|
import("astro-eslint-parser"),
|
|
@@ -23,7 +23,7 @@ async function astroConfig() {
|
|
|
23
23
|
parser: astroParser,
|
|
24
24
|
parserOptions: {
|
|
25
25
|
extraFileExtensions: [".astro"],
|
|
26
|
-
parser:
|
|
26
|
+
parser: tsParser
|
|
27
27
|
},
|
|
28
28
|
sourceType: "module"
|
|
29
29
|
},
|
|
@@ -48,9 +48,13 @@ async function astroConfig() {
|
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
50
|
files,
|
|
51
|
-
languageOptions: { parserOptions:
|
|
51
|
+
languageOptions: { parserOptions: {
|
|
52
|
+
program: null,
|
|
53
|
+
project: false,
|
|
54
|
+
projectService: false
|
|
55
|
+
} },
|
|
52
56
|
name: "jimmy.codes/astro/disable-type-checked",
|
|
53
|
-
rules:
|
|
57
|
+
rules: tsConfigs.disableTypeChecked.rules
|
|
54
58
|
},
|
|
55
59
|
{
|
|
56
60
|
name: "jimmy.codes/astro/imports",
|
|
@@ -1,5 +1,30 @@
|
|
|
1
|
-
//#region src/
|
|
1
|
+
//#region src/globs.ts
|
|
2
2
|
const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
3
|
+
const GLOB_JS = "**/*.?([cm])js";
|
|
4
|
+
const GLOB_JSX = "**/*.?([cm])jsx";
|
|
5
|
+
const GLOB_CJS = "**/*.cjs";
|
|
6
|
+
const GLOB_TS = "**/*.?([cm])ts";
|
|
7
|
+
const GLOB_TSX = "**/*.?([cm])tsx";
|
|
8
|
+
const GLOB_ASTRO = "**/*.astro";
|
|
9
|
+
const GLOB_TESTS = [
|
|
10
|
+
`**/__tests__/**/*.${GLOB_SRC_EXT}`,
|
|
11
|
+
`**/*.spec.${GLOB_SRC_EXT}`,
|
|
12
|
+
`**/*.test.${GLOB_SRC_EXT}`,
|
|
13
|
+
`**/*.bench.${GLOB_SRC_EXT}`,
|
|
14
|
+
`**/*.benchmark.${GLOB_SRC_EXT}`
|
|
15
|
+
];
|
|
16
|
+
const GLOB_PLAYWRIGHT = [`**/e2e/**/*.spec.${GLOB_SRC_EXT}`, `**/e2e/**/*.test.${GLOB_SRC_EXT}`];
|
|
17
|
+
const GLOB_E2E = [
|
|
18
|
+
...GLOB_PLAYWRIGHT,
|
|
19
|
+
`**/cypress/**/*.spec.${GLOB_SRC_EXT}`,
|
|
20
|
+
`**/cypress/**/*.test.${GLOB_SRC_EXT}`
|
|
21
|
+
];
|
|
22
|
+
const GLOB_NEXTJS = [
|
|
23
|
+
GLOB_JS,
|
|
24
|
+
GLOB_JSX,
|
|
25
|
+
GLOB_TS,
|
|
26
|
+
GLOB_TSX
|
|
27
|
+
];
|
|
3
28
|
const GLOB_IGNORES = [
|
|
4
29
|
"**/node_modules",
|
|
5
30
|
"**/dist",
|
|
@@ -42,32 +67,6 @@ const GLOB_IGNORES = [
|
|
|
42
67
|
"**/*.gen.*",
|
|
43
68
|
"!.storybook"
|
|
44
69
|
];
|
|
45
|
-
const GLOB_JS = "**/*.?([cm])js";
|
|
46
|
-
const GLOB_JSX = "**/*.?([cm])jsx";
|
|
47
|
-
const GLOB_TS = "**/*.?([cm])ts";
|
|
48
|
-
const GLOB_TSX = "**/*.?([cm])tsx";
|
|
49
|
-
const GLOB_TESTS = [
|
|
50
|
-
`**/__tests__/**/*.${GLOB_SRC_EXT}`,
|
|
51
|
-
`**/*.spec.${GLOB_SRC_EXT}`,
|
|
52
|
-
`**/*.test.${GLOB_SRC_EXT}`,
|
|
53
|
-
`**/*.bench.${GLOB_SRC_EXT}`,
|
|
54
|
-
`**/*.benchmark.${GLOB_SRC_EXT}`
|
|
55
|
-
];
|
|
56
|
-
const GLOB_PLAYWRIGHT = [`**/e2e/**/*.spec.${GLOB_SRC_EXT}`, `**/e2e/**/*.test.${GLOB_SRC_EXT}`];
|
|
57
|
-
const GLOB_E2E = [
|
|
58
|
-
...GLOB_PLAYWRIGHT,
|
|
59
|
-
`**/cypress/**/*.spec.${GLOB_SRC_EXT}`,
|
|
60
|
-
`**/cypress/**/*.test.${GLOB_SRC_EXT}`
|
|
61
|
-
];
|
|
62
|
-
const GLOB_NEXTJS = [
|
|
63
|
-
GLOB_JS,
|
|
64
|
-
GLOB_JSX,
|
|
65
|
-
GLOB_TS,
|
|
66
|
-
GLOB_TSX
|
|
67
|
-
];
|
|
68
|
-
const GLOB_CJS = "**/*.cjs";
|
|
69
|
-
const GLOB_ASTRO = "**/*.astro";
|
|
70
|
-
const TESTING_LIBRARY_FAMILY = ["@testing-library/react"];
|
|
71
70
|
|
|
72
71
|
//#endregion
|
|
73
|
-
export { GLOB_ASTRO, GLOB_CJS, GLOB_E2E, GLOB_IGNORES, GLOB_JS, GLOB_JSX, GLOB_NEXTJS, GLOB_PLAYWRIGHT, GLOB_TESTS,
|
|
72
|
+
export { GLOB_ASTRO, GLOB_CJS, GLOB_E2E, GLOB_IGNORES, GLOB_JS, GLOB_JSX, GLOB_NEXTJS, GLOB_PLAYWRIGHT, GLOB_TESTS, GLOB_TS, GLOB_TSX };
|
package/dist/globs.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/globs.d.ts
|
|
2
|
+
declare const GLOB_JS = "**/*.?([cm])js";
|
|
3
|
+
declare const GLOB_JSX = "**/*.?([cm])jsx";
|
|
4
|
+
declare const GLOB_CJS = "**/*.cjs";
|
|
5
|
+
declare const GLOB_TS = "**/*.?([cm])ts";
|
|
6
|
+
declare const GLOB_TSX = "**/*.?([cm])tsx";
|
|
7
|
+
declare const GLOB_ASTRO = "**/*.astro";
|
|
8
|
+
declare const GLOB_TESTS: readonly ["**/__tests__/**/*.?([cm])[jt]s?(x)", "**/*.spec.?([cm])[jt]s?(x)", "**/*.test.?([cm])[jt]s?(x)", "**/*.bench.?([cm])[jt]s?(x)", "**/*.benchmark.?([cm])[jt]s?(x)"];
|
|
9
|
+
declare const GLOB_PLAYWRIGHT: readonly ["**/e2e/**/*.spec.?([cm])[jt]s?(x)", "**/e2e/**/*.test.?([cm])[jt]s?(x)"];
|
|
10
|
+
declare const GLOB_E2E: readonly ["**/e2e/**/*.spec.?([cm])[jt]s?(x)", "**/e2e/**/*.test.?([cm])[jt]s?(x)", "**/cypress/**/*.spec.?([cm])[jt]s?(x)", "**/cypress/**/*.test.?([cm])[jt]s?(x)"];
|
|
11
|
+
declare const GLOB_NEXTJS: readonly ["**/*.?([cm])js", "**/*.?([cm])jsx", "**/*.?([cm])ts", "**/*.?([cm])tsx"];
|
|
12
|
+
declare const GLOB_IGNORES: readonly ["**/node_modules", "**/dist", "**/package-lock.json", "**/yarn.lock", "**/pnpm-lock.yaml", "**/bun.lockb", "**/output", "**/coverage", "**/temp", "**/.temp", "**/tmp", "**/.tmp", "**/.history", "**/.vitepress/cache", "**/.nuxt", "**/.next", "**/.vercel", "**/.changeset", "**/.idea", "**/.cache", "**/.output", "**/.vite-inspect", "**/.yarn", "**/storybook-static", "**/.eslint-config-inspector", "**/playwright-report", "**/.astro", "**/.vinxi", "**/app.config.timestamp_*.js", "**/.tanstack", "**/.nitro", "**/CHANGELOG*.md", "**/*.min.*", "**/LICENSE*", "**/__snapshots__", "**/auto-import?(s).d.ts", "**/components.d.ts", "**/vite.config.ts.*.mjs", "**/*.gen.*", "!.storybook"];
|
|
13
|
+
//#endregion
|
|
14
|
+
export { GLOB_ASTRO, GLOB_CJS, GLOB_E2E, GLOB_IGNORES, GLOB_JS, GLOB_JSX, GLOB_NEXTJS, GLOB_PLAYWRIGHT, GLOB_TESTS, GLOB_TS, GLOB_TSX };
|
package/dist/globs.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { GLOB_ASTRO, GLOB_CJS, GLOB_E2E, GLOB_IGNORES, GLOB_JS, GLOB_JSX, GLOB_NEXTJS, GLOB_PLAYWRIGHT, GLOB_TESTS, GLOB_TS, GLOB_TSX } from "./globs-CRO5v7xy.js";
|
|
2
|
+
|
|
3
|
+
export { GLOB_ASTRO, GLOB_CJS, GLOB_E2E, GLOB_IGNORES, GLOB_JS, GLOB_JSX, GLOB_NEXTJS, GLOB_PLAYWRIGHT, GLOB_TESTS, GLOB_TS, GLOB_TSX };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { TESTING_LIBRARY_FAMILY } from "./constants-dep165g5.js";
|
|
2
1
|
import { isPackageExists } from "local-pkg";
|
|
3
2
|
|
|
4
3
|
//#region src/utils/has-dependency.ts
|
|
@@ -15,7 +14,7 @@ const hasJest = () => {
|
|
|
15
14
|
return isPackageExists("jest");
|
|
16
15
|
};
|
|
17
16
|
const hasTestingLibrary = () => {
|
|
18
|
-
return
|
|
17
|
+
return ["@testing-library/react"].some((pkg) => {
|
|
19
18
|
return isPackageExists(pkg);
|
|
20
19
|
});
|
|
21
20
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -115,6 +115,11 @@ interface RuleOptions {
|
|
|
115
115
|
* @see https://eslint-react.xyz/docs/rules/dom-no-script-url
|
|
116
116
|
*/
|
|
117
117
|
'@eslint-react/dom/no-script-url'?: Linter.RuleEntry<[]>;
|
|
118
|
+
/**
|
|
119
|
+
* Disallows the use of string style prop.
|
|
120
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-string-style-prop
|
|
121
|
+
*/
|
|
122
|
+
'@eslint-react/dom/no-string-style-prop'?: Linter.RuleEntry<[]>;
|
|
118
123
|
/**
|
|
119
124
|
* Disallow unknown `DOM` property.
|
|
120
125
|
* @see https://eslint-react.xyz/docs/rules/dom-no-unknown-property
|
|
@@ -14408,14 +14413,16 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
|
|
|
14408
14413
|
//#endregion
|
|
14409
14414
|
//#region src/types.d.ts
|
|
14410
14415
|
type Rules = RuleOptions;
|
|
14411
|
-
type
|
|
14412
|
-
|
|
14413
|
-
|
|
14414
|
-
|
|
14415
|
-
|
|
14416
|
-
|
|
14416
|
+
type Base = Linter.Config<Linter.RulesRecord & Rules>;
|
|
14417
|
+
type MaybeReadonly<T> = Readonly<T> | T;
|
|
14418
|
+
type Override<T, R> = Omit<T, keyof R> & R;
|
|
14419
|
+
type Prettify<T> = { [K in keyof T]: T[K] } & {};
|
|
14420
|
+
interface LinterConfigOverrides {
|
|
14421
|
+
files?: MaybeReadonly<Base["files"]>;
|
|
14422
|
+
ignores?: MaybeReadonly<Base["ignores"]>;
|
|
14417
14423
|
plugins?: Record<string, unknown>;
|
|
14418
|
-
}
|
|
14424
|
+
}
|
|
14425
|
+
type TypedConfigItem = Prettify<Override<Base, LinterConfigOverrides>>;
|
|
14419
14426
|
interface Options {
|
|
14420
14427
|
/**
|
|
14421
14428
|
* Are astro rules enabled?
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GLOB_CJS, GLOB_IGNORES, GLOB_TESTS } from "./
|
|
2
|
-
import { hasAstro, hasJest, hasNext, hasPlaywright, hasReact, hasReactQuery, hasStorybook, hasTestingLibrary, hasTypescript, hasVitest } from "./has-dependency-
|
|
1
|
+
import { GLOB_CJS, GLOB_IGNORES, GLOB_TESTS } from "./globs-CRO5v7xy.js";
|
|
2
|
+
import { hasAstro, hasJest, hasNext, hasPlaywright, hasReact, hasReactQuery, hasStorybook, hasTestingLibrary, hasTypescript, hasVitest } from "./has-dependency-7vimNBSE.js";
|
|
3
3
|
import globals from "globals";
|
|
4
4
|
import comments from "@eslint-community/eslint-plugin-eslint-comments/configs";
|
|
5
5
|
import { createTypeScriptImportResolver } from "eslint-import-resolver-typescript";
|
|
@@ -111,9 +111,13 @@ const additionalRules = {
|
|
|
111
111
|
"curly": ["error", "all"],
|
|
112
112
|
"default-case": "error",
|
|
113
113
|
"default-case-last": "error",
|
|
114
|
+
"eqeqeq": "error",
|
|
114
115
|
"no-console": "warn",
|
|
116
|
+
"no-div-regex": "error",
|
|
117
|
+
"no-else-return": "error",
|
|
115
118
|
"no-implicit-coercion": "error",
|
|
116
119
|
"no-implicit-globals": "error",
|
|
120
|
+
"no-lonely-if": "error",
|
|
117
121
|
"no-loop-func": "error",
|
|
118
122
|
"no-magic-numbers": ["error", { ignore: [
|
|
119
123
|
0,
|
|
@@ -129,6 +133,7 @@ const additionalRules = {
|
|
|
129
133
|
"no-throw-literal": "error",
|
|
130
134
|
"no-unassigned-vars": "error",
|
|
131
135
|
"no-unmodified-loop-condition": "error",
|
|
136
|
+
"no-unneeded-ternary": "error",
|
|
132
137
|
"no-unreachable-loop": "error",
|
|
133
138
|
"no-use-before-define": ["error", {
|
|
134
139
|
allowNamedExports: false,
|
|
@@ -471,16 +476,16 @@ const defineConfig = async ({ astro = false, autoDetect = true, ignores = [], je
|
|
|
471
476
|
stylisticConfig()
|
|
472
477
|
];
|
|
473
478
|
const featureConfigs = await Promise.all([
|
|
474
|
-
isTypescriptEnabled && unwrap(import("./typescript-
|
|
475
|
-
isReactEnabled && unwrap(import("./react-
|
|
476
|
-
isTanstackQueryEnabled && unwrap(import("./tanstack-query-
|
|
477
|
-
isAstroEnabled && unwrap(import("./astro-
|
|
478
|
-
isJestEnabled && unwrap(import("./jest-
|
|
479
|
-
isVitestEnabled && unwrap(import("./vitest-
|
|
480
|
-
isTestingLibraryEnabled && unwrap(import("./testing-library-
|
|
481
|
-
isPlaywrightEnabled && unwrap(import("./playwright-
|
|
479
|
+
isTypescriptEnabled && unwrap(import("./typescript-B4UNt8qM.js")),
|
|
480
|
+
isReactEnabled && unwrap(import("./react-B3j6NZ4U.js")),
|
|
481
|
+
isTanstackQueryEnabled && unwrap(import("./tanstack-query-DqqVfxJs.js")),
|
|
482
|
+
isAstroEnabled && unwrap(import("./astro-Cc3Rxusf.js")),
|
|
483
|
+
isJestEnabled && unwrap(import("./jest-BhHoh4EB.js")),
|
|
484
|
+
isVitestEnabled && unwrap(import("./vitest-DpQEe80J.js")),
|
|
485
|
+
isTestingLibraryEnabled && unwrap(import("./testing-library-lJsmjyFo.js")),
|
|
486
|
+
isPlaywrightEnabled && unwrap(import("./playwright-Cyd4gThA.js")),
|
|
482
487
|
isStorybookEnabled && unwrap(import("./storybook-BO4plVPp.js")),
|
|
483
|
-
isNextjsEnabled && unwrap(import("./nextjs-
|
|
488
|
+
isNextjsEnabled && unwrap(import("./nextjs-X6g9xH_I.js"))
|
|
484
489
|
]);
|
|
485
490
|
return [
|
|
486
491
|
...baseConfigs,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GLOB_JSX, GLOB_TSX } from "./
|
|
2
|
-
import { hasNext, hasTypescript, hasVite } from "./has-dependency-
|
|
1
|
+
import { GLOB_JSX, GLOB_TSX } from "./globs-CRO5v7xy.js";
|
|
2
|
+
import { hasNext, hasTypescript, hasVite } from "./has-dependency-7vimNBSE.js";
|
|
3
3
|
import { interopDefault } from "./interop-default-D4l3hsYQ.js";
|
|
4
4
|
import { upwarn } from "./upwarn-C7t3ub-R.js";
|
|
5
5
|
import globals from "globals";
|
|
@@ -29,6 +29,7 @@ const reactRules = async () => {
|
|
|
29
29
|
return {
|
|
30
30
|
...jsxA11yPlugin.configs.recommended.rules,
|
|
31
31
|
...upwarn(reactPluginRules),
|
|
32
|
+
"@eslint-react/dom/no-string-style-prop": "error",
|
|
32
33
|
"@eslint-react/hooks-extra/no-direct-set-state-in-use-effect": "error",
|
|
33
34
|
"@eslint-react/hooks-extra/no-direct-set-state-in-use-layout-effect": "error",
|
|
34
35
|
"@eslint-react/jsx-key-before-spread": "error",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GLOB_JS, GLOB_JSX, GLOB_TESTS } from "./
|
|
1
|
+
import { GLOB_JS, GLOB_JSX, GLOB_TESTS } from "./globs-CRO5v7xy.js";
|
|
2
2
|
|
|
3
3
|
//#region src/rules/typescript.ts
|
|
4
4
|
const disabledEslintRules = { "no-use-before-define": "off" };
|
|
@@ -47,7 +47,12 @@ async function typescriptConfig() {
|
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
files: [GLOB_JS, GLOB_JSX],
|
|
50
|
-
...configs.disableTypeChecked
|
|
50
|
+
...configs.disableTypeChecked,
|
|
51
|
+
languageOptions: { parserOptions: {
|
|
52
|
+
program: null,
|
|
53
|
+
project: false,
|
|
54
|
+
projectService: false
|
|
55
|
+
} }
|
|
51
56
|
},
|
|
52
57
|
{
|
|
53
58
|
files: GLOB_TESTS,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jimmy.codes/eslint-config",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.4.0",
|
|
4
4
|
"description": "A simple, modern ESLint config that covers most use cases.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -24,7 +24,14 @@
|
|
|
24
24
|
"sideEffects": false,
|
|
25
25
|
"type": "module",
|
|
26
26
|
"exports": {
|
|
27
|
-
".":
|
|
27
|
+
".": {
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"default": "./dist/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./globs": {
|
|
32
|
+
"types": "./dist/globs.d.ts",
|
|
33
|
+
"default": "./dist/globs.js"
|
|
34
|
+
}
|
|
28
35
|
},
|
|
29
36
|
"main": "./dist/index.js",
|
|
30
37
|
"types": "./dist/index.d.ts",
|
|
@@ -33,14 +40,14 @@
|
|
|
33
40
|
],
|
|
34
41
|
"dependencies": {
|
|
35
42
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
36
|
-
"@eslint-react/eslint-plugin": "2.0.0-
|
|
43
|
+
"@eslint-react/eslint-plugin": "2.0.0-beta.40",
|
|
37
44
|
"@eslint/js": "^9.33.0",
|
|
38
|
-
"@next/eslint-plugin-next": "^15.
|
|
45
|
+
"@next/eslint-plugin-next": "^15.5.0",
|
|
39
46
|
"@stylistic/eslint-plugin": "^5.2.3",
|
|
40
47
|
"@tanstack/eslint-plugin-query": "^5.83.1",
|
|
41
48
|
"@types/eslint": "9.6.1",
|
|
42
|
-
"@typescript-eslint/parser": "^8.
|
|
43
|
-
"@typescript-eslint/utils": "^8.
|
|
49
|
+
"@typescript-eslint/parser": "^8.40.0",
|
|
50
|
+
"@typescript-eslint/utils": "^8.40.0",
|
|
44
51
|
"@vitest/eslint-plugin": "^1.3.4",
|
|
45
52
|
"astro-eslint-parser": "^1.2.2",
|
|
46
53
|
"eslint-config-prettier": "^10.1.8",
|
|
@@ -49,7 +56,7 @@
|
|
|
49
56
|
"eslint-plugin-import-x": "^4.16.1",
|
|
50
57
|
"eslint-plugin-jest": "^29.0.1",
|
|
51
58
|
"eslint-plugin-jest-dom": "^5.5.0",
|
|
52
|
-
"eslint-plugin-jsdoc": "^54.
|
|
59
|
+
"eslint-plugin-jsdoc": "^54.1.1",
|
|
53
60
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
54
61
|
"eslint-plugin-n": "^17.21.3",
|
|
55
62
|
"eslint-plugin-perfectionist": "^4.15.0",
|
|
@@ -62,8 +69,8 @@
|
|
|
62
69
|
"eslint-plugin-testing-library": "^7.6.6",
|
|
63
70
|
"eslint-plugin-unicorn": "^60.0.0",
|
|
64
71
|
"globals": "^16.3.0",
|
|
65
|
-
"local-pkg": "^1.1.
|
|
66
|
-
"typescript-eslint": "^8.
|
|
72
|
+
"local-pkg": "^1.1.2",
|
|
73
|
+
"typescript-eslint": "^8.40.0"
|
|
67
74
|
},
|
|
68
75
|
"peerDependencies": {
|
|
69
76
|
"eslint": "^9.10.0"
|