@eslint-react/eslint-plugin 1.50.0-next.0 → 2.0.0-beta.14

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
@@ -1,21 +1,9 @@
1
- 'use strict';
2
-
3
- var reactDebug = require('eslint-plugin-react-debug');
4
- var reactDom = require('eslint-plugin-react-dom');
5
- var reactHooksExtra = require('eslint-plugin-react-hooks-extra');
6
- var reactNamingConvention = require('eslint-plugin-react-naming-convention');
7
- var reactWebApi = require('eslint-plugin-react-web-api');
8
- var react = require('eslint-plugin-react-x');
9
- var shared = require('@eslint-react/shared');
10
-
11
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
12
-
13
- var reactDebug__default = /*#__PURE__*/_interopDefault(reactDebug);
14
- var reactDom__default = /*#__PURE__*/_interopDefault(reactDom);
15
- var reactHooksExtra__default = /*#__PURE__*/_interopDefault(reactHooksExtra);
16
- var reactNamingConvention__default = /*#__PURE__*/_interopDefault(reactNamingConvention);
17
- var reactWebApi__default = /*#__PURE__*/_interopDefault(reactWebApi);
18
- var react__default = /*#__PURE__*/_interopDefault(react);
1
+ import reactDebug from 'eslint-plugin-react-debug';
2
+ import reactDom from 'eslint-plugin-react-dom';
3
+ import reactNamingConvention from 'eslint-plugin-react-naming-convention';
4
+ import reactWebApi from 'eslint-plugin-react-web-api';
5
+ import react from 'eslint-plugin-react-x';
6
+ import { DEFAULT_ESLINT_REACT_SETTINGS } from '@eslint-react/shared';
19
7
 
20
8
  var __defProp = Object.defineProperty;
21
9
  var __export = (target, all) => {
@@ -25,7 +13,7 @@ var __export = (target, all) => {
25
13
 
26
14
  // package.json
27
15
  var name = "@eslint-react/eslint-plugin";
28
- var version = "1.50.0-next.0";
16
+ var version = "2.0.0-beta.14";
29
17
 
30
18
  // src/configs/all.ts
31
19
  var all_exports = {};
@@ -63,10 +51,10 @@ var rules = {
63
51
  "@eslint-react/dom/no-void-elements-with-children": "error"
64
52
  };
65
53
  var plugins = {
66
- "@eslint-react/dom": reactDom__default.default
54
+ "@eslint-react/dom": reactDom
67
55
  };
68
56
  var settings = {
69
- "react-x": shared.DEFAULT_ESLINT_REACT_SETTINGS
57
+ "react-x": DEFAULT_ESLINT_REACT_SETTINGS
70
58
  };
71
59
 
72
60
  // src/configs/x.ts
@@ -79,8 +67,10 @@ __export(x_exports, {
79
67
  });
80
68
  var name3 = "@eslint-react/x";
81
69
  var rules2 = {
70
+ "@eslint-react/jsx-no-comment-textnodes": "warn",
82
71
  "@eslint-react/jsx-key-before-spread": "warn",
83
72
  "@eslint-react/jsx-no-duplicate-props": "warn",
73
+ // "@eslint-react/jsx-no-undef": "error",
84
74
  "@eslint-react/jsx-uses-react": "warn",
85
75
  "@eslint-react/jsx-uses-vars": "warn",
86
76
  "@eslint-react/no-access-state-in-setstate": "error",
@@ -89,9 +79,10 @@ var rules2 = {
89
79
  "@eslint-react/no-children-for-each": "warn",
90
80
  "@eslint-react/no-children-map": "warn",
91
81
  "@eslint-react/no-children-only": "warn",
82
+ // "@eslint-react/no-children-prop": "warn",
92
83
  "@eslint-react/no-children-to-array": "warn",
84
+ // "@eslint-react/no-class-component": "warn",
93
85
  "@eslint-react/no-clone-element": "warn",
94
- "@eslint-react/no-comment-textnodes": "warn",
95
86
  "@eslint-react/no-component-will-mount": "error",
96
87
  "@eslint-react/no-component-will-receive-props": "error",
97
88
  "@eslint-react/no-component-will-update": "error",
@@ -99,11 +90,17 @@ var rules2 = {
99
90
  "@eslint-react/no-create-ref": "error",
100
91
  "@eslint-react/no-default-props": "error",
101
92
  "@eslint-react/no-direct-mutation-state": "error",
93
+ // "@eslint-react/prefer-destructuring-assignment": "warn",
94
+ // "@eslint-react/prefer-namespace-import": "warn",
95
+ // "@eslint-react/prefer-read-only-props": "error",
96
+ "@eslint-react/no-direct-set-state-in-use-effect": "warn",
102
97
  "@eslint-react/no-duplicate-key": "warn",
103
98
  "@eslint-react/no-forward-ref": "warn",
104
99
  "@eslint-react/no-implicit-key": "warn",
100
+ // "@eslint-react/no-missing-component-display-name": "warn",
101
+ // "@eslint-react/no-missing-context-display-name": "warn",
105
102
  "@eslint-react/no-missing-key": "error",
106
- "@eslint-react/no-misused-capture-owner-stack": "error",
103
+ // "@eslint-react/no-misused-capture-owner-stack": "error",
107
104
  "@eslint-react/no-nested-component-definitions": "error",
108
105
  "@eslint-react/no-nested-lazy-component-declarations": "warn",
109
106
  "@eslint-react/no-prop-types": "error",
@@ -112,6 +109,7 @@ var rules2 = {
112
109
  "@eslint-react/no-set-state-in-component-did-update": "warn",
113
110
  "@eslint-react/no-set-state-in-component-will-update": "warn",
114
111
  "@eslint-react/no-string-refs": "error",
112
+ "@eslint-react/no-unnecessary-use-prefix": "warn",
115
113
  "@eslint-react/no-unsafe-component-will-mount": "warn",
116
114
  "@eslint-react/no-unsafe-component-will-receive-props": "warn",
117
115
  "@eslint-react/no-unsafe-component-will-update": "warn",
@@ -120,21 +118,20 @@ var rules2 = {
120
118
  "@eslint-react/no-unused-class-component-members": "warn",
121
119
  "@eslint-react/no-unused-state": "warn",
122
120
  "@eslint-react/no-use-context": "warn",
123
- "@eslint-react/no-useless-forward-ref": "warn"
121
+ "@eslint-react/no-useless-forward-ref": "warn",
122
+ "@eslint-react/prefer-use-state-lazy-initialization": "warn"
124
123
  };
125
124
  var plugins2 = {
126
- "@eslint-react": react__default.default
125
+ "@eslint-react": react
127
126
  };
128
127
  var settings2 = {
129
- "react-x": shared.DEFAULT_ESLINT_REACT_SETTINGS
128
+ "react-x": DEFAULT_ESLINT_REACT_SETTINGS
130
129
  };
131
130
 
132
131
  // src/configs/all.ts
133
132
  var name4 = "@eslint-react/all";
134
133
  var rules3 = {
135
- "@eslint-react/avoid-shorthand-boolean": "warn",
136
- "@eslint-react/avoid-shorthand-fragment": "warn",
137
- "@eslint-react/jsx-key-before-spread": "warn",
134
+ "@eslint-react/jsx-no-comment-textnodes": "warn",
138
135
  "@eslint-react/jsx-no-duplicate-props": "warn",
139
136
  "@eslint-react/jsx-no-undef": "error",
140
137
  "@eslint-react/jsx-uses-react": "warn",
@@ -149,8 +146,6 @@ var rules3 = {
149
146
  "@eslint-react/no-children-to-array": "warn",
150
147
  "@eslint-react/no-class-component": "warn",
151
148
  "@eslint-react/no-clone-element": "warn",
152
- "@eslint-react/no-comment-textnodes": "warn",
153
- "@eslint-react/no-complex-conditional-rendering": "warn",
154
149
  "@eslint-react/no-component-will-mount": "error",
155
150
  "@eslint-react/no-component-will-receive-props": "error",
156
151
  "@eslint-react/no-component-will-update": "error",
@@ -158,10 +153,11 @@ var rules3 = {
158
153
  "@eslint-react/no-create-ref": "error",
159
154
  "@eslint-react/no-default-props": "error",
160
155
  "@eslint-react/no-direct-mutation-state": "error",
156
+ "@eslint-react/no-direct-set-state-in-use-effect": "warn",
157
+ "@eslint-react/no-direct-set-state-in-use-layout-effect": "warn",
161
158
  "@eslint-react/no-duplicate-key": "warn",
162
159
  "@eslint-react/no-forward-ref": "warn",
163
160
  "@eslint-react/no-implicit-key": "warn",
164
- // "@eslint-react/no-leaked-conditional-rendering": "warn",
165
161
  "@eslint-react/no-missing-component-display-name": "warn",
166
162
  "@eslint-react/no-missing-context-display-name": "warn",
167
163
  "@eslint-react/no-missing-key": "error",
@@ -174,6 +170,9 @@ var rules3 = {
174
170
  "@eslint-react/no-set-state-in-component-did-update": "warn",
175
171
  "@eslint-react/no-set-state-in-component-will-update": "warn",
176
172
  "@eslint-react/no-string-refs": "error",
173
+ "@eslint-react/no-unnecessary-use-callback": "warn",
174
+ "@eslint-react/no-unnecessary-use-memo": "warn",
175
+ "@eslint-react/no-unnecessary-use-prefix": "warn",
177
176
  "@eslint-react/no-unsafe-component-will-mount": "warn",
178
177
  "@eslint-react/no-unsafe-component-will-receive-props": "warn",
179
178
  "@eslint-react/no-unsafe-component-will-update": "warn",
@@ -183,12 +182,9 @@ var rules3 = {
183
182
  "@eslint-react/no-unused-state": "warn",
184
183
  "@eslint-react/no-use-context": "warn",
185
184
  "@eslint-react/no-useless-forward-ref": "warn",
186
- "@eslint-react/no-useless-fragment": "warn",
187
185
  "@eslint-react/prefer-destructuring-assignment": "warn",
188
- "@eslint-react/prefer-react-namespace-import": "warn",
189
- // "@eslint-react/prefer-read-only-props": "warn",
190
- "@eslint-react/prefer-shorthand-boolean": "off",
191
- "@eslint-react/prefer-shorthand-fragment": "off",
186
+ "@eslint-react/prefer-namespace-import": "warn",
187
+ "@eslint-react/prefer-use-state-lazy-initialization": "warn",
192
188
  "@eslint-react/dom/no-dangerously-set-innerhtml": "warn",
193
189
  "@eslint-react/dom/no-dangerously-set-innerhtml-with-children": "error",
194
190
  "@eslint-react/dom/no-find-dom-node": "error",
@@ -209,12 +205,6 @@ var rules3 = {
209
205
  "@eslint-react/web-api/no-leaked-interval": "warn",
210
206
  "@eslint-react/web-api/no-leaked-resize-observer": "warn",
211
207
  "@eslint-react/web-api/no-leaked-timeout": "warn",
212
- "@eslint-react/hooks-extra/no-direct-set-state-in-use-effect": "warn",
213
- "@eslint-react/hooks-extra/no-direct-set-state-in-use-layout-effect": "warn",
214
- "@eslint-react/hooks-extra/no-unnecessary-use-callback": "warn",
215
- "@eslint-react/hooks-extra/no-unnecessary-use-memo": "warn",
216
- "@eslint-react/hooks-extra/no-unnecessary-use-prefix": "warn",
217
- "@eslint-react/hooks-extra/prefer-use-state-lazy-initialization": "warn",
218
208
  "@eslint-react/naming-convention/component-name": "warn",
219
209
  "@eslint-react/naming-convention/context-name": "warn",
220
210
  "@eslint-react/naming-convention/filename": "warn",
@@ -224,10 +214,9 @@ var rules3 = {
224
214
  var plugins3 = {
225
215
  ...plugins2,
226
216
  ...plugins,
227
- "@eslint-react/debug": reactDebug__default.default,
228
- "@eslint-react/hooks-extra": reactHooksExtra__default.default,
229
- "@eslint-react/naming-convention": reactNamingConvention__default.default,
230
- "@eslint-react/web-api": reactWebApi__default.default
217
+ "@eslint-react/debug": reactDebug,
218
+ "@eslint-react/naming-convention": reactNamingConvention,
219
+ "@eslint-react/web-api": reactWebApi
231
220
  };
232
221
  var settings3 = {
233
222
  ...settings
@@ -249,7 +238,7 @@ var rules4 = {
249
238
  "@eslint-react/debug/jsx": "warn"
250
239
  };
251
240
  var plugins4 = {
252
- "@eslint-react/debug": reactDebug__default.default
241
+ "@eslint-react/debug": reactDebug
253
242
  };
254
243
 
255
244
  // src/configs/disable-debug.ts
@@ -295,7 +284,7 @@ var rules8 = {
295
284
  "@eslint-react/web-api/no-leaked-timeout": "warn"
296
285
  };
297
286
  var plugins5 = {
298
- "@eslint-react/web-api": reactWebApi__default.default
287
+ "@eslint-react/web-api": reactWebApi
299
288
  };
300
289
 
301
290
  // src/configs/disable-web-api.ts
@@ -327,9 +316,6 @@ var rules11 = {
327
316
  ...rules2,
328
317
  ...rules,
329
318
  ...rules8,
330
- "@eslint-react/hooks-extra/no-direct-set-state-in-use-effect": "warn",
331
- "@eslint-react/hooks-extra/no-unnecessary-use-prefix": "warn",
332
- "@eslint-react/hooks-extra/prefer-use-state-lazy-initialization": "warn",
333
319
  "@eslint-react/naming-convention/context-name": "warn"
334
320
  // "@eslint-react/naming-convention/use-state": "warn",
335
321
  };
@@ -337,9 +323,8 @@ var plugins6 = {
337
323
  ...plugins2,
338
324
  ...plugins,
339
325
  ...plugins5,
340
- "@eslint-react/debug": reactDebug__default.default,
341
- "@eslint-react/hooks-extra": reactHooksExtra__default.default,
342
- "@eslint-react/naming-convention": reactNamingConvention__default.default
326
+ "@eslint-react/debug": reactDebug,
327
+ "@eslint-react/naming-convention": reactNamingConvention
343
328
  };
344
329
  var settings5 = {
345
330
  ...settings
@@ -449,25 +434,15 @@ var index_default = {
449
434
  ["recommended-typescript"]: recommended_typescript_exports,
450
435
  ["recommended-typescript-legacy"]: toLegacyConfig(recommended_typescript_exports),
451
436
  ["x"]: x_exports,
452
- ["x-legacy"]: toLegacyConfig(x_exports),
453
- // Part: deprecated presets
454
- /** @deprecated Use `x` instead */
455
- ["core"]: x_exports,
456
- /** @deprecated Use `x-legacy` instead */
457
- ["core-legacy"]: toLegacyConfig(x_exports),
458
- /** @deprecated Use `disable-dom` instead */
459
- ["off-dom"]: disable_dom_exports,
460
- /** @deprecated Use `disable-dom-legacy` instead */
461
- ["off-dom-legacy"]: toLegacyConfig(disable_dom_exports)
437
+ ["x-legacy"]: toLegacyConfig(x_exports)
462
438
  },
463
439
  rules: {
464
- ...react__default.default.rules,
465
- ...padKeysLeft(reactDom__default.default.rules, "dom/"),
466
- ...padKeysLeft(reactWebApi__default.default.rules, "web-api/"),
467
- ...padKeysLeft(reactHooksExtra__default.default.rules, "hooks-extra/"),
468
- ...padKeysLeft(reactNamingConvention__default.default.rules, "naming-convention/"),
469
- ...padKeysLeft(reactDebug__default.default.rules, "debug/")
440
+ ...react.rules,
441
+ ...padKeysLeft(reactDom.rules, "dom/"),
442
+ ...padKeysLeft(reactWebApi.rules, "web-api/"),
443
+ ...padKeysLeft(reactNamingConvention.rules, "naming-convention/"),
444
+ ...padKeysLeft(reactDebug.rules, "debug/")
470
445
  }
471
446
  };
472
447
 
473
- module.exports = index_default;
448
+ export { index_default as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/eslint-plugin",
3
- "version": "1.50.0-next.0",
3
+ "version": "2.0.0-beta.14",
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",
@@ -25,48 +24,39 @@
25
24
  "license": "MIT",
26
25
  "author": "Rel1cx<rel1cx@proton.me>",
27
26
  "sideEffects": false,
27
+ "type": "module",
28
28
  "exports": {
29
29
  ".": {
30
- "import": {
31
- "types": "./dist/index.d.mts",
32
- "default": "./dist/index.mjs"
33
- },
34
- "require": {
35
- "types": "./dist/index.d.ts",
36
- "default": "./dist/index.js"
37
- }
30
+ "types": "./dist/index.d.ts",
31
+ "import": "./dist/index.js"
38
32
  },
39
33
  "./package.json": "./package.json"
40
34
  },
41
- "main": "dist/index.js",
42
- "module": "dist/index.mjs",
43
- "types": "dist/index.d.ts",
44
35
  "files": [
45
36
  "dist",
46
37
  "./package.json"
47
38
  ],
48
39
  "dependencies": {
49
- "@typescript-eslint/scope-manager": "^8.32.0",
50
- "@typescript-eslint/type-utils": "^8.32.0",
51
- "@typescript-eslint/types": "^8.32.0",
52
- "@typescript-eslint/utils": "^8.32.0",
53
- "@eslint-react/eff": "1.50.0-next.0",
54
- "@eslint-react/kit": "1.50.0-next.0",
55
- "eslint-plugin-react-debug": "1.50.0-next.0",
56
- "eslint-plugin-react-dom": "1.50.0-next.0",
57
- "@eslint-react/shared": "1.50.0-next.0",
58
- "eslint-plugin-react-hooks-extra": "1.50.0-next.0",
59
- "eslint-plugin-react-x": "1.50.0-next.0",
60
- "eslint-plugin-react-naming-convention": "1.50.0-next.0",
61
- "eslint-plugin-react-web-api": "1.50.0-next.0"
40
+ "@typescript-eslint/scope-manager": "^8.31.1",
41
+ "@typescript-eslint/type-utils": "^8.31.1",
42
+ "@typescript-eslint/types": "^8.31.1",
43
+ "@typescript-eslint/utils": "^8.31.1",
44
+ "@eslint-react/shared": "2.0.0-beta.14",
45
+ "eslint-plugin-react-debug": "2.0.0-beta.14",
46
+ "@eslint-react/kit": "2.0.0-beta.14",
47
+ "@eslint-react/eff": "2.0.0-beta.14",
48
+ "eslint-plugin-react-naming-convention": "2.0.0-beta.14",
49
+ "eslint-plugin-react-dom": "2.0.0-beta.14",
50
+ "eslint-plugin-react-x": "2.0.0-beta.14",
51
+ "eslint-plugin-react-web-api": "2.0.0-beta.14"
62
52
  },
63
53
  "devDependencies": {
64
54
  "tsup": "^8.4.0",
65
55
  "@local/configs": "0.0.0"
66
56
  },
67
57
  "peerDependencies": {
68
- "eslint": "^8.57.0 || ^9.0.0",
69
- "typescript": "^4.9.5 || ^5.3.3"
58
+ "eslint": "^9.26.0",
59
+ "typescript": "^4.9.5 || ^5.4.5"
70
60
  },
71
61
  "peerDependenciesMeta": {
72
62
  "eslint": {
@@ -78,7 +68,7 @@
78
68
  },
79
69
  "engines": {
80
70
  "bun": ">=1.0.15",
81
- "node": ">=18.18.0"
71
+ "node": ">=20.19.0"
82
72
  },
83
73
  "publishConfig": {
84
74
  "access": "public"