@eslint-react/eslint-plugin 2.0.0-next.1 → 2.0.0-next.109

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/dist/index.js CHANGED
@@ -8,13 +8,13 @@ import { DEFAULT_ESLINT_REACT_SETTINGS } from '@eslint-react/shared';
8
8
 
9
9
  var __defProp = Object.defineProperty;
10
10
  var __export = (target, all) => {
11
- for (var name14 in all)
12
- __defProp(target, name14, { get: all[name14], enumerable: true });
11
+ for (var name15 in all)
12
+ __defProp(target, name15, { get: all[name15], enumerable: true });
13
13
  };
14
14
 
15
15
  // package.json
16
16
  var name = "@eslint-react/eslint-plugin";
17
- var version = "2.0.0-next.1";
17
+ var version = "2.0.0-next.109";
18
18
 
19
19
  // src/configs/all.ts
20
20
  var all_exports = {};
@@ -70,6 +70,7 @@ var name3 = "@eslint-react/x";
70
70
  var rules2 = {
71
71
  "@eslint-react/jsx-no-comment-textnodes": "warn",
72
72
  "@eslint-react/jsx-no-duplicate-props": "warn",
73
+ // "@eslint-react/jsx-no-iife": "warn",
73
74
  // "@eslint-react/jsx-no-undef": "error",
74
75
  // "@eslint-react/jsx-shorthand-boolean": "warn",
75
76
  // "@eslint-react/jsx-shorthand-fragment": "warn",
@@ -85,6 +86,7 @@ var rules2 = {
85
86
  "@eslint-react/no-children-to-array": "warn",
86
87
  // "@eslint-react/no-class-component": "warn",
87
88
  "@eslint-react/no-clone-element": "warn",
89
+ "@eslint-react/no-comment-textnodes": "warn",
88
90
  "@eslint-react/no-component-will-mount": "error",
89
91
  "@eslint-react/no-component-will-receive-props": "error",
90
92
  "@eslint-react/no-component-will-update": "error",
@@ -92,34 +94,40 @@ var rules2 = {
92
94
  "@eslint-react/no-create-ref": "error",
93
95
  "@eslint-react/no-default-props": "error",
94
96
  "@eslint-react/no-direct-mutation-state": "error",
95
- "@eslint-react/no-duplicate-key": "warn",
97
+ "@eslint-react/no-duplicate-key": "error",
96
98
  "@eslint-react/no-forward-ref": "warn",
97
99
  "@eslint-react/no-implicit-key": "warn",
100
+ // "@eslint-react/no-leaked-conditional-rendering": "warn",
98
101
  // "@eslint-react/no-missing-component-display-name": "warn",
99
102
  // "@eslint-react/no-missing-context-display-name": "warn",
100
103
  "@eslint-react/no-missing-key": "error",
101
104
  // "@eslint-react/no-misused-capture-owner-stack": "error",
102
105
  "@eslint-react/no-nested-component-definitions": "error",
103
- "@eslint-react/no-nested-lazy-component-declarations": "warn",
106
+ "@eslint-react/no-nested-lazy-component-declarations": "error",
104
107
  "@eslint-react/no-prop-types": "error",
105
108
  "@eslint-react/no-redundant-should-component-update": "error",
106
109
  "@eslint-react/no-set-state-in-component-did-mount": "warn",
107
110
  "@eslint-react/no-set-state-in-component-did-update": "warn",
108
111
  "@eslint-react/no-set-state-in-component-will-update": "warn",
109
112
  "@eslint-react/no-string-refs": "error",
113
+ // "@eslint-react/no-unnecessary-use-callback": "warn",
114
+ // "@eslint-react/no-unnecessary-use-memo": "warn",
115
+ "@eslint-react/no-unnecessary-use-prefix": "warn",
110
116
  "@eslint-react/no-unsafe-component-will-mount": "warn",
111
117
  "@eslint-react/no-unsafe-component-will-receive-props": "warn",
112
118
  "@eslint-react/no-unsafe-component-will-update": "warn",
113
119
  "@eslint-react/no-unstable-context-value": "warn",
114
120
  "@eslint-react/no-unstable-default-props": "warn",
115
121
  "@eslint-react/no-unused-class-component-members": "warn",
122
+ // "@eslint-react/no-unused-props": "warn",
116
123
  "@eslint-react/no-unused-state": "warn",
117
124
  "@eslint-react/no-use-context": "warn",
118
- "@eslint-react/no-useless-forward-ref": "warn"
125
+ "@eslint-react/no-useless-forward-ref": "warn",
119
126
  // "@eslint-react/no-useless-fragment": "warn",
120
127
  // "@eslint-react/prefer-destructuring-assignment": "warn",
121
128
  // "@eslint-react/prefer-namespace-import": "warn",
122
129
  // "@eslint-react/prefer-read-only-props": "error",
130
+ "@eslint-react/prefer-use-state-lazy-initialization": "warn"
123
131
  };
124
132
  var plugins2 = {
125
133
  "@eslint-react": react
@@ -131,8 +139,10 @@ var settings2 = {
131
139
  // src/configs/all.ts
132
140
  var name4 = "@eslint-react/all";
133
141
  var rules3 = {
142
+ "@eslint-react/jsx-key-before-spread": "warn",
134
143
  "@eslint-react/jsx-no-comment-textnodes": "warn",
135
144
  "@eslint-react/jsx-no-duplicate-props": "warn",
145
+ "@eslint-react/jsx-no-iife": "warn",
136
146
  "@eslint-react/jsx-no-undef": "error",
137
147
  "@eslint-react/jsx-shorthand-boolean": "warn",
138
148
  "@eslint-react/jsx-shorthand-fragment": "warn",
@@ -148,6 +158,7 @@ var rules3 = {
148
158
  "@eslint-react/no-children-to-array": "warn",
149
159
  "@eslint-react/no-class-component": "warn",
150
160
  "@eslint-react/no-clone-element": "warn",
161
+ "@eslint-react/no-comment-textnodes": "warn",
151
162
  "@eslint-react/no-component-will-mount": "error",
152
163
  "@eslint-react/no-component-will-receive-props": "error",
153
164
  "@eslint-react/no-component-will-update": "error",
@@ -155,33 +166,42 @@ var rules3 = {
155
166
  "@eslint-react/no-create-ref": "error",
156
167
  "@eslint-react/no-default-props": "error",
157
168
  "@eslint-react/no-direct-mutation-state": "error",
158
- "@eslint-react/no-duplicate-key": "warn",
169
+ "@eslint-react/no-duplicate-key": "error",
159
170
  "@eslint-react/no-forward-ref": "warn",
160
171
  "@eslint-react/no-implicit-key": "warn",
172
+ // "@eslint-react/no-leaked-conditional-rendering": "warn",
161
173
  "@eslint-react/no-missing-component-display-name": "warn",
162
174
  "@eslint-react/no-missing-context-display-name": "warn",
163
175
  "@eslint-react/no-missing-key": "error",
164
176
  "@eslint-react/no-misused-capture-owner-stack": "error",
165
177
  "@eslint-react/no-nested-component-definitions": "error",
166
- "@eslint-react/no-nested-lazy-component-declarations": "warn",
178
+ "@eslint-react/no-nested-lazy-component-declarations": "error",
167
179
  "@eslint-react/no-prop-types": "error",
168
180
  "@eslint-react/no-redundant-should-component-update": "error",
169
181
  "@eslint-react/no-set-state-in-component-did-mount": "warn",
170
182
  "@eslint-react/no-set-state-in-component-did-update": "warn",
171
183
  "@eslint-react/no-set-state-in-component-will-update": "warn",
172
184
  "@eslint-react/no-string-refs": "error",
185
+ "@eslint-react/no-unnecessary-use-callback": "warn",
186
+ "@eslint-react/no-unnecessary-use-memo": "warn",
187
+ "@eslint-react/no-unnecessary-use-prefix": "warn",
173
188
  "@eslint-react/no-unsafe-component-will-mount": "warn",
174
189
  "@eslint-react/no-unsafe-component-will-receive-props": "warn",
175
190
  "@eslint-react/no-unsafe-component-will-update": "warn",
176
191
  "@eslint-react/no-unstable-context-value": "warn",
177
192
  "@eslint-react/no-unstable-default-props": "warn",
178
193
  "@eslint-react/no-unused-class-component-members": "warn",
194
+ // "@eslint-react/no-unused-props": "warn",
179
195
  "@eslint-react/no-unused-state": "warn",
180
196
  "@eslint-react/no-use-context": "warn",
181
197
  "@eslint-react/no-useless-forward-ref": "warn",
182
198
  "@eslint-react/no-useless-fragment": "warn",
183
199
  "@eslint-react/prefer-destructuring-assignment": "warn",
184
200
  "@eslint-react/prefer-namespace-import": "warn",
201
+ // "@eslint-react/prefer-read-only-props": "error",
202
+ "@eslint-react/prefer-use-state-lazy-initialization": "warn",
203
+ "@eslint-react/hooks-extra/no-direct-set-state-in-use-effect": "warn",
204
+ "@eslint-react/hooks-extra/no-direct-set-state-in-use-layout-effect": "warn",
185
205
  "@eslint-react/dom/no-dangerously-set-innerhtml": "warn",
186
206
  "@eslint-react/dom/no-dangerously-set-innerhtml-with-children": "error",
187
207
  "@eslint-react/dom/no-find-dom-node": "error",
@@ -202,12 +222,6 @@ var rules3 = {
202
222
  "@eslint-react/web-api/no-leaked-interval": "warn",
203
223
  "@eslint-react/web-api/no-leaked-resize-observer": "warn",
204
224
  "@eslint-react/web-api/no-leaked-timeout": "warn",
205
- "@eslint-react/hooks-extra/no-direct-set-state-in-use-effect": "warn",
206
- "@eslint-react/hooks-extra/no-direct-set-state-in-use-layout-effect": "warn",
207
- "@eslint-react/hooks-extra/no-unnecessary-use-callback": "warn",
208
- "@eslint-react/hooks-extra/no-unnecessary-use-memo": "warn",
209
- "@eslint-react/hooks-extra/no-unnecessary-use-prefix": "warn",
210
- "@eslint-react/hooks-extra/prefer-use-state-lazy-initialization": "warn",
211
225
  "@eslint-react/naming-convention/component-name": "warn",
212
226
  "@eslint-react/naming-convention/context-name": "warn",
213
227
  "@eslint-react/naming-convention/filename": "warn",
@@ -245,43 +259,103 @@ var plugins4 = {
245
259
  "@eslint-react/debug": reactDebug
246
260
  };
247
261
 
262
+ // src/configs/disable-conflict-eslint-plugin-react.ts
263
+ var disable_conflict_eslint_plugin_react_exports = {};
264
+ __export(disable_conflict_eslint_plugin_react_exports, {
265
+ name: () => name6,
266
+ rules: () => rules5
267
+ });
268
+ var conflictingRules = [
269
+ "button-has-type",
270
+ "destructuring-assignment",
271
+ "display-name",
272
+ "forbid-prop-types",
273
+ "forward-ref-uses-ref",
274
+ "hook-use-state",
275
+ "iframe-missing-sandbox",
276
+ "jsx-boolean-value",
277
+ "jsx-filename-extension",
278
+ "jsx-fragments",
279
+ "jsx-key",
280
+ "jsx-no-comment-textnodes",
281
+ "jsx-no-constructed-context-values",
282
+ "jsx-no-duplicate-props",
283
+ "jsx-no-leaked-render",
284
+ "jsx-no-script-url",
285
+ "jsx-no-target-blank",
286
+ "jsx-no-undef",
287
+ "jsx-no-useless-fragment",
288
+ "jsx-pascal-case",
289
+ "jsx-uses-react",
290
+ "jsx-uses-vars",
291
+ "no-access-state-in-setstate",
292
+ "no-array-index-key",
293
+ "no-children-prop",
294
+ "no-danger",
295
+ "no-danger-with-children",
296
+ "no-deprecated",
297
+ "no-did-mount-set-state",
298
+ "no-did-update-set-state",
299
+ "no-direct-mutation-state",
300
+ "no-find-dom-node",
301
+ "no-namespace",
302
+ "no-object-type-as-default-prop",
303
+ "no-redundant-should-component-update",
304
+ "no-render-return-value",
305
+ "no-string-refs",
306
+ "no-unknown-property",
307
+ "no-unsafe",
308
+ "no-unstable-nested-components",
309
+ "no-unused-class-component-members",
310
+ "no-unused-state",
311
+ "no-will-update-set-state",
312
+ "prefer-read-only-props",
313
+ "prop-types",
314
+ "void-dom-elements-no-children"
315
+ ];
316
+ var name6 = "@eslint-react/disable-conflict-eslint-plugin-react";
317
+ var rules5 = Object.fromEntries(
318
+ Object.entries(conflictingRules).map(([key]) => [key, "off"])
319
+ );
320
+
248
321
  // src/configs/disable-debug.ts
249
322
  var disable_debug_exports = {};
250
323
  __export(disable_debug_exports, {
251
- name: () => name6,
252
- rules: () => rules5
324
+ name: () => name7,
325
+ rules: () => rules6
253
326
  });
254
- var name6 = "@eslint-react/disable-debug";
255
- var rules5 = Object.fromEntries(Object.entries(rules4).map(([rule]) => [rule, "off"]));
327
+ var name7 = "@eslint-react/disable-debug";
328
+ var rules6 = Object.fromEntries(Object.entries(rules4).map(([rule]) => [rule, "off"]));
256
329
 
257
330
  // src/configs/disable-dom.ts
258
331
  var disable_dom_exports = {};
259
332
  __export(disable_dom_exports, {
260
- name: () => name7,
261
- rules: () => rules6
333
+ name: () => name8,
334
+ rules: () => rules7
262
335
  });
263
- var name7 = "@eslint-react/disable-dom";
264
- var rules6 = Object.fromEntries(Object.entries(rules).map(([key]) => [key, "off"]));
336
+ var name8 = "@eslint-react/disable-dom";
337
+ var rules7 = Object.fromEntries(Object.entries(rules).map(([key]) => [key, "off"]));
265
338
 
266
339
  // src/configs/disable-type-checked.ts
267
340
  var disable_type_checked_exports = {};
268
341
  __export(disable_type_checked_exports, {
269
- name: () => name8,
270
- rules: () => rules7
342
+ name: () => name9,
343
+ rules: () => rules8
271
344
  });
272
- var name8 = "@eslint-react/disable-type-checked";
273
- var rules7 = {
345
+ var name9 = "@eslint-react/disable-type-checked";
346
+ var rules8 = {
274
347
  "@eslint-react/no-leaked-conditional-rendering": "off",
348
+ "@eslint-react/no-unused-props": "off",
275
349
  "@eslint-react/prefer-read-only-props": "off"
276
350
  };
277
351
 
278
352
  // src/configs/disable-web-api.ts
279
353
  var disable_web_api_exports = {};
280
354
  __export(disable_web_api_exports, {
281
- name: () => name9,
282
- rules: () => rules9
355
+ name: () => name10,
356
+ rules: () => rules10
283
357
  });
284
- var rules8 = {
358
+ var rules9 = {
285
359
  "@eslint-react/web-api/no-leaked-event-listener": "warn",
286
360
  "@eslint-react/web-api/no-leaked-interval": "warn",
287
361
  "@eslint-react/web-api/no-leaked-resize-observer": "warn",
@@ -292,37 +366,34 @@ var plugins5 = {
292
366
  };
293
367
 
294
368
  // src/configs/disable-web-api.ts
295
- var name9 = "@eslint-react/disable-web-api";
296
- var rules9 = Object.fromEntries(Object.entries(rules8).map(([key]) => [key, "off"]));
369
+ var name10 = "@eslint-react/disable-web-api";
370
+ var rules10 = Object.fromEntries(Object.entries(rules9).map(([key]) => [key, "off"]));
297
371
 
298
372
  // src/configs/off.ts
299
373
  var off_exports = {};
300
374
  __export(off_exports, {
301
- name: () => name10,
302
- rules: () => rules10
375
+ name: () => name11,
376
+ rules: () => rules11
303
377
  });
304
- var name10 = "@eslint-react/off";
305
- var rules10 = {
378
+ var name11 = "@eslint-react/off";
379
+ var rules11 = {
306
380
  ...Object.fromEntries(Object.entries(rules3).map(([key]) => [key, "off"])),
307
- ...rules7
381
+ ...rules8
308
382
  };
309
383
 
310
384
  // src/configs/recommended.ts
311
385
  var recommended_exports = {};
312
386
  __export(recommended_exports, {
313
- name: () => name11,
387
+ name: () => name12,
314
388
  plugins: () => plugins6,
315
- rules: () => rules11,
389
+ rules: () => rules12,
316
390
  settings: () => settings5
317
391
  });
318
- var name11 = "@eslint-react/recommended";
319
- var rules11 = {
392
+ var name12 = "@eslint-react/recommended";
393
+ var rules12 = {
320
394
  ...rules2,
321
395
  ...rules,
322
- ...rules8,
323
- "@eslint-react/hooks-extra/no-direct-set-state-in-use-effect": "warn",
324
- "@eslint-react/hooks-extra/no-unnecessary-use-prefix": "warn",
325
- "@eslint-react/hooks-extra/prefer-use-state-lazy-initialization": "warn",
396
+ ...rules9,
326
397
  "@eslint-react/naming-convention/context-name": "warn"
327
398
  // "@eslint-react/naming-convention/use-state": "warn",
328
399
  };
@@ -341,23 +412,23 @@ var settings5 = {
341
412
  // src/configs/recommended-type-checked.ts
342
413
  var recommended_type_checked_exports = {};
343
414
  __export(recommended_type_checked_exports, {
344
- name: () => name13,
415
+ name: () => name14,
345
416
  plugins: () => plugins8,
346
- rules: () => rules13,
417
+ rules: () => rules14,
347
418
  settings: () => settings7
348
419
  });
349
420
 
350
421
  // src/configs/recommended-typescript.ts
351
422
  var recommended_typescript_exports = {};
352
423
  __export(recommended_typescript_exports, {
353
- name: () => name12,
424
+ name: () => name13,
354
425
  plugins: () => plugins7,
355
- rules: () => rules12,
426
+ rules: () => rules13,
356
427
  settings: () => settings6
357
428
  });
358
- var name12 = "@eslint-react/recommended-typescript";
359
- var rules12 = {
360
- ...rules11,
429
+ var name13 = "@eslint-react/recommended-typescript";
430
+ var rules13 = {
431
+ ...rules12,
361
432
  "@eslint-react/dom/no-unknown-property": "off",
362
433
  "@eslint-react/jsx-no-duplicate-props": "off",
363
434
  "@eslint-react/jsx-uses-react": "off",
@@ -371,9 +442,9 @@ var settings6 = {
371
442
  };
372
443
 
373
444
  // src/configs/recommended-type-checked.ts
374
- var name13 = "@eslint-react/recommended-type-checked";
375
- var rules13 = {
376
- ...rules12,
445
+ var name14 = "@eslint-react/recommended-type-checked";
446
+ var rules14 = {
447
+ ...rules13,
377
448
  "@eslint-react/no-leaked-conditional-rendering": "warn"
378
449
  // "@eslint-react/prefer-read-only-props": "warn",
379
450
  };
@@ -407,10 +478,10 @@ function padKeysLeft(obj, left) {
407
478
  }
408
479
 
409
480
  // src/index.ts
410
- function toLegacyConfig({ rules: rules14 }) {
481
+ function toLegacyConfig({ rules: rules15 }) {
411
482
  return {
412
483
  plugins: ["@eslint-react"],
413
- rules: rules14
484
+ rules: rules15
414
485
  };
415
486
  }
416
487
  var index_default = {
@@ -423,6 +494,8 @@ var index_default = {
423
494
  ["all-legacy"]: toLegacyConfig(all_exports),
424
495
  ["debug"]: debug_exports,
425
496
  ["debug-legacy"]: toLegacyConfig(debug_exports),
497
+ ["disable-conflict-eslint-plugin-react"]: disable_conflict_eslint_plugin_react_exports,
498
+ ["disable-conflict-eslint-plugin-react-legacy"]: toLegacyConfig(disable_conflict_eslint_plugin_react_exports),
426
499
  ["disable-debug"]: disable_debug_exports,
427
500
  ["disable-debug-legacy"]: toLegacyConfig(disable_debug_exports),
428
501
  ["disable-dom"]: disable_dom_exports,
@@ -448,7 +521,7 @@ var index_default = {
448
521
  ...react.rules,
449
522
  ...padKeysLeft(reactDom.rules, "dom/"),
450
523
  ...padKeysLeft(reactWebApi.rules, "web-api/"),
451
- ...padKeysLeft(reactHooksExtra.rules, "hooks-extra/"),
524
+ ...padKeysLeft(reactHooksExtra, "hooks-extra/"),
452
525
  ...padKeysLeft(reactNamingConvention.rules, "naming-convention/"),
453
526
  ...padKeysLeft(reactDebug.rules, "debug/")
454
527
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/eslint-plugin",
3
- "version": "2.0.0-next.1",
3
+ "version": "2.0.0-next.109",
4
4
  "description": "A unified plugin that combines all individual plugins from the eslint-react monorepo into one.",
5
5
  "keywords": [
6
6
  "react",
@@ -10,7 +10,6 @@
10
10
  "eslint-plugin-react-x",
11
11
  "eslint-plugin-react-dom",
12
12
  "eslint-plugin-react-web-api",
13
- "eslint-plugin-react-hooks-extra",
14
13
  "eslint-plugin-react-naming-convention"
15
14
  ],
16
15
  "homepage": "https://github.com/Rel1cx/eslint-react",
@@ -38,26 +37,26 @@
38
37
  "./package.json"
39
38
  ],
40
39
  "dependencies": {
41
- "@typescript-eslint/scope-manager": "^8.30.1",
42
- "@typescript-eslint/type-utils": "^8.30.1",
43
- "@typescript-eslint/types": "^8.30.1",
44
- "@typescript-eslint/utils": "^8.30.1",
45
- "@eslint-react/eff": "2.0.0-next.1",
46
- "@eslint-react/kit": "2.0.0-next.1",
47
- "@eslint-react/shared": "2.0.0-next.1",
48
- "eslint-plugin-react-debug": "2.0.0-next.1",
49
- "eslint-plugin-react-dom": "2.0.0-next.1",
50
- "eslint-plugin-react-hooks-extra": "2.0.0-next.1",
51
- "eslint-plugin-react-naming-convention": "2.0.0-next.1",
52
- "eslint-plugin-react-x": "2.0.0-next.1",
53
- "eslint-plugin-react-web-api": "2.0.0-next.1"
40
+ "@typescript-eslint/scope-manager": "^8.38.0",
41
+ "@typescript-eslint/type-utils": "^8.38.0",
42
+ "@typescript-eslint/types": "^8.38.0",
43
+ "@typescript-eslint/utils": "^8.38.0",
44
+ "@eslint-react/eff": "2.0.0-next.109",
45
+ "@eslint-react/kit": "2.0.0-next.109",
46
+ "@eslint-react/shared": "2.0.0-next.109",
47
+ "eslint-plugin-react-debug": "2.0.0-next.109",
48
+ "eslint-plugin-react-hooks-extra": "2.0.0-next.109",
49
+ "eslint-plugin-react-dom": "2.0.0-next.109",
50
+ "eslint-plugin-react-naming-convention": "2.0.0-next.109",
51
+ "eslint-plugin-react-web-api": "2.0.0-next.109",
52
+ "eslint-plugin-react-x": "2.0.0-next.109"
54
53
  },
55
54
  "devDependencies": {
56
- "tsup": "^8.4.0",
55
+ "tsup": "^8.5.0",
57
56
  "@local/configs": "0.0.0"
58
57
  },
59
58
  "peerDependencies": {
60
- "eslint": "^9.24.0",
59
+ "eslint": "^9.31.0",
61
60
  "typescript": "^4.9.5 || ^5.4.5"
62
61
  },
63
62
  "peerDependenciesMeta": {
@@ -69,7 +68,6 @@
69
68
  }
70
69
  },
71
70
  "engines": {
72
- "bun": ">=1.0.15",
73
71
  "node": ">=20.19.0"
74
72
  },
75
73
  "publishConfig": {