@jimmy.codes/eslint-config 6.2.2 → 6.3.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 +12 -11
- package/dist/index.d.ts +5 -0
- package/dist/index.js +6 -1
- package/dist/{react-w3cMDj2s.js → react-CzWH0eX9.js} +1 -0
- package/package.json +3 -3
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
|
-
##
|
|
10
|
-
|
|
11
|
-
A strict
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
9
|
+
## Why Use This?
|
|
10
|
+
|
|
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
|
+
|
|
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
|
|
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
|
package/dist/index.js
CHANGED
|
@@ -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,
|
|
@@ -472,7 +477,7 @@ const defineConfig = async ({ astro = false, autoDetect = true, ignores = [], je
|
|
|
472
477
|
];
|
|
473
478
|
const featureConfigs = await Promise.all([
|
|
474
479
|
isTypescriptEnabled && unwrap(import("./typescript-DhqJ_65V.js")),
|
|
475
|
-
isReactEnabled && unwrap(import("./react-
|
|
480
|
+
isReactEnabled && unwrap(import("./react-CzWH0eX9.js")),
|
|
476
481
|
isTanstackQueryEnabled && unwrap(import("./tanstack-query-DF8OWtLq.js")),
|
|
477
482
|
isAstroEnabled && unwrap(import("./astro-CqgWkoKy.js")),
|
|
478
483
|
isJestEnabled && unwrap(import("./jest-CzZHXxA7.js")),
|
|
@@ -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",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jimmy.codes/eslint-config",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.3.0",
|
|
4
4
|
"description": "A simple, modern ESLint config that covers most use cases.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
36
|
-
"@eslint-react/eslint-plugin": "2.0.0-
|
|
36
|
+
"@eslint-react/eslint-plugin": "2.0.0-beta.32",
|
|
37
37
|
"@eslint/js": "^9.33.0",
|
|
38
38
|
"@next/eslint-plugin-next": "^15.4.6",
|
|
39
39
|
"@stylistic/eslint-plugin": "^5.2.3",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"eslint-plugin-import-x": "^4.16.1",
|
|
50
50
|
"eslint-plugin-jest": "^29.0.1",
|
|
51
51
|
"eslint-plugin-jest-dom": "^5.5.0",
|
|
52
|
-
"eslint-plugin-jsdoc": "^54.
|
|
52
|
+
"eslint-plugin-jsdoc": "^54.1.0",
|
|
53
53
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
54
54
|
"eslint-plugin-n": "^17.21.3",
|
|
55
55
|
"eslint-plugin-perfectionist": "^4.15.0",
|