@eslint-react/eslint-plugin 1.52.3-next.9 → 2.0.0-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/dist/index.js CHANGED
@@ -1,21 +1,10 @@
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 reactHooksExtra from 'eslint-plugin-react-hooks-extra';
4
+ import reactNamingConvention from 'eslint-plugin-react-naming-convention';
5
+ import reactWebApi from 'eslint-plugin-react-web-api';
6
+ import react from 'eslint-plugin-react-x';
7
+ import { DEFAULT_ESLINT_REACT_SETTINGS } from '@eslint-react/shared';
19
8
 
20
9
  var __defProp = Object.defineProperty;
21
10
  var __export = (target, all) => {
@@ -25,7 +14,7 @@ var __export = (target, all) => {
25
14
 
26
15
  // package.json
27
16
  var name = "@eslint-react/eslint-plugin";
28
- var version = "1.52.3-next.9";
17
+ var version = "2.0.0-beta.1";
29
18
 
30
19
  // src/configs/all.ts
31
20
  var all_exports = {};
@@ -63,10 +52,10 @@ var rules = {
63
52
  "@eslint-react/dom/no-void-elements-with-children": "error"
64
53
  };
65
54
  var plugins = {
66
- "@eslint-react/dom": reactDom__default.default
55
+ "@eslint-react/dom": reactDom
67
56
  };
68
57
  var settings = {
69
- "react-x": shared.DEFAULT_ESLINT_REACT_SETTINGS
58
+ "react-x": DEFAULT_ESLINT_REACT_SETTINGS
70
59
  };
71
60
 
72
61
  // src/configs/x.ts
@@ -80,7 +69,9 @@ __export(x_exports, {
80
69
  var name3 = "@eslint-react/x";
81
70
  var rules2 = {
82
71
  "@eslint-react/jsx-key-before-spread": "warn",
72
+ "@eslint-react/jsx-no-comment-textnodes": "warn",
83
73
  "@eslint-react/jsx-no-duplicate-props": "warn",
74
+ // "@eslint-react/jsx-no-undef": "error",
84
75
  "@eslint-react/jsx-uses-react": "warn",
85
76
  "@eslint-react/jsx-uses-vars": "warn",
86
77
  "@eslint-react/no-access-state-in-setstate": "error",
@@ -89,9 +80,10 @@ var rules2 = {
89
80
  "@eslint-react/no-children-for-each": "warn",
90
81
  "@eslint-react/no-children-map": "warn",
91
82
  "@eslint-react/no-children-only": "warn",
83
+ // "@eslint-react/no-children-prop": "warn",
92
84
  "@eslint-react/no-children-to-array": "warn",
85
+ // "@eslint-react/no-class-component": "warn",
93
86
  "@eslint-react/no-clone-element": "warn",
94
- "@eslint-react/no-comment-textnodes": "warn",
95
87
  "@eslint-react/no-component-will-mount": "error",
96
88
  "@eslint-react/no-component-will-receive-props": "error",
97
89
  "@eslint-react/no-component-will-update": "error",
@@ -99,11 +91,16 @@ var rules2 = {
99
91
  "@eslint-react/no-create-ref": "error",
100
92
  "@eslint-react/no-default-props": "error",
101
93
  "@eslint-react/no-direct-mutation-state": "error",
94
+ // "@eslint-react/prefer-destructuring-assignment": "warn",
95
+ // "@eslint-react/prefer-namespace-import": "warn",
96
+ // "@eslint-react/prefer-read-only-props": "error",
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,9 @@ 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-callback": "warn",
113
+ // "@eslint-react/no-unnecessary-use-memo": "warn",
114
+ "@eslint-react/no-unnecessary-use-prefix": "warn",
115
115
  "@eslint-react/no-unsafe-component-will-mount": "warn",
116
116
  "@eslint-react/no-unsafe-component-will-receive-props": "warn",
117
117
  "@eslint-react/no-unsafe-component-will-update": "warn",
@@ -120,21 +120,20 @@ var rules2 = {
120
120
  "@eslint-react/no-unused-class-component-members": "warn",
121
121
  "@eslint-react/no-unused-state": "warn",
122
122
  "@eslint-react/no-use-context": "warn",
123
- "@eslint-react/no-useless-forward-ref": "warn"
123
+ "@eslint-react/no-useless-forward-ref": "warn",
124
+ "@eslint-react/prefer-use-state-lazy-initialization": "warn"
124
125
  };
125
126
  var plugins2 = {
126
- "@eslint-react": react__default.default
127
+ "@eslint-react": react
127
128
  };
128
129
  var settings2 = {
129
- "react-x": shared.DEFAULT_ESLINT_REACT_SETTINGS
130
+ "react-x": DEFAULT_ESLINT_REACT_SETTINGS
130
131
  };
131
132
 
132
133
  // src/configs/all.ts
133
134
  var name4 = "@eslint-react/all";
134
135
  var rules3 = {
135
- "@eslint-react/avoid-shorthand-boolean": "warn",
136
- "@eslint-react/avoid-shorthand-fragment": "warn",
137
- "@eslint-react/jsx-key-before-spread": "warn",
136
+ "@eslint-react/jsx-no-comment-textnodes": "warn",
138
137
  "@eslint-react/jsx-no-duplicate-props": "warn",
139
138
  "@eslint-react/jsx-no-iife": "warn",
140
139
  "@eslint-react/jsx-no-undef": "error",
@@ -150,8 +149,6 @@ var rules3 = {
150
149
  "@eslint-react/no-children-to-array": "warn",
151
150
  "@eslint-react/no-class-component": "warn",
152
151
  "@eslint-react/no-clone-element": "warn",
153
- "@eslint-react/no-comment-textnodes": "warn",
154
- "@eslint-react/no-complex-conditional-rendering": "warn",
155
152
  "@eslint-react/no-component-will-mount": "error",
156
153
  "@eslint-react/no-component-will-receive-props": "error",
157
154
  "@eslint-react/no-component-will-update": "error",
@@ -162,7 +159,6 @@ var rules3 = {
162
159
  "@eslint-react/no-duplicate-key": "warn",
163
160
  "@eslint-react/no-forward-ref": "warn",
164
161
  "@eslint-react/no-implicit-key": "warn",
165
- // "@eslint-react/no-leaked-conditional-rendering": "warn",
166
162
  "@eslint-react/no-missing-component-display-name": "warn",
167
163
  "@eslint-react/no-missing-context-display-name": "warn",
168
164
  "@eslint-react/no-missing-key": "error",
@@ -175,6 +171,9 @@ var rules3 = {
175
171
  "@eslint-react/no-set-state-in-component-did-update": "warn",
176
172
  "@eslint-react/no-set-state-in-component-will-update": "warn",
177
173
  "@eslint-react/no-string-refs": "error",
174
+ "@eslint-react/no-unnecessary-use-callback": "warn",
175
+ "@eslint-react/no-unnecessary-use-memo": "warn",
176
+ "@eslint-react/no-unnecessary-use-prefix": "warn",
178
177
  "@eslint-react/no-unsafe-component-will-mount": "warn",
179
178
  "@eslint-react/no-unsafe-component-will-receive-props": "warn",
180
179
  "@eslint-react/no-unsafe-component-will-update": "warn",
@@ -184,12 +183,11 @@ var rules3 = {
184
183
  "@eslint-react/no-unused-state": "warn",
185
184
  "@eslint-react/no-use-context": "warn",
186
185
  "@eslint-react/no-useless-forward-ref": "warn",
187
- "@eslint-react/no-useless-fragment": "warn",
188
186
  "@eslint-react/prefer-destructuring-assignment": "warn",
189
- "@eslint-react/prefer-react-namespace-import": "warn",
190
- // "@eslint-react/prefer-read-only-props": "warn",
191
- "@eslint-react/prefer-shorthand-boolean": "off",
192
- "@eslint-react/prefer-shorthand-fragment": "off",
187
+ "@eslint-react/prefer-namespace-import": "warn",
188
+ "@eslint-react/prefer-use-state-lazy-initialization": "warn",
189
+ "@eslint-react/hooks-extra/no-direct-set-state-in-use-effect": "warn",
190
+ "@eslint-react/hooks-extra/no-direct-set-state-in-use-layout-effect": "warn",
193
191
  "@eslint-react/dom/no-dangerously-set-innerhtml": "warn",
194
192
  "@eslint-react/dom/no-dangerously-set-innerhtml-with-children": "error",
195
193
  "@eslint-react/dom/no-find-dom-node": "error",
@@ -210,12 +208,6 @@ var rules3 = {
210
208
  "@eslint-react/web-api/no-leaked-interval": "warn",
211
209
  "@eslint-react/web-api/no-leaked-resize-observer": "warn",
212
210
  "@eslint-react/web-api/no-leaked-timeout": "warn",
213
- "@eslint-react/hooks-extra/no-direct-set-state-in-use-effect": "warn",
214
- "@eslint-react/hooks-extra/no-direct-set-state-in-use-layout-effect": "warn",
215
- "@eslint-react/hooks-extra/no-unnecessary-use-callback": "warn",
216
- "@eslint-react/hooks-extra/no-unnecessary-use-memo": "warn",
217
- "@eslint-react/hooks-extra/no-unnecessary-use-prefix": "warn",
218
- "@eslint-react/hooks-extra/prefer-use-state-lazy-initialization": "warn",
219
211
  "@eslint-react/naming-convention/component-name": "warn",
220
212
  "@eslint-react/naming-convention/context-name": "warn",
221
213
  "@eslint-react/naming-convention/filename": "warn",
@@ -225,10 +217,10 @@ var rules3 = {
225
217
  var plugins3 = {
226
218
  ...plugins2,
227
219
  ...plugins,
228
- "@eslint-react/debug": reactDebug__default.default,
229
- "@eslint-react/hooks-extra": reactHooksExtra__default.default,
230
- "@eslint-react/naming-convention": reactNamingConvention__default.default,
231
- "@eslint-react/web-api": reactWebApi__default.default
220
+ "@eslint-react/debug": reactDebug,
221
+ "@eslint-react/hooks-extra": reactHooksExtra,
222
+ "@eslint-react/naming-convention": reactNamingConvention,
223
+ "@eslint-react/web-api": reactWebApi
232
224
  };
233
225
  var settings3 = {
234
226
  ...settings
@@ -250,7 +242,7 @@ var rules4 = {
250
242
  "@eslint-react/debug/jsx": "warn"
251
243
  };
252
244
  var plugins4 = {
253
- "@eslint-react/debug": reactDebug__default.default
245
+ "@eslint-react/debug": reactDebug
254
246
  };
255
247
 
256
248
  // src/configs/disable-debug.ts
@@ -296,7 +288,7 @@ var rules8 = {
296
288
  "@eslint-react/web-api/no-leaked-timeout": "warn"
297
289
  };
298
290
  var plugins5 = {
299
- "@eslint-react/web-api": reactWebApi__default.default
291
+ "@eslint-react/web-api": reactWebApi
300
292
  };
301
293
 
302
294
  // src/configs/disable-web-api.ts
@@ -328,9 +320,6 @@ var rules11 = {
328
320
  ...rules2,
329
321
  ...rules,
330
322
  ...rules8,
331
- "@eslint-react/hooks-extra/no-direct-set-state-in-use-effect": "warn",
332
- "@eslint-react/hooks-extra/no-unnecessary-use-prefix": "warn",
333
- "@eslint-react/hooks-extra/prefer-use-state-lazy-initialization": "warn",
334
323
  "@eslint-react/naming-convention/context-name": "warn"
335
324
  // "@eslint-react/naming-convention/use-state": "warn",
336
325
  };
@@ -338,9 +327,9 @@ var plugins6 = {
338
327
  ...plugins2,
339
328
  ...plugins,
340
329
  ...plugins5,
341
- "@eslint-react/debug": reactDebug__default.default,
342
- "@eslint-react/hooks-extra": reactHooksExtra__default.default,
343
- "@eslint-react/naming-convention": reactNamingConvention__default.default
330
+ "@eslint-react/debug": reactDebug,
331
+ "@eslint-react/hooks-extra": reactHooksExtra,
332
+ "@eslint-react/naming-convention": reactNamingConvention
344
333
  };
345
334
  var settings5 = {
346
335
  ...settings
@@ -450,25 +439,16 @@ var index_default = {
450
439
  ["recommended-typescript"]: recommended_typescript_exports,
451
440
  ["recommended-typescript-legacy"]: toLegacyConfig(recommended_typescript_exports),
452
441
  ["x"]: x_exports,
453
- ["x-legacy"]: toLegacyConfig(x_exports),
454
- // Part: deprecated presets
455
- /** @deprecated Use `x` instead */
456
- ["core"]: x_exports,
457
- /** @deprecated Use `x-legacy` instead */
458
- ["core-legacy"]: toLegacyConfig(x_exports),
459
- /** @deprecated Use `disable-dom` instead */
460
- ["off-dom"]: disable_dom_exports,
461
- /** @deprecated Use `disable-dom-legacy` instead */
462
- ["off-dom-legacy"]: toLegacyConfig(disable_dom_exports)
442
+ ["x-legacy"]: toLegacyConfig(x_exports)
463
443
  },
464
444
  rules: {
465
- ...react__default.default.rules,
466
- ...padKeysLeft(reactDom__default.default.rules, "dom/"),
467
- ...padKeysLeft(reactWebApi__default.default.rules, "web-api/"),
468
- ...padKeysLeft(reactHooksExtra__default.default.rules, "hooks-extra/"),
469
- ...padKeysLeft(reactNamingConvention__default.default.rules, "naming-convention/"),
470
- ...padKeysLeft(reactDebug__default.default.rules, "debug/")
445
+ ...react.rules,
446
+ ...padKeysLeft(reactDom.rules, "dom/"),
447
+ ...padKeysLeft(reactWebApi.rules, "web-api/"),
448
+ ...padKeysLeft(reactHooksExtra, "hooks-extra/"),
449
+ ...padKeysLeft(reactNamingConvention.rules, "naming-convention/"),
450
+ ...padKeysLeft(reactDebug.rules, "debug/")
471
451
  }
472
452
  };
473
453
 
474
- module.exports = index_default;
454
+ 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.52.3-next.9",
3
+ "version": "2.0.0-beta.1",
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,40 @@
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.35.1",
50
- "@typescript-eslint/type-utils": "^8.35.1",
51
- "@typescript-eslint/types": "^8.35.1",
52
- "@typescript-eslint/utils": "^8.35.1",
53
- "@eslint-react/eff": "1.52.3-next.9",
54
- "@eslint-react/kit": "1.52.3-next.9",
55
- "@eslint-react/shared": "1.52.3-next.9",
56
- "eslint-plugin-react-debug": "1.52.3-next.9",
57
- "eslint-plugin-react-dom": "1.52.3-next.9",
58
- "eslint-plugin-react-hooks-extra": "1.52.3-next.9",
59
- "eslint-plugin-react-naming-convention": "1.52.3-next.9",
60
- "eslint-plugin-react-web-api": "1.52.3-next.9",
61
- "eslint-plugin-react-x": "1.52.3-next.9"
40
+ "@typescript-eslint/scope-manager": "^8.35.0",
41
+ "@typescript-eslint/type-utils": "^8.35.0",
42
+ "@typescript-eslint/types": "^8.35.0",
43
+ "@typescript-eslint/utils": "^8.35.0",
44
+ "@eslint-react/eff": "2.0.0-beta.1",
45
+ "@eslint-react/shared": "2.0.0-beta.1",
46
+ "eslint-plugin-react-debug": "2.0.0-beta.1",
47
+ "@eslint-react/kit": "2.0.0-beta.1",
48
+ "eslint-plugin-react-hooks-extra": "2.0.0-beta.1",
49
+ "eslint-plugin-react-dom": "2.0.0-beta.1",
50
+ "eslint-plugin-react-naming-convention": "2.0.0-beta.1",
51
+ "eslint-plugin-react-web-api": "2.0.0-beta.1",
52
+ "eslint-plugin-react-x": "2.0.0-beta.1"
62
53
  },
63
54
  "devDependencies": {
64
55
  "tsup": "^8.5.0",
65
56
  "@local/configs": "0.0.0"
66
57
  },
67
58
  "peerDependencies": {
68
- "eslint": "^8.57.0 || ^9.0.0",
69
- "typescript": "^4.9.5 || ^5.3.3"
59
+ "eslint": "^9.29.0",
60
+ "typescript": "^4.9.5 || ^5.4.5"
70
61
  },
71
62
  "peerDependenciesMeta": {
72
63
  "eslint": {
@@ -78,7 +69,7 @@
78
69
  },
79
70
  "engines": {
80
71
  "bun": ">=1.0.15",
81
- "node": ">=18.18.0"
72
+ "node": ">=20.19.0"
82
73
  },
83
74
  "publishConfig": {
84
75
  "access": "public"