@abinnovision/eslint-config-react 2.2.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,28 @@
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
+
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)
11
+
12
+
13
+ ### ⚠ BREAKING CHANGES
14
+
15
+ * refactor eslint config for React and add Tailwind CSS flavour
16
+
17
+ ### Features
18
+
19
+ * refactor eslint config for React and add Tailwind CSS flavour ([94aee60](https://github.com/abinnovision/js-commons/commit/94aee60116b769e147fd18422c0858bcbe7f02f3))
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * migrate eslint configs to use defineConfig ([#541](https://github.com/abinnovision/js-commons/issues/541)) ([eb24dca](https://github.com/abinnovision/js-commons/commit/eb24dca423b594711b727da84f4c4026f781c9e4))
25
+
3
26
  ## [2.2.0](https://github.com/abinnovision/js-commons/compare/eslint-config-react-v2.1.0...eslint-config-react-v2.2.0) (2024-10-16)
4
27
 
5
28
 
package/README.md CHANGED
@@ -1,14 +1,53 @@
1
1
  # @abinnovision/eslint-config-react
2
2
 
3
- ESLint config specifically for React related projects. This config **must be
4
- used in conjunction with the
5
- [@abinnovision/eslint-config-base](https://github.com/abinnovision/js-commons/tree/master/packages/eslint-config-base)
6
- ESLint config**. This config is based on the
7
- [AlloyTeam ESLint Config](https://github.com/AlloyTeam/eslint-config-alloy) with
8
- some additional goodies on top.
3
+ ESLint configuration for React applications. Built on
4
+ [@eslint-react/eslint-plugin](https://eslint-react.xyz) and
5
+ [eslint-plugin-react-hooks](https://www.npmjs.com/package/eslint-plugin-react-hooks).
9
6
 
10
7
  ## Installation
11
8
 
12
9
  ```shell
13
- yarn add --dev @abinnovision/eslint-config-react
10
+ yarn add --dev @abinnovision/eslint-config-react @abinnovision/eslint-config-base eslint
14
11
  ```
12
+
13
+ ## Usage
14
+
15
+ ```javascript
16
+ // eslint.config.js
17
+ import { base } from "@abinnovision/eslint-config-base";
18
+ import { react } from "@abinnovision/eslint-config-react";
19
+ import { defineConfig } from "eslint/config";
20
+
21
+ export default defineConfig([{ extends: [base] }, { extends: [react] }]);
22
+ ```
23
+
24
+ ## Flavours
25
+
26
+ Specialized configurations for specific React use cases.
27
+
28
+ ### Tailwind CSS
29
+
30
+ For React applications using Tailwind CSS. Enforces class ordering,
31
+ detects conflicts, and validates Tailwind usage.
32
+
33
+ ```javascript
34
+ import { base } from "@abinnovision/eslint-config-base";
35
+ import { react, tailwind } from "@abinnovision/eslint-config-react";
36
+ import { defineConfig } from "eslint/config";
37
+
38
+ export default defineConfig([
39
+ { extends: [base] },
40
+ { extends: [react] },
41
+ { extends: [tailwind] },
42
+ ]);
43
+ ```
44
+
45
+ ## Related Packages
46
+
47
+ - [@abinnovision/eslint-config-base](../eslint-config-base) - Base
48
+ configuration
49
+ - [@abinnovision/prettier-config](../prettier-config) - Code formatting
50
+
51
+ ## License
52
+
53
+ Apache-2.0
package/dist/index.cjs CHANGED
@@ -30,35 +30,243 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // src/index.ts
31
31
  var src_exports = {};
32
32
  __export(src_exports, {
33
- default: () => src_default
33
+ react: () => config,
34
+ tailwind: () => config2
34
35
  });
35
36
  module.exports = __toCommonJS(src_exports);
36
- var import_react = __toESM(require("eslint-config-alloy/react.js"), 1);
37
- var import_eslint_plugin_react = __toESM(require("eslint-plugin-react"), 1);
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");
38
41
  var import_eslint_plugin_react_hooks = __toESM(require("eslint-plugin-react-hooks"), 1);
39
- var config = [
42
+ var { configs: _, ...eslintReactHooksPlugin } = import_eslint_plugin_react_hooks.default;
43
+ var config = (0, import_config.defineConfig)([
40
44
  {
41
45
  files: ["**/*.{js,jsx,ts,tsx}"],
42
46
  plugins: {
43
- react: import_eslint_plugin_react.default,
44
- "react-hooks": import_eslint_plugin_react_hooks.default
47
+ "react-hooks": eslintReactHooksPlugin
45
48
  },
46
- settings: {
47
- react: {
48
- version: "detect"
49
- }
49
+ languageOptions: {
50
+ parserOptions: { ecmaFeatures: { jsx: true } }
50
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
+ ],
51
61
  rules: {
52
- ...import_react.default.rules ?? {},
53
62
  /**
54
- * Apply the rules from the eslint-plugin-react-hooks package and use the recommended
55
- * configuration.
63
+ * Enforce Rules of Hooks.
56
64
  *
57
- * @see https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks
65
+ * @see https://react.dev/reference/react/hooks#rules-of-hooks
58
66
  */
59
67
  "react-hooks/rules-of-hooks": "error",
60
- "react-hooks/exhaustive-deps": "warn"
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"
61
206
  }
62
207
  }
63
- ];
64
- var src_default = config;
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
+ });
package/dist/index.d.cts CHANGED
@@ -1,24 +1,12 @@
1
- declare const config: {
2
- files: string[];
3
- plugins: {
4
- react: Plugin;
5
- "react-hooks": Plugin;
6
- };
7
- settings: {
8
- react: {
9
- version: string;
10
- };
11
- };
12
- rules: {
13
- /**
14
- * Apply the rules from the eslint-plugin-react-hooks package and use the recommended
15
- * configuration.
16
- *
17
- * @see https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks
18
- */
19
- "react-hooks/rules-of-hooks": "error";
20
- "react-hooks/exhaustive-deps": "warn";
21
- };
22
- }[];
1
+ import * as eslint_config from 'eslint/config';
23
2
 
24
- export { config as default };
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.d.ts CHANGED
@@ -1,24 +1,12 @@
1
- declare const config: {
2
- files: string[];
3
- plugins: {
4
- react: Plugin;
5
- "react-hooks": Plugin;
6
- };
7
- settings: {
8
- react: {
9
- version: string;
10
- };
11
- };
12
- rules: {
13
- /**
14
- * Apply the rules from the eslint-plugin-react-hooks package and use the recommended
15
- * configuration.
16
- *
17
- * @see https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks
18
- */
19
- "react-hooks/rules-of-hooks": "error";
20
- "react-hooks/exhaustive-deps": "warn";
21
- };
22
- }[];
1
+ import * as eslint_config from 'eslint/config';
23
2
 
24
- export { config as default };
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 CHANGED
@@ -1,33 +1,234 @@
1
- // src/index.ts
2
- import AlloyReact from "eslint-config-alloy/react.js";
3
- import eslintPluginReact from "eslint-plugin-react";
4
- import eslintPluginReactHooks from "eslint-plugin-react-hooks";
5
- var config = [
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([
6
7
  {
7
8
  files: ["**/*.{js,jsx,ts,tsx}"],
8
9
  plugins: {
9
- react: eslintPluginReact,
10
- "react-hooks": eslintPluginReactHooks
10
+ "react-hooks": eslintReactHooksPlugin
11
11
  },
12
- settings: {
13
- react: {
14
- version: "detect"
15
- }
12
+ languageOptions: {
13
+ parserOptions: { ecmaFeatures: { jsx: true } }
16
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
+ ],
17
24
  rules: {
18
- ...AlloyReact.rules ?? {},
19
25
  /**
20
- * Apply the rules from the eslint-plugin-react-hooks package and use the recommended
21
- * configuration.
26
+ * Enforce Rules of Hooks.
22
27
  *
23
- * @see https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks
28
+ * @see https://react.dev/reference/react/hooks#rules-of-hooks
24
29
  */
25
30
  "react-hooks/rules-of-hooks": "error",
26
- "react-hooks/exhaustive-deps": "warn"
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"
27
228
  }
28
229
  }
29
- ];
30
- var src_default = config;
230
+ ]);
31
231
  export {
32
- src_default as default
232
+ config as react,
233
+ config2 as tailwind
33
234
  };
package/package.json CHANGED
@@ -1,21 +1,26 @@
1
1
  {
2
2
  "name": "@abinnovision/eslint-config-react",
3
- "version": "2.2.0",
3
+ "version": "3.0.1",
4
+ "publishConfig": {
5
+ "npm": true,
6
+ "ghpr": true,
7
+ "npmAccess": "public"
8
+ },
4
9
  "type": "module",
5
10
  "repository": {
6
11
  "url": "https://github.com/abinnovision/js-commons"
7
12
  },
8
13
  "license": "Apache-2.0",
9
14
  "author": {
10
- "name": "AB INNOVISION GmbH",
11
- "email": "info@abinnovision.com",
12
- "url": "https://abinnovision.com/"
15
+ "name": "abi group GmbH",
16
+ "email": "info@abigroup.io",
17
+ "url": "https://abigroup.io/"
13
18
  },
14
19
  "exports": {
15
20
  ".": {
21
+ "types": "./dist/index.d.ts",
16
22
  "import": "./dist/index.js",
17
- "require": "./dist/index.cjs",
18
- "types": "./dist/index.d.ts"
23
+ "require": "./dist/index.cjs"
19
24
  }
20
25
  },
21
26
  "main": "./dist/index.cjs",
@@ -42,19 +47,17 @@
42
47
  },
43
48
  "prettier": "@abinnovision/prettier-config",
44
49
  "dependencies": {
45
- "eslint-config-alloy": "^5.1.2",
46
- "eslint-plugin-react": "^7.37.1",
47
- "eslint-plugin-react-hooks": "^5.0.0"
50
+ "@eslint-react/eslint-plugin": "^2.0.0",
51
+ "eslint-plugin-better-tailwindcss": "^3.0.0",
52
+ "eslint-plugin-react-hooks": "^7.0.0"
48
53
  },
49
54
  "devDependencies": {
50
- "@abinnovision/prettier-config": "^2.1.3",
51
- "@types/eslint": "^9.6.1",
52
- "@typescript-eslint/eslint-plugin": "^8.8.1",
53
- "@typescript-eslint/parser": "^8.8.1",
54
- "eslint": "^9.12.0",
55
- "globals": "^15.11.0",
56
- "tsup": "^8.3.0",
57
- "typescript": "^5.6.3"
55
+ "@abinnovision/eslint-config-base": "^3.0.1",
56
+ "@abinnovision/prettier-config": "^2.1.5",
57
+ "eslint": "^9.39.1",
58
+ "prettier": "^3.6.2",
59
+ "tsup": "^8.3.6",
60
+ "typescript": "^5.9.3"
58
61
  },
59
62
  "peerDependencies": {
60
63
  "eslint": "^9.0.0"