@abinnovision/eslint-config-react 3.0.0 → 3.0.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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.0.1](https://github.com/abinnovision/js-commons/compare/eslint-config-react-v3.0.0...eslint-config-react-v3.0.1) (2025-11-08)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * trigger synthetic patch release for all packages ([0a42ee3](https://github.com/abinnovision/js-commons/commit/0a42ee36601f88ff232a41a8682266543849b3c6))
9
+
3
10
  ## [3.0.0](https://github.com/abinnovision/js-commons/compare/eslint-config-react-v2.2.0...eslint-config-react-v3.0.0) (2025-11-08)
4
11
 
5
12
 
package/dist/index.cjs ADDED
@@ -0,0 +1,272 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.ts
31
+ var src_exports = {};
32
+ __export(src_exports, {
33
+ react: () => config,
34
+ tailwind: () => config2
35
+ });
36
+ module.exports = __toCommonJS(src_exports);
37
+
38
+ // src/configs/react.ts
39
+ var import_eslint_plugin = __toESM(require("@eslint-react/eslint-plugin"), 1);
40
+ var import_config = require("eslint/config");
41
+ var import_eslint_plugin_react_hooks = __toESM(require("eslint-plugin-react-hooks"), 1);
42
+ var { configs: _, ...eslintReactHooksPlugin } = import_eslint_plugin_react_hooks.default;
43
+ var config = (0, import_config.defineConfig)([
44
+ {
45
+ files: ["**/*.{js,jsx,ts,tsx}"],
46
+ plugins: {
47
+ "react-hooks": eslintReactHooksPlugin
48
+ },
49
+ languageOptions: {
50
+ parserOptions: { ecmaFeatures: { jsx: true } }
51
+ },
52
+ extends: [
53
+ /**
54
+ * ESLint React Recommended Configuration.
55
+ * Includes x (renderer-agnostic), dom, and web-api rules.
56
+ *
57
+ * @see https://eslint-react.xyz/docs/configuration
58
+ */
59
+ import_eslint_plugin.default.configs.recommended
60
+ ],
61
+ rules: {
62
+ /**
63
+ * Enforce Rules of Hooks.
64
+ *
65
+ * @see https://react.dev/reference/react/hooks#rules-of-hooks
66
+ */
67
+ "react-hooks/rules-of-hooks": "error",
68
+ /**
69
+ * Verify dependencies array in hooks.
70
+ *
71
+ * @see https://react.dev/reference/react/hooks#rules-of-hooks
72
+ */
73
+ "react-hooks/exhaustive-deps": "warn",
74
+ /**
75
+ * Disallow dangerouslySetInnerHTML.
76
+ *
77
+ * @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml
78
+ */
79
+ "@eslint-react/dom/no-dangerously-set-innerhtml": "error",
80
+ /**
81
+ * Disallow dangerouslySetInnerHTML with children.
82
+ *
83
+ * @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml-with-children
84
+ */
85
+ "@eslint-react/dom/no-dangerously-set-innerhtml-with-children": "error",
86
+ /**
87
+ * Disallow javascript: URLs.
88
+ *
89
+ * @see https://eslint-react.xyz/docs/rules/dom-no-script-url
90
+ */
91
+ "@eslint-react/dom/no-script-url": "error",
92
+ /**
93
+ * Enforce security attributes on target="_blank" links.
94
+ *
95
+ * @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-target-blank
96
+ */
97
+ "@eslint-react/dom/no-unsafe-target-blank": "error",
98
+ /**
99
+ * Require sandbox attribute on iframes.
100
+ *
101
+ * @see https://eslint-react.xyz/docs/rules/dom-no-missing-iframe-sandbox
102
+ */
103
+ "@eslint-react/dom/no-missing-iframe-sandbox": "error",
104
+ /**
105
+ * Disallow unsafe iframe sandbox values.
106
+ *
107
+ * @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-iframe-sandbox
108
+ */
109
+ "@eslint-react/dom/no-unsafe-iframe-sandbox": "error",
110
+ /**
111
+ * Prevent memory leaks from event listeners.
112
+ *
113
+ * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-event-listener
114
+ */
115
+ "@eslint-react/web-api/no-leaked-event-listener": "error",
116
+ /**
117
+ * Prevent memory leaks from intervals.
118
+ *
119
+ * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-interval
120
+ */
121
+ "@eslint-react/web-api/no-leaked-interval": "error",
122
+ /**
123
+ * Prevent memory leaks from timeouts.
124
+ *
125
+ * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-timeout
126
+ */
127
+ "@eslint-react/web-api/no-leaked-timeout": "error",
128
+ /**
129
+ * Prevent memory leaks from resize observers.
130
+ *
131
+ * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-resize-observer
132
+ */
133
+ "@eslint-react/web-api/no-leaked-resize-observer": "error",
134
+ /**
135
+ * Warn against using array indices as keys.
136
+ *
137
+ * @see https://eslint-react.xyz/docs/rules/no-array-index-key
138
+ */
139
+ "@eslint-react/no-array-index-key": "warn",
140
+ /**
141
+ * Prevent unstable nested component definitions.
142
+ *
143
+ * @see https://eslint-react.xyz/docs/rules/no-nested-component-definitions
144
+ */
145
+ "@eslint-react/no-nested-component-definitions": "error",
146
+ /**
147
+ * Warn against unstable context values.
148
+ *
149
+ * @see https://eslint-react.xyz/docs/rules/no-unstable-context-value
150
+ */
151
+ "@eslint-react/no-unstable-context-value": "warn",
152
+ /**
153
+ * Warn against unnecessary useCallback.
154
+ *
155
+ * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
156
+ */
157
+ "@eslint-react/no-unnecessary-use-callback": "warn",
158
+ /**
159
+ * Warn against unnecessary useMemo.
160
+ *
161
+ * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo
162
+ */
163
+ "@eslint-react/no-unnecessary-use-memo": "warn",
164
+ /**
165
+ * Disallow duplicate props in JSX.
166
+ *
167
+ * @see https://eslint-react.xyz/docs/rules/jsx-no-duplicate-props
168
+ */
169
+ "@eslint-react/jsx-no-duplicate-props": "error",
170
+ /**
171
+ * Disallow undefined components in JSX.
172
+ *
173
+ * @see https://eslint-react.xyz/docs/rules/jsx-no-undef
174
+ */
175
+ "@eslint-react/jsx-no-undef": "error",
176
+ /**
177
+ * Require keys for array elements.
178
+ *
179
+ * @see https://eslint-react.xyz/docs/rules/no-missing-key
180
+ */
181
+ "@eslint-react/no-missing-key": "error",
182
+ /**
183
+ * Disallow children prop.
184
+ *
185
+ * @see https://eslint-react.xyz/docs/rules/no-children-prop
186
+ */
187
+ "@eslint-react/no-children-prop": "error",
188
+ /**
189
+ * Disallow direct state mutation.
190
+ *
191
+ * @see https://eslint-react.xyz/docs/rules/no-direct-mutation-state
192
+ */
193
+ "@eslint-react/no-direct-mutation-state": "error",
194
+ /**
195
+ * Disallow string refs.
196
+ *
197
+ * @see https://eslint-react.xyz/docs/rules/no-string-refs
198
+ */
199
+ "@eslint-react/no-string-refs": "error",
200
+ /**
201
+ * Disallow findDOMNode.
202
+ *
203
+ * @see https://eslint-react.xyz/docs/rules/dom-no-find-dom-node
204
+ */
205
+ "@eslint-react/dom/no-find-dom-node": "error"
206
+ }
207
+ }
208
+ ]);
209
+
210
+ // src/configs/flavour-tailwind.ts
211
+ var import_config2 = require("eslint/config");
212
+ var import_eslint_plugin_better_tailwindcss = __toESM(require("eslint-plugin-better-tailwindcss"), 1);
213
+ var config2 = (0, import_config2.defineConfig)([
214
+ {
215
+ files: ["**/*.{js,jsx,ts,tsx}"],
216
+ plugins: {
217
+ "better-tailwindcss": import_eslint_plugin_better_tailwindcss.default
218
+ },
219
+ rules: {
220
+ /**
221
+ * Enforce consistent line wrapping.
222
+ *
223
+ * @see https://github.com/schoero/eslint-plugin-better-tailwindcss
224
+ */
225
+ "better-tailwindcss/enforce-consistent-line-wrapping": "warn",
226
+ /**
227
+ * Enforce consistent class order.
228
+ *
229
+ * @see https://github.com/schoero/eslint-plugin-better-tailwindcss
230
+ */
231
+ "better-tailwindcss/enforce-consistent-class-order": "warn",
232
+ /**
233
+ * Enforce shorthand classes.
234
+ *
235
+ * @see https://github.com/schoero/eslint-plugin-better-tailwindcss
236
+ */
237
+ "better-tailwindcss/enforce-shorthand-classes": "warn",
238
+ /**
239
+ * Remove duplicate classes.
240
+ *
241
+ * @see https://github.com/schoero/eslint-plugin-better-tailwindcss
242
+ */
243
+ "better-tailwindcss/no-duplicate-classes": "warn",
244
+ /**
245
+ * Disallow unnecessary whitespace.
246
+ *
247
+ * @see https://github.com/schoero/eslint-plugin-better-tailwindcss
248
+ */
249
+ "better-tailwindcss/no-unnecessary-whitespace": "warn",
250
+ /**
251
+ * Report unregistered classes.
252
+ *
253
+ * @see https://github.com/schoero/eslint-plugin-better-tailwindcss
254
+ */
255
+ "better-tailwindcss/no-unregistered-classes": [
256
+ "warn",
257
+ { detectComponentClasses: true }
258
+ ],
259
+ /**
260
+ * Report conflicting classes.
261
+ *
262
+ * @see https://github.com/schoero/eslint-plugin-better-tailwindcss
263
+ */
264
+ "better-tailwindcss/no-conflicting-classes": "error"
265
+ }
266
+ }
267
+ ]);
268
+ // Annotate the CommonJS export names for ESM import in node:
269
+ 0 && (module.exports = {
270
+ react,
271
+ tailwind
272
+ });
@@ -0,0 +1,12 @@
1
+ import * as eslint_config from 'eslint/config';
2
+
3
+ declare const config$1: eslint_config.Config[];
4
+
5
+ /**
6
+ * ESLint configuration for Tailwind CSS.
7
+ *
8
+ * Note that this configuration include stylistic rules.
9
+ */
10
+ declare const config: eslint_config.Config[];
11
+
12
+ export { config$1 as react, config as tailwind };
@@ -0,0 +1,12 @@
1
+ import * as eslint_config from 'eslint/config';
2
+
3
+ declare const config$1: eslint_config.Config[];
4
+
5
+ /**
6
+ * ESLint configuration for Tailwind CSS.
7
+ *
8
+ * Note that this configuration include stylistic rules.
9
+ */
10
+ declare const config: eslint_config.Config[];
11
+
12
+ export { config$1 as react, config as tailwind };
package/dist/index.js ADDED
@@ -0,0 +1,234 @@
1
+ // src/configs/react.ts
2
+ import eslintReactPlugin from "@eslint-react/eslint-plugin";
3
+ import { defineConfig } from "eslint/config";
4
+ import eslintReactHooks from "eslint-plugin-react-hooks";
5
+ var { configs: _, ...eslintReactHooksPlugin } = eslintReactHooks;
6
+ var config = defineConfig([
7
+ {
8
+ files: ["**/*.{js,jsx,ts,tsx}"],
9
+ plugins: {
10
+ "react-hooks": eslintReactHooksPlugin
11
+ },
12
+ languageOptions: {
13
+ parserOptions: { ecmaFeatures: { jsx: true } }
14
+ },
15
+ extends: [
16
+ /**
17
+ * ESLint React Recommended Configuration.
18
+ * Includes x (renderer-agnostic), dom, and web-api rules.
19
+ *
20
+ * @see https://eslint-react.xyz/docs/configuration
21
+ */
22
+ eslintReactPlugin.configs.recommended
23
+ ],
24
+ rules: {
25
+ /**
26
+ * Enforce Rules of Hooks.
27
+ *
28
+ * @see https://react.dev/reference/react/hooks#rules-of-hooks
29
+ */
30
+ "react-hooks/rules-of-hooks": "error",
31
+ /**
32
+ * Verify dependencies array in hooks.
33
+ *
34
+ * @see https://react.dev/reference/react/hooks#rules-of-hooks
35
+ */
36
+ "react-hooks/exhaustive-deps": "warn",
37
+ /**
38
+ * Disallow dangerouslySetInnerHTML.
39
+ *
40
+ * @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml
41
+ */
42
+ "@eslint-react/dom/no-dangerously-set-innerhtml": "error",
43
+ /**
44
+ * Disallow dangerouslySetInnerHTML with children.
45
+ *
46
+ * @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml-with-children
47
+ */
48
+ "@eslint-react/dom/no-dangerously-set-innerhtml-with-children": "error",
49
+ /**
50
+ * Disallow javascript: URLs.
51
+ *
52
+ * @see https://eslint-react.xyz/docs/rules/dom-no-script-url
53
+ */
54
+ "@eslint-react/dom/no-script-url": "error",
55
+ /**
56
+ * Enforce security attributes on target="_blank" links.
57
+ *
58
+ * @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-target-blank
59
+ */
60
+ "@eslint-react/dom/no-unsafe-target-blank": "error",
61
+ /**
62
+ * Require sandbox attribute on iframes.
63
+ *
64
+ * @see https://eslint-react.xyz/docs/rules/dom-no-missing-iframe-sandbox
65
+ */
66
+ "@eslint-react/dom/no-missing-iframe-sandbox": "error",
67
+ /**
68
+ * Disallow unsafe iframe sandbox values.
69
+ *
70
+ * @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-iframe-sandbox
71
+ */
72
+ "@eslint-react/dom/no-unsafe-iframe-sandbox": "error",
73
+ /**
74
+ * Prevent memory leaks from event listeners.
75
+ *
76
+ * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-event-listener
77
+ */
78
+ "@eslint-react/web-api/no-leaked-event-listener": "error",
79
+ /**
80
+ * Prevent memory leaks from intervals.
81
+ *
82
+ * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-interval
83
+ */
84
+ "@eslint-react/web-api/no-leaked-interval": "error",
85
+ /**
86
+ * Prevent memory leaks from timeouts.
87
+ *
88
+ * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-timeout
89
+ */
90
+ "@eslint-react/web-api/no-leaked-timeout": "error",
91
+ /**
92
+ * Prevent memory leaks from resize observers.
93
+ *
94
+ * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-resize-observer
95
+ */
96
+ "@eslint-react/web-api/no-leaked-resize-observer": "error",
97
+ /**
98
+ * Warn against using array indices as keys.
99
+ *
100
+ * @see https://eslint-react.xyz/docs/rules/no-array-index-key
101
+ */
102
+ "@eslint-react/no-array-index-key": "warn",
103
+ /**
104
+ * Prevent unstable nested component definitions.
105
+ *
106
+ * @see https://eslint-react.xyz/docs/rules/no-nested-component-definitions
107
+ */
108
+ "@eslint-react/no-nested-component-definitions": "error",
109
+ /**
110
+ * Warn against unstable context values.
111
+ *
112
+ * @see https://eslint-react.xyz/docs/rules/no-unstable-context-value
113
+ */
114
+ "@eslint-react/no-unstable-context-value": "warn",
115
+ /**
116
+ * Warn against unnecessary useCallback.
117
+ *
118
+ * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
119
+ */
120
+ "@eslint-react/no-unnecessary-use-callback": "warn",
121
+ /**
122
+ * Warn against unnecessary useMemo.
123
+ *
124
+ * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo
125
+ */
126
+ "@eslint-react/no-unnecessary-use-memo": "warn",
127
+ /**
128
+ * Disallow duplicate props in JSX.
129
+ *
130
+ * @see https://eslint-react.xyz/docs/rules/jsx-no-duplicate-props
131
+ */
132
+ "@eslint-react/jsx-no-duplicate-props": "error",
133
+ /**
134
+ * Disallow undefined components in JSX.
135
+ *
136
+ * @see https://eslint-react.xyz/docs/rules/jsx-no-undef
137
+ */
138
+ "@eslint-react/jsx-no-undef": "error",
139
+ /**
140
+ * Require keys for array elements.
141
+ *
142
+ * @see https://eslint-react.xyz/docs/rules/no-missing-key
143
+ */
144
+ "@eslint-react/no-missing-key": "error",
145
+ /**
146
+ * Disallow children prop.
147
+ *
148
+ * @see https://eslint-react.xyz/docs/rules/no-children-prop
149
+ */
150
+ "@eslint-react/no-children-prop": "error",
151
+ /**
152
+ * Disallow direct state mutation.
153
+ *
154
+ * @see https://eslint-react.xyz/docs/rules/no-direct-mutation-state
155
+ */
156
+ "@eslint-react/no-direct-mutation-state": "error",
157
+ /**
158
+ * Disallow string refs.
159
+ *
160
+ * @see https://eslint-react.xyz/docs/rules/no-string-refs
161
+ */
162
+ "@eslint-react/no-string-refs": "error",
163
+ /**
164
+ * Disallow findDOMNode.
165
+ *
166
+ * @see https://eslint-react.xyz/docs/rules/dom-no-find-dom-node
167
+ */
168
+ "@eslint-react/dom/no-find-dom-node": "error"
169
+ }
170
+ }
171
+ ]);
172
+
173
+ // src/configs/flavour-tailwind.ts
174
+ import { defineConfig as defineConfig2 } from "eslint/config";
175
+ import betterTailwindcss from "eslint-plugin-better-tailwindcss";
176
+ var config2 = defineConfig2([
177
+ {
178
+ files: ["**/*.{js,jsx,ts,tsx}"],
179
+ plugins: {
180
+ "better-tailwindcss": betterTailwindcss
181
+ },
182
+ rules: {
183
+ /**
184
+ * Enforce consistent line wrapping.
185
+ *
186
+ * @see https://github.com/schoero/eslint-plugin-better-tailwindcss
187
+ */
188
+ "better-tailwindcss/enforce-consistent-line-wrapping": "warn",
189
+ /**
190
+ * Enforce consistent class order.
191
+ *
192
+ * @see https://github.com/schoero/eslint-plugin-better-tailwindcss
193
+ */
194
+ "better-tailwindcss/enforce-consistent-class-order": "warn",
195
+ /**
196
+ * Enforce shorthand classes.
197
+ *
198
+ * @see https://github.com/schoero/eslint-plugin-better-tailwindcss
199
+ */
200
+ "better-tailwindcss/enforce-shorthand-classes": "warn",
201
+ /**
202
+ * Remove duplicate classes.
203
+ *
204
+ * @see https://github.com/schoero/eslint-plugin-better-tailwindcss
205
+ */
206
+ "better-tailwindcss/no-duplicate-classes": "warn",
207
+ /**
208
+ * Disallow unnecessary whitespace.
209
+ *
210
+ * @see https://github.com/schoero/eslint-plugin-better-tailwindcss
211
+ */
212
+ "better-tailwindcss/no-unnecessary-whitespace": "warn",
213
+ /**
214
+ * Report unregistered classes.
215
+ *
216
+ * @see https://github.com/schoero/eslint-plugin-better-tailwindcss
217
+ */
218
+ "better-tailwindcss/no-unregistered-classes": [
219
+ "warn",
220
+ { detectComponentClasses: true }
221
+ ],
222
+ /**
223
+ * Report conflicting classes.
224
+ *
225
+ * @see https://github.com/schoero/eslint-plugin-better-tailwindcss
226
+ */
227
+ "better-tailwindcss/no-conflicting-classes": "error"
228
+ }
229
+ }
230
+ ]);
231
+ export {
232
+ config as react,
233
+ config2 as tailwind
234
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abinnovision/eslint-config-react",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "publishConfig": {
5
5
  "npm": true,
6
6
  "ghpr": true,
@@ -52,8 +52,8 @@
52
52
  "eslint-plugin-react-hooks": "^7.0.0"
53
53
  },
54
54
  "devDependencies": {
55
- "@abinnovision/eslint-config-base": "^3.0.0",
56
- "@abinnovision/prettier-config": "^2.1.4",
55
+ "@abinnovision/eslint-config-base": "^3.0.1",
56
+ "@abinnovision/prettier-config": "^2.1.5",
57
57
  "eslint": "^9.39.1",
58
58
  "prettier": "^3.6.2",
59
59
  "tsup": "^8.3.6",