@abinnovision/eslint-config-react 3.2.0-beta.1 → 3.2.1-beta.1
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/CHANGELOG.md +7 -0
- package/dist/configs/flavour-tailwind.cjs +36 -1
- package/dist/configs/flavour-tailwind.d.cts +1 -3
- package/dist/configs/flavour-tailwind.d.mts +1 -3
- package/dist/configs/flavour-tailwind.mjs +35 -0
- package/dist/configs/index.cjs +4 -2
- package/dist/configs/index.mjs +3 -3
- package/dist/configs/react.cjs +122 -2
- package/dist/configs/react.d.cts +1 -3
- package/dist/configs/react.d.mts +1 -3
- package/dist/configs/react.mjs +120 -0
- package/package.json +21 -8
- package/dist/configs/index.d.mts +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.2.0](https://github.com/abinnovision/js-commons/compare/eslint-config-react-v3.1.1...eslint-config-react-v3.2.0) (2026-04-28)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* support ESLint 10 in shared configs ([#599](https://github.com/abinnovision/js-commons/issues/599)) ([4de4c56](https://github.com/abinnovision/js-commons/commit/4de4c562df5b43b15de7b52637c7d82bd15e498f))
|
|
9
|
+
|
|
3
10
|
## [3.1.1](https://github.com/abinnovision/js-commons/compare/eslint-config-react-v3.1.0...eslint-config-react-v3.1.1) (2026-04-05)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
|
|
2
2
|
let eslint_config = require("eslint/config");
|
|
3
3
|
let eslint_plugin_better_tailwindcss = require("eslint-plugin-better-tailwindcss");
|
|
4
|
-
eslint_plugin_better_tailwindcss = require_runtime.__toESM(eslint_plugin_better_tailwindcss);
|
|
4
|
+
eslint_plugin_better_tailwindcss = require_runtime.__toESM(eslint_plugin_better_tailwindcss, 1);
|
|
5
5
|
//#region src/configs/flavour-tailwind.ts
|
|
6
6
|
/**
|
|
7
7
|
* ESLint configuration for Tailwind CSS.
|
|
@@ -12,16 +12,51 @@ const config = (0, eslint_config.defineConfig)([{
|
|
|
12
12
|
files: ["**/*.{js,jsx,ts,tsx}"],
|
|
13
13
|
plugins: { "better-tailwindcss": eslint_plugin_better_tailwindcss.default },
|
|
14
14
|
rules: {
|
|
15
|
+
/**
|
|
16
|
+
* Enforce consistent line wrapping.
|
|
17
|
+
*
|
|
18
|
+
* @see https://github.com/schoero/eslint-plugin-better-tailwindcss
|
|
19
|
+
*/
|
|
15
20
|
"better-tailwindcss/enforce-consistent-line-wrapping": ["warn", {
|
|
16
21
|
preferSingleLine: true,
|
|
17
22
|
indent: "tab",
|
|
18
23
|
strictness: "loose"
|
|
19
24
|
}],
|
|
25
|
+
/**
|
|
26
|
+
* Enforce consistent class order.
|
|
27
|
+
*
|
|
28
|
+
* @see https://github.com/schoero/eslint-plugin-better-tailwindcss
|
|
29
|
+
*/
|
|
20
30
|
"better-tailwindcss/enforce-consistent-class-order": "warn",
|
|
31
|
+
/**
|
|
32
|
+
* Enforce shorthand classes.
|
|
33
|
+
*
|
|
34
|
+
* @see https://github.com/schoero/eslint-plugin-better-tailwindcss
|
|
35
|
+
*/
|
|
21
36
|
"better-tailwindcss/enforce-shorthand-classes": "warn",
|
|
37
|
+
/**
|
|
38
|
+
* Remove duplicate classes.
|
|
39
|
+
*
|
|
40
|
+
* @see https://github.com/schoero/eslint-plugin-better-tailwindcss
|
|
41
|
+
*/
|
|
22
42
|
"better-tailwindcss/no-duplicate-classes": "warn",
|
|
43
|
+
/**
|
|
44
|
+
* Disallow unnecessary whitespace.
|
|
45
|
+
*
|
|
46
|
+
* @see https://github.com/schoero/eslint-plugin-better-tailwindcss
|
|
47
|
+
*/
|
|
23
48
|
"better-tailwindcss/no-unnecessary-whitespace": "warn",
|
|
49
|
+
/**
|
|
50
|
+
* Report unregistered classes.
|
|
51
|
+
*
|
|
52
|
+
* @see https://github.com/schoero/eslint-plugin-better-tailwindcss
|
|
53
|
+
*/
|
|
24
54
|
"better-tailwindcss/no-unknown-classes": ["warn", { detectComponentClasses: true }],
|
|
55
|
+
/**
|
|
56
|
+
* Report conflicting classes.
|
|
57
|
+
*
|
|
58
|
+
* @see https://github.com/schoero/eslint-plugin-better-tailwindcss
|
|
59
|
+
*/
|
|
25
60
|
"better-tailwindcss/no-conflicting-classes": "error"
|
|
26
61
|
}
|
|
27
62
|
}]);
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import * as eslint_config0 from "eslint/config";
|
|
2
|
-
|
|
3
1
|
//#region src/configs/flavour-tailwind.d.ts
|
|
4
2
|
/**
|
|
5
3
|
* ESLint configuration for Tailwind CSS.
|
|
6
4
|
*
|
|
7
5
|
* Note that this configuration include stylistic rules.
|
|
8
6
|
*/
|
|
9
|
-
declare const config:
|
|
7
|
+
declare const config: import("eslint/config").Config[];
|
|
10
8
|
//#endregion
|
|
11
9
|
export { config };
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import * as eslint_config0 from "eslint/config";
|
|
2
|
-
|
|
3
1
|
//#region src/configs/flavour-tailwind.d.ts
|
|
4
2
|
/**
|
|
5
3
|
* ESLint configuration for Tailwind CSS.
|
|
6
4
|
*
|
|
7
5
|
* Note that this configuration include stylistic rules.
|
|
8
6
|
*/
|
|
9
|
-
declare const config:
|
|
7
|
+
declare const config: import("eslint/config").Config[];
|
|
10
8
|
//#endregion
|
|
11
9
|
export { config };
|
|
@@ -10,16 +10,51 @@ const config = defineConfig([{
|
|
|
10
10
|
files: ["**/*.{js,jsx,ts,tsx}"],
|
|
11
11
|
plugins: { "better-tailwindcss": betterTailwindcss },
|
|
12
12
|
rules: {
|
|
13
|
+
/**
|
|
14
|
+
* Enforce consistent line wrapping.
|
|
15
|
+
*
|
|
16
|
+
* @see https://github.com/schoero/eslint-plugin-better-tailwindcss
|
|
17
|
+
*/
|
|
13
18
|
"better-tailwindcss/enforce-consistent-line-wrapping": ["warn", {
|
|
14
19
|
preferSingleLine: true,
|
|
15
20
|
indent: "tab",
|
|
16
21
|
strictness: "loose"
|
|
17
22
|
}],
|
|
23
|
+
/**
|
|
24
|
+
* Enforce consistent class order.
|
|
25
|
+
*
|
|
26
|
+
* @see https://github.com/schoero/eslint-plugin-better-tailwindcss
|
|
27
|
+
*/
|
|
18
28
|
"better-tailwindcss/enforce-consistent-class-order": "warn",
|
|
29
|
+
/**
|
|
30
|
+
* Enforce shorthand classes.
|
|
31
|
+
*
|
|
32
|
+
* @see https://github.com/schoero/eslint-plugin-better-tailwindcss
|
|
33
|
+
*/
|
|
19
34
|
"better-tailwindcss/enforce-shorthand-classes": "warn",
|
|
35
|
+
/**
|
|
36
|
+
* Remove duplicate classes.
|
|
37
|
+
*
|
|
38
|
+
* @see https://github.com/schoero/eslint-plugin-better-tailwindcss
|
|
39
|
+
*/
|
|
20
40
|
"better-tailwindcss/no-duplicate-classes": "warn",
|
|
41
|
+
/**
|
|
42
|
+
* Disallow unnecessary whitespace.
|
|
43
|
+
*
|
|
44
|
+
* @see https://github.com/schoero/eslint-plugin-better-tailwindcss
|
|
45
|
+
*/
|
|
21
46
|
"better-tailwindcss/no-unnecessary-whitespace": "warn",
|
|
47
|
+
/**
|
|
48
|
+
* Report unregistered classes.
|
|
49
|
+
*
|
|
50
|
+
* @see https://github.com/schoero/eslint-plugin-better-tailwindcss
|
|
51
|
+
*/
|
|
22
52
|
"better-tailwindcss/no-unknown-classes": ["warn", { detectComponentClasses: true }],
|
|
53
|
+
/**
|
|
54
|
+
* Report conflicting classes.
|
|
55
|
+
*
|
|
56
|
+
* @see https://github.com/schoero/eslint-plugin-better-tailwindcss
|
|
57
|
+
*/
|
|
23
58
|
"better-tailwindcss/no-conflicting-classes": "error"
|
|
24
59
|
}
|
|
25
60
|
}]);
|
package/dist/configs/index.cjs
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
require("./react.cjs");
|
|
2
|
-
require("./flavour-tailwind.cjs");
|
|
1
|
+
const require_react = require("./react.cjs");
|
|
2
|
+
const require_flavour_tailwind = require("./flavour-tailwind.cjs");
|
|
3
|
+
exports.react = require_react.config;
|
|
4
|
+
exports.tailwind = require_flavour_tailwind.config;
|
package/dist/configs/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./react.mjs";
|
|
2
|
-
import "./flavour-tailwind.mjs";
|
|
3
|
-
export {};
|
|
1
|
+
import { config } from "./react.mjs";
|
|
2
|
+
import { config as config$1 } from "./flavour-tailwind.mjs";
|
|
3
|
+
export { config as react, config$1 as tailwind };
|
package/dist/configs/react.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
|
|
2
2
|
let _eslint_react_eslint_plugin = require("@eslint-react/eslint-plugin");
|
|
3
|
-
_eslint_react_eslint_plugin = require_runtime.__toESM(_eslint_react_eslint_plugin);
|
|
3
|
+
_eslint_react_eslint_plugin = require_runtime.__toESM(_eslint_react_eslint_plugin, 1);
|
|
4
4
|
let eslint_config = require("eslint/config");
|
|
5
5
|
let eslint_plugin_react_hooks = require("eslint-plugin-react-hooks");
|
|
6
|
-
eslint_plugin_react_hooks = require_runtime.__toESM(eslint_plugin_react_hooks);
|
|
6
|
+
eslint_plugin_react_hooks = require_runtime.__toESM(eslint_plugin_react_hooks, 1);
|
|
7
7
|
//#region src/configs/react.ts
|
|
8
8
|
const { configs: _, ...eslintReactHooksPlugin } = eslint_plugin_react_hooks.default;
|
|
9
9
|
const config = (0, eslint_config.defineConfig)([{
|
|
@@ -12,29 +12,149 @@ const config = (0, eslint_config.defineConfig)([{
|
|
|
12
12
|
languageOptions: { parserOptions: { ecmaFeatures: { jsx: true } } },
|
|
13
13
|
extends: [_eslint_react_eslint_plugin.default.configs.recommended],
|
|
14
14
|
rules: {
|
|
15
|
+
/**
|
|
16
|
+
* Enforce Rules of Hooks.
|
|
17
|
+
*
|
|
18
|
+
* @see https://react.dev/reference/react/hooks#rules-of-hooks
|
|
19
|
+
*/
|
|
15
20
|
"react-hooks/rules-of-hooks": "error",
|
|
21
|
+
/**
|
|
22
|
+
* Verify dependencies array in hooks.
|
|
23
|
+
*
|
|
24
|
+
* @see https://react.dev/reference/react/hooks#rules-of-hooks
|
|
25
|
+
*/
|
|
16
26
|
"react-hooks/exhaustive-deps": "warn",
|
|
27
|
+
/**
|
|
28
|
+
* Disallow dangerouslySetInnerHTML.
|
|
29
|
+
*
|
|
30
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml
|
|
31
|
+
*/
|
|
17
32
|
"@eslint-react/dom/no-dangerously-set-innerhtml": "error",
|
|
33
|
+
/**
|
|
34
|
+
* Disallow dangerouslySetInnerHTML with children.
|
|
35
|
+
*
|
|
36
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml-with-children
|
|
37
|
+
*/
|
|
18
38
|
"@eslint-react/dom/no-dangerously-set-innerhtml-with-children": "error",
|
|
39
|
+
/**
|
|
40
|
+
* Disallow javascript: URLs.
|
|
41
|
+
*
|
|
42
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-script-url
|
|
43
|
+
*/
|
|
19
44
|
"@eslint-react/dom/no-script-url": "error",
|
|
45
|
+
/**
|
|
46
|
+
* Enforce security attributes on target="_blank" links.
|
|
47
|
+
*
|
|
48
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-target-blank
|
|
49
|
+
*/
|
|
20
50
|
"@eslint-react/dom/no-unsafe-target-blank": "error",
|
|
51
|
+
/**
|
|
52
|
+
* Require sandbox attribute on iframes.
|
|
53
|
+
*
|
|
54
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-missing-iframe-sandbox
|
|
55
|
+
*/
|
|
21
56
|
"@eslint-react/dom/no-missing-iframe-sandbox": "error",
|
|
57
|
+
/**
|
|
58
|
+
* Disallow unsafe iframe sandbox values.
|
|
59
|
+
*
|
|
60
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-iframe-sandbox
|
|
61
|
+
*/
|
|
22
62
|
"@eslint-react/dom/no-unsafe-iframe-sandbox": "error",
|
|
63
|
+
/**
|
|
64
|
+
* Prevent memory leaks from event listeners.
|
|
65
|
+
*
|
|
66
|
+
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-event-listener
|
|
67
|
+
*/
|
|
23
68
|
"@eslint-react/web-api/no-leaked-event-listener": "error",
|
|
69
|
+
/**
|
|
70
|
+
* Prevent memory leaks from intervals.
|
|
71
|
+
*
|
|
72
|
+
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-interval
|
|
73
|
+
*/
|
|
24
74
|
"@eslint-react/web-api/no-leaked-interval": "error",
|
|
75
|
+
/**
|
|
76
|
+
* Prevent memory leaks from timeouts.
|
|
77
|
+
*
|
|
78
|
+
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-timeout
|
|
79
|
+
*/
|
|
25
80
|
"@eslint-react/web-api/no-leaked-timeout": "error",
|
|
81
|
+
/**
|
|
82
|
+
* Prevent memory leaks from resize observers.
|
|
83
|
+
*
|
|
84
|
+
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-resize-observer
|
|
85
|
+
*/
|
|
26
86
|
"@eslint-react/web-api/no-leaked-resize-observer": "error",
|
|
87
|
+
/**
|
|
88
|
+
* Warn against using array indices as keys.
|
|
89
|
+
*
|
|
90
|
+
* @see https://eslint-react.xyz/docs/rules/no-array-index-key
|
|
91
|
+
*/
|
|
27
92
|
"@eslint-react/no-array-index-key": "warn",
|
|
93
|
+
/**
|
|
94
|
+
* Prevent unstable nested component definitions.
|
|
95
|
+
*
|
|
96
|
+
* @see https://eslint-react.xyz/docs/rules/no-nested-component-definitions
|
|
97
|
+
*/
|
|
28
98
|
"@eslint-react/no-nested-component-definitions": "error",
|
|
99
|
+
/**
|
|
100
|
+
* Warn against unstable context values.
|
|
101
|
+
*
|
|
102
|
+
* @see https://eslint-react.xyz/docs/rules/no-unstable-context-value
|
|
103
|
+
*/
|
|
29
104
|
"@eslint-react/no-unstable-context-value": "warn",
|
|
105
|
+
/**
|
|
106
|
+
* Warn against unnecessary useCallback.
|
|
107
|
+
*
|
|
108
|
+
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
|
|
109
|
+
*/
|
|
30
110
|
"@eslint-react/no-unnecessary-use-callback": "warn",
|
|
111
|
+
/**
|
|
112
|
+
* Warn against unnecessary useMemo.
|
|
113
|
+
*
|
|
114
|
+
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo
|
|
115
|
+
*/
|
|
31
116
|
"@eslint-react/no-unnecessary-use-memo": "warn",
|
|
117
|
+
/**
|
|
118
|
+
* Disallow duplicate props in JSX.
|
|
119
|
+
*
|
|
120
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-no-duplicate-props
|
|
121
|
+
*/
|
|
32
122
|
"@eslint-react/jsx-no-duplicate-props": "error",
|
|
123
|
+
/**
|
|
124
|
+
* Disallow undefined components in JSX.
|
|
125
|
+
*
|
|
126
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-no-undef
|
|
127
|
+
*/
|
|
33
128
|
"@eslint-react/jsx-no-undef": "error",
|
|
129
|
+
/**
|
|
130
|
+
* Require keys for array elements.
|
|
131
|
+
*
|
|
132
|
+
* @see https://eslint-react.xyz/docs/rules/no-missing-key
|
|
133
|
+
*/
|
|
34
134
|
"@eslint-react/no-missing-key": "error",
|
|
135
|
+
/**
|
|
136
|
+
* Disallow children prop.
|
|
137
|
+
*
|
|
138
|
+
* @see https://eslint-react.xyz/docs/rules/no-children-prop
|
|
139
|
+
*/
|
|
35
140
|
"@eslint-react/no-children-prop": "error",
|
|
141
|
+
/**
|
|
142
|
+
* Disallow direct state mutation.
|
|
143
|
+
*
|
|
144
|
+
* @see https://eslint-react.xyz/docs/rules/no-direct-mutation-state
|
|
145
|
+
*/
|
|
36
146
|
"@eslint-react/no-direct-mutation-state": "error",
|
|
147
|
+
/**
|
|
148
|
+
* Disallow string refs.
|
|
149
|
+
*
|
|
150
|
+
* @see https://eslint-react.xyz/docs/rules/no-string-refs
|
|
151
|
+
*/
|
|
37
152
|
"@eslint-react/no-string-refs": "error",
|
|
153
|
+
/**
|
|
154
|
+
* Disallow findDOMNode.
|
|
155
|
+
*
|
|
156
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-find-dom-node
|
|
157
|
+
*/
|
|
38
158
|
"@eslint-react/dom/no-find-dom-node": "error"
|
|
39
159
|
}
|
|
40
160
|
}]);
|
package/dist/configs/react.d.cts
CHANGED
package/dist/configs/react.d.mts
CHANGED
package/dist/configs/react.mjs
CHANGED
|
@@ -9,29 +9,149 @@ const config = defineConfig([{
|
|
|
9
9
|
languageOptions: { parserOptions: { ecmaFeatures: { jsx: true } } },
|
|
10
10
|
extends: [eslintReactPlugin.configs.recommended],
|
|
11
11
|
rules: {
|
|
12
|
+
/**
|
|
13
|
+
* Enforce Rules of Hooks.
|
|
14
|
+
*
|
|
15
|
+
* @see https://react.dev/reference/react/hooks#rules-of-hooks
|
|
16
|
+
*/
|
|
12
17
|
"react-hooks/rules-of-hooks": "error",
|
|
18
|
+
/**
|
|
19
|
+
* Verify dependencies array in hooks.
|
|
20
|
+
*
|
|
21
|
+
* @see https://react.dev/reference/react/hooks#rules-of-hooks
|
|
22
|
+
*/
|
|
13
23
|
"react-hooks/exhaustive-deps": "warn",
|
|
24
|
+
/**
|
|
25
|
+
* Disallow dangerouslySetInnerHTML.
|
|
26
|
+
*
|
|
27
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml
|
|
28
|
+
*/
|
|
14
29
|
"@eslint-react/dom/no-dangerously-set-innerhtml": "error",
|
|
30
|
+
/**
|
|
31
|
+
* Disallow dangerouslySetInnerHTML with children.
|
|
32
|
+
*
|
|
33
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml-with-children
|
|
34
|
+
*/
|
|
15
35
|
"@eslint-react/dom/no-dangerously-set-innerhtml-with-children": "error",
|
|
36
|
+
/**
|
|
37
|
+
* Disallow javascript: URLs.
|
|
38
|
+
*
|
|
39
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-script-url
|
|
40
|
+
*/
|
|
16
41
|
"@eslint-react/dom/no-script-url": "error",
|
|
42
|
+
/**
|
|
43
|
+
* Enforce security attributes on target="_blank" links.
|
|
44
|
+
*
|
|
45
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-target-blank
|
|
46
|
+
*/
|
|
17
47
|
"@eslint-react/dom/no-unsafe-target-blank": "error",
|
|
48
|
+
/**
|
|
49
|
+
* Require sandbox attribute on iframes.
|
|
50
|
+
*
|
|
51
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-missing-iframe-sandbox
|
|
52
|
+
*/
|
|
18
53
|
"@eslint-react/dom/no-missing-iframe-sandbox": "error",
|
|
54
|
+
/**
|
|
55
|
+
* Disallow unsafe iframe sandbox values.
|
|
56
|
+
*
|
|
57
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-iframe-sandbox
|
|
58
|
+
*/
|
|
19
59
|
"@eslint-react/dom/no-unsafe-iframe-sandbox": "error",
|
|
60
|
+
/**
|
|
61
|
+
* Prevent memory leaks from event listeners.
|
|
62
|
+
*
|
|
63
|
+
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-event-listener
|
|
64
|
+
*/
|
|
20
65
|
"@eslint-react/web-api/no-leaked-event-listener": "error",
|
|
66
|
+
/**
|
|
67
|
+
* Prevent memory leaks from intervals.
|
|
68
|
+
*
|
|
69
|
+
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-interval
|
|
70
|
+
*/
|
|
21
71
|
"@eslint-react/web-api/no-leaked-interval": "error",
|
|
72
|
+
/**
|
|
73
|
+
* Prevent memory leaks from timeouts.
|
|
74
|
+
*
|
|
75
|
+
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-timeout
|
|
76
|
+
*/
|
|
22
77
|
"@eslint-react/web-api/no-leaked-timeout": "error",
|
|
78
|
+
/**
|
|
79
|
+
* Prevent memory leaks from resize observers.
|
|
80
|
+
*
|
|
81
|
+
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-resize-observer
|
|
82
|
+
*/
|
|
23
83
|
"@eslint-react/web-api/no-leaked-resize-observer": "error",
|
|
84
|
+
/**
|
|
85
|
+
* Warn against using array indices as keys.
|
|
86
|
+
*
|
|
87
|
+
* @see https://eslint-react.xyz/docs/rules/no-array-index-key
|
|
88
|
+
*/
|
|
24
89
|
"@eslint-react/no-array-index-key": "warn",
|
|
90
|
+
/**
|
|
91
|
+
* Prevent unstable nested component definitions.
|
|
92
|
+
*
|
|
93
|
+
* @see https://eslint-react.xyz/docs/rules/no-nested-component-definitions
|
|
94
|
+
*/
|
|
25
95
|
"@eslint-react/no-nested-component-definitions": "error",
|
|
96
|
+
/**
|
|
97
|
+
* Warn against unstable context values.
|
|
98
|
+
*
|
|
99
|
+
* @see https://eslint-react.xyz/docs/rules/no-unstable-context-value
|
|
100
|
+
*/
|
|
26
101
|
"@eslint-react/no-unstable-context-value": "warn",
|
|
102
|
+
/**
|
|
103
|
+
* Warn against unnecessary useCallback.
|
|
104
|
+
*
|
|
105
|
+
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
|
|
106
|
+
*/
|
|
27
107
|
"@eslint-react/no-unnecessary-use-callback": "warn",
|
|
108
|
+
/**
|
|
109
|
+
* Warn against unnecessary useMemo.
|
|
110
|
+
*
|
|
111
|
+
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo
|
|
112
|
+
*/
|
|
28
113
|
"@eslint-react/no-unnecessary-use-memo": "warn",
|
|
114
|
+
/**
|
|
115
|
+
* Disallow duplicate props in JSX.
|
|
116
|
+
*
|
|
117
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-no-duplicate-props
|
|
118
|
+
*/
|
|
29
119
|
"@eslint-react/jsx-no-duplicate-props": "error",
|
|
120
|
+
/**
|
|
121
|
+
* Disallow undefined components in JSX.
|
|
122
|
+
*
|
|
123
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-no-undef
|
|
124
|
+
*/
|
|
30
125
|
"@eslint-react/jsx-no-undef": "error",
|
|
126
|
+
/**
|
|
127
|
+
* Require keys for array elements.
|
|
128
|
+
*
|
|
129
|
+
* @see https://eslint-react.xyz/docs/rules/no-missing-key
|
|
130
|
+
*/
|
|
31
131
|
"@eslint-react/no-missing-key": "error",
|
|
132
|
+
/**
|
|
133
|
+
* Disallow children prop.
|
|
134
|
+
*
|
|
135
|
+
* @see https://eslint-react.xyz/docs/rules/no-children-prop
|
|
136
|
+
*/
|
|
32
137
|
"@eslint-react/no-children-prop": "error",
|
|
138
|
+
/**
|
|
139
|
+
* Disallow direct state mutation.
|
|
140
|
+
*
|
|
141
|
+
* @see https://eslint-react.xyz/docs/rules/no-direct-mutation-state
|
|
142
|
+
*/
|
|
33
143
|
"@eslint-react/no-direct-mutation-state": "error",
|
|
144
|
+
/**
|
|
145
|
+
* Disallow string refs.
|
|
146
|
+
*
|
|
147
|
+
* @see https://eslint-react.xyz/docs/rules/no-string-refs
|
|
148
|
+
*/
|
|
34
149
|
"@eslint-react/no-string-refs": "error",
|
|
150
|
+
/**
|
|
151
|
+
* Disallow findDOMNode.
|
|
152
|
+
*
|
|
153
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-find-dom-node
|
|
154
|
+
*/
|
|
35
155
|
"@eslint-react/dom/no-find-dom-node": "error"
|
|
36
156
|
}
|
|
37
157
|
}]);
|
package/package.json
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abinnovision/eslint-config-react",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.1-beta.1",
|
|
4
|
+
"description": "Shared ESLint configuration for React applications, building on @abinnovision/eslint-config-base.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"eslint",
|
|
7
|
+
"eslint-config",
|
|
8
|
+
"react",
|
|
9
|
+
"typescript"
|
|
10
|
+
],
|
|
11
|
+
"homepage": "https://github.com/abinnovision/js-commons",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/abinnovision/js-commons/issues"
|
|
14
|
+
},
|
|
4
15
|
"repository": {
|
|
5
|
-
"
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/abinnovision/js-commons.git",
|
|
18
|
+
"directory": "packages/eslint-config-react"
|
|
6
19
|
},
|
|
7
20
|
"license": "Apache-2.0",
|
|
8
21
|
"author": {
|
|
@@ -47,16 +60,16 @@
|
|
|
47
60
|
"prettier": "@abinnovision/prettier-config",
|
|
48
61
|
"dependencies": {
|
|
49
62
|
"@eslint-react/eslint-plugin": "^2.13.0",
|
|
50
|
-
"eslint-plugin-better-tailwindcss": "^4.
|
|
63
|
+
"eslint-plugin-better-tailwindcss": "^4.6.1",
|
|
51
64
|
"eslint-plugin-react-hooks": "^7.1.1"
|
|
52
65
|
},
|
|
53
66
|
"devDependencies": {
|
|
54
|
-
"@abinnovision/eslint-config-base": "^3.
|
|
55
|
-
"@abinnovision/prettier-config": "^2.
|
|
67
|
+
"@abinnovision/eslint-config-base": "^3.4.2-beta.1",
|
|
68
|
+
"@abinnovision/prettier-config": "^2.2.0",
|
|
56
69
|
"@internal/tsconfig": "^1.0.0",
|
|
57
|
-
"eslint": "^10.
|
|
58
|
-
"prettier": "^3.
|
|
59
|
-
"tsdown": "^0.
|
|
70
|
+
"eslint": "^10.7.0",
|
|
71
|
+
"prettier": "^3.9.5",
|
|
72
|
+
"tsdown": "^0.22.5",
|
|
60
73
|
"typescript": "^5.9.3"
|
|
61
74
|
},
|
|
62
75
|
"peerDependencies": {
|
package/dist/configs/index.d.mts
DELETED