@eslint-react/eslint-plugin 3.0.0-next.6 → 3.0.0-next.60

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/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  [![Version](https://img.shields.io/npm/v/@eslint-react/eslint-plugin?style=flat&colorA=111111&colorB=000000)](https://npmjs.com/package/@eslint-react/eslint-plugin)
6
6
  [![Downloads](https://img.shields.io/npm/dt/@eslint-react/eslint-plugin.svg?style=flat&colorA=222222&colorB=000000)](https://npmjs.com/package/@eslint-react/eslint-plugin)
7
7
  [![License](https://img.shields.io/npm/l/@eslint-react/eslint-plugin?style=flat&colorA=333333&colorB=000000)](https://npmjs.com/package/@eslint-react/eslint-plugin)
8
- [![Build with](https://img.shields.io/badge/built_with-tsdown@0.20.3-000000?style=flat)](https://tsdown.dev)
8
+ [![Build with](https://img.shields.io/badge/built_with-tsdown@0.21.0--beta.2-000000?style=flat)](https://tsdown.dev)
9
9
 
10
10
  4-7x faster, composable ESLint rules for React and friends.
11
11
 
@@ -28,6 +28,7 @@
28
28
  - [Rules](#rules)
29
29
  - [Benchmark](#benchmark)
30
30
  - [FAQ](#faq)
31
+ - [Changelog](#changelog)
31
32
  - [Roadmap](#roadmap)
32
33
  - [Disclaimer](#disclaimer)
33
34
  - [Contributing](#contributing)
@@ -44,15 +45,15 @@
44
45
 
45
46
  ### Unified ESLint Plugin
46
47
 
47
- - [`@eslint-react/eslint-plugin`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin) - A unified plugin that combines all individual plugins into one.
48
+ - [`@eslint-react/eslint-plugin`](https://npmx.dev/package/@eslint-react/eslint-plugin) - A unified plugin that combines all individual plugins into one.
48
49
 
49
50
  ### Modular ESLint Plugins
50
51
 
51
- - [`eslint-plugin-react-x`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) - X rules (renderer-agnostic, compatible with x-platform).
52
- - [`eslint-plugin-react-rsc`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-rsc) - Rules for React Server Components.
53
- - [`eslint-plugin-react-dom`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) - DOM-specific rules for React DOM.
54
- - [`eslint-plugin-react-web-api`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-web-api) - Rules for interacting with Web APIs.
55
- - [`eslint-plugin-react-naming-convention`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-naming-convention) - Naming convention rules.
52
+ - [`eslint-plugin-react-x`](https://npmx.dev/package/eslint-plugin-react-x) - X rules (renderer-agnostic, compatible with x-platform).
53
+ - [`eslint-plugin-react-rsc`](https://npmx.dev/package/eslint-plugin-react-rsc) - Rules for React Server Components.
54
+ - [`eslint-plugin-react-dom`](https://npmx.dev/package/eslint-plugin-react-dom) - DOM-specific rules for React DOM.
55
+ - [`eslint-plugin-react-web-api`](https://npmx.dev/package/eslint-plugin-react-web-api) - Rules for interacting with Web APIs.
56
+ - [`eslint-plugin-react-naming-convention`](https://npmx.dev/package/eslint-plugin-react-naming-convention) - Naming convention rules.
56
57
 
57
58
  > [!NOTE]\
58
59
  > Don't know which one to use? See our [FAQ](https://eslint-react.xyz/docs/faq#which-one-should-i-use-unified-plugin-or-individual-plugins) for guidance.
@@ -195,6 +196,10 @@ export default defineConfig(
195
196
 
196
197
  [Frequently Asked Questions ↗](https://eslint-react.xyz/docs/faq)
197
198
 
199
+ ## Changelog
200
+
201
+ [Changelog ↗](https://www.eslint-react.xyz/docs/changelog)
202
+
198
203
  ## Roadmap
199
204
 
200
205
  - [Milestone 3.0 ↗](https://eslint-react.xyz/docs/roadmap#milestone-30-tbd)
package/dist/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- import { CompatibleConfig, CompatiblePlugin } from "@eslint-react/shared";
1
+ import { ESLint, Linter } from "eslint";
2
2
 
3
3
  //#region src/index.d.ts
4
- type ConfigName = "all" | "disable-conflict-eslint-plugin-react" | "disable-dom" | "disable-rsc" | "disable-experimental" | "disable-type-checked" | "disable-web-api" | "dom" | "rsc" | "no-deprecated" | "off" | "recommended" | "recommended-type-checked" | "recommended-typescript" | "strict" | "strict-type-checked" | "strict-typescript" | "web-api" | "x";
5
- declare const plugin: CompatiblePlugin & {
4
+ type ConfigName = "all" | "disable-conflict-eslint-plugin-react" | "disable-conflict-eslint-plugin-react-hooks" | "disable-dom" | "disable-rsc" | "disable-experimental" | "disable-type-checked" | "disable-web-api" | "dom" | "rsc" | "no-deprecated" | "off" | "recommended" | "recommended-type-checked" | "recommended-typescript" | "strict" | "strict-type-checked" | "strict-typescript" | "web-api" | "x";
5
+ declare const plugin: ESLint.Plugin & {
6
6
  /**
7
7
  * For more information about each preset, please refer to the documentation.
8
8
  * @see https://eslint-react.xyz/docs/presets
9
9
  */
10
- configs: Record<ConfigName, CompatibleConfig>;
10
+ configs: Record<ConfigName, Linter.Config>;
11
11
  };
12
12
  //#endregion
13
13
  export { plugin as default };
package/dist/index.js CHANGED
@@ -23,18 +23,18 @@ var __exportAll = (all, no_symbols) => {
23
23
 
24
24
  //#endregion
25
25
  //#region package.json
26
- var name$19 = "@eslint-react/eslint-plugin";
27
- var version = "3.0.0-next.6";
26
+ var name$20 = "@eslint-react/eslint-plugin";
27
+ var version = "3.0.0-next.60";
28
28
 
29
29
  //#endregion
30
30
  //#region src/configs/dom.ts
31
31
  var dom_exports = /* @__PURE__ */ __exportAll({
32
- name: () => name$18,
32
+ name: () => name$19,
33
33
  plugins: () => plugins$11,
34
- rules: () => rules$19
34
+ rules: () => rules$20
35
35
  });
36
- const name$18 = "@eslint-react/dom";
37
- const rules$19 = {
36
+ const name$19 = "@eslint-react/dom";
37
+ const rules$20 = {
38
38
  "@eslint-react/dom/no-dangerously-set-innerhtml": "warn",
39
39
  "@eslint-react/dom/no-dangerously-set-innerhtml-with-children": "error",
40
40
  "@eslint-react/dom/no-find-dom-node": "error",
@@ -53,24 +53,24 @@ const plugins$11 = { "@eslint-react/dom": reactDom };
53
53
  //#endregion
54
54
  //#region src/configs/rsc.ts
55
55
  var rsc_exports = /* @__PURE__ */ __exportAll({
56
- name: () => name$17,
56
+ name: () => name$18,
57
57
  plugins: () => plugins$10,
58
- rules: () => rules$18
58
+ rules: () => rules$19
59
59
  });
60
- const name$17 = "@eslint-react/rsc";
61
- const rules$18 = { "@eslint-react/rsc/function-definition": "error" };
60
+ const name$18 = "@eslint-react/rsc";
61
+ const rules$19 = { "@eslint-react/rsc/function-definition": "error" };
62
62
  const plugins$10 = { "@eslint-react/rsc": reactRsc };
63
63
 
64
64
  //#endregion
65
65
  //#region src/configs/x.ts
66
66
  var x_exports = /* @__PURE__ */ __exportAll({
67
- name: () => name$16,
67
+ name: () => name$17,
68
68
  plugins: () => plugins$9,
69
- rules: () => rules$17,
69
+ rules: () => rules$18,
70
70
  settings: () => settings$8
71
71
  });
72
- const name$16 = "@eslint-react/x";
73
- const rules$17 = {
72
+ const name$17 = "@eslint-react/x";
73
+ const rules$18 = {
74
74
  "@eslint-react/component-hook-factories": "error",
75
75
  "@eslint-react/error-boundaries": "error",
76
76
  "@eslint-react/exhaustive-deps": "warn",
@@ -107,12 +107,13 @@ const rules$17 = {
107
107
  "@eslint-react/no-unsafe-component-will-update": "warn",
108
108
  "@eslint-react/no-unused-class-component-members": "warn",
109
109
  "@eslint-react/no-use-context": "warn",
110
- "@eslint-react/no-useless-forward-ref": "warn",
111
- "@eslint-react/prefer-use-state-lazy-initialization": "warn",
112
110
  "@eslint-react/purity": "warn",
113
111
  "@eslint-react/rules-of-hooks": "error",
114
112
  "@eslint-react/set-state-in-effect": "warn",
115
- "@eslint-react/set-state-in-render": "error"
113
+ "@eslint-react/set-state-in-render": "error",
114
+ "@eslint-react/unsupported-syntax": "error",
115
+ "@eslint-react/use-memo": "error",
116
+ "@eslint-react/use-state": "warn"
116
117
  };
117
118
  const plugins$9 = { "@eslint-react": react };
118
119
  const settings$8 = { "react-x": DEFAULT_ESLINT_REACT_SETTINGS };
@@ -120,22 +121,21 @@ const settings$8 = { "react-x": DEFAULT_ESLINT_REACT_SETTINGS };
120
121
  //#endregion
121
122
  //#region src/configs/all.ts
122
123
  var all_exports = /* @__PURE__ */ __exportAll({
123
- name: () => name$15,
124
+ name: () => name$16,
124
125
  plugins: () => plugins$8,
125
- rules: () => rules$16,
126
+ rules: () => rules$17,
126
127
  settings: () => settings$7
127
128
  });
128
- const name$15 = "@eslint-react/all";
129
- const rules$16 = {
129
+ const name$16 = "@eslint-react/all";
130
+ const rules$17 = {
130
131
  "@eslint-react/component-hook-factories": "error",
131
132
  "@eslint-react/error-boundaries": "error",
132
133
  "@eslint-react/exhaustive-deps": "warn",
134
+ "@eslint-react/immutability": "error",
133
135
  "@eslint-react/jsx-dollar": "warn",
134
136
  "@eslint-react/jsx-key-before-spread": "warn",
135
137
  "@eslint-react/jsx-no-comment-textnodes": "warn",
136
138
  "@eslint-react/jsx-no-duplicate-props": "warn",
137
- "@eslint-react/jsx-no-iife": "warn",
138
- "@eslint-react/jsx-no-undef": "error",
139
139
  "@eslint-react/jsx-shorthand-boolean": "warn",
140
140
  "@eslint-react/jsx-shorthand-fragment": "warn",
141
141
  "@eslint-react/jsx-uses-react": "warn",
@@ -179,14 +179,17 @@ const rules$16 = {
179
179
  "@eslint-react/no-unused-class-component-members": "warn",
180
180
  "@eslint-react/no-unused-state": "warn",
181
181
  "@eslint-react/no-use-context": "warn",
182
- "@eslint-react/no-useless-forward-ref": "warn",
183
182
  "@eslint-react/no-useless-fragment": "warn",
184
183
  "@eslint-react/prefer-destructuring-assignment": "warn",
185
184
  "@eslint-react/prefer-namespace-import": "warn",
186
- "@eslint-react/prefer-use-state-lazy-initialization": "warn",
187
185
  "@eslint-react/purity": "warn",
186
+ "@eslint-react/refs": "error",
188
187
  "@eslint-react/rules-of-hooks": "error",
189
188
  "@eslint-react/set-state-in-effect": "warn",
189
+ "@eslint-react/set-state-in-render": "error",
190
+ "@eslint-react/unsupported-syntax": "error",
191
+ "@eslint-react/use-memo": "error",
192
+ "@eslint-react/use-state": "warn",
190
193
  "@eslint-react/dom/no-dangerously-set-innerhtml": "warn",
191
194
  "@eslint-react/dom/no-dangerously-set-innerhtml-with-children": "error",
192
195
  "@eslint-react/dom/no-find-dom-node": "error",
@@ -210,11 +213,9 @@ const rules$16 = {
210
213
  "@eslint-react/web-api/no-leaked-interval": "warn",
211
214
  "@eslint-react/web-api/no-leaked-resize-observer": "warn",
212
215
  "@eslint-react/web-api/no-leaked-timeout": "warn",
213
- "@eslint-react/naming-convention/component-name": "warn",
214
216
  "@eslint-react/naming-convention/context-name": "warn",
215
217
  "@eslint-react/naming-convention/id-name": "warn",
216
- "@eslint-react/naming-convention/ref-name": "warn",
217
- "@eslint-react/naming-convention/use-state": "warn"
218
+ "@eslint-react/naming-convention/ref-name": "warn"
218
219
  };
219
220
  const plugins$8 = {
220
221
  ...plugins$9,
@@ -228,10 +229,10 @@ const settings$7 = { ...settings$8 };
228
229
  //#endregion
229
230
  //#region src/configs/disable-conflict-eslint-plugin-react.ts
230
231
  var disable_conflict_eslint_plugin_react_exports = /* @__PURE__ */ __exportAll({
231
- name: () => name$14,
232
- rules: () => rules$15
232
+ name: () => name$15,
233
+ rules: () => rules$16
233
234
  });
234
- const conflictingRules = [
235
+ const conflictingRules$1 = [
235
236
  "react/button-has-type",
236
237
  "react/destructuring-assignment",
237
238
  "react/display-name",
@@ -249,7 +250,6 @@ const conflictingRules = [
249
250
  "react/jsx-no-leaked-render",
250
251
  "react/jsx-no-script-url",
251
252
  "react/jsx-no-target-blank",
252
- "react/jsx-no-undef",
253
253
  "react/jsx-no-useless-fragment",
254
254
  "react/jsx-pascal-case",
255
255
  "react/jsx-uses-react",
@@ -275,11 +275,33 @@ const conflictingRules = [
275
275
  "react/no-unused-class-component-members",
276
276
  "react/no-unused-state",
277
277
  "react/no-will-update-set-state",
278
- "react/prefer-read-only-props",
279
278
  "react/prop-types",
280
279
  "react/void-dom-elements-no-children"
281
280
  ];
282
- const name$14 = "@eslint-react/disable-conflict-eslint-plugin-react";
281
+ const name$15 = "@eslint-react/disable-conflict-eslint-plugin-react";
282
+ const rules$16 = Object.fromEntries(conflictingRules$1.map((key) => [key, "off"]));
283
+
284
+ //#endregion
285
+ //#region src/configs/disable-conflict-eslint-plugin-react-hooks.ts
286
+ var disable_conflict_eslint_plugin_react_hooks_exports = /* @__PURE__ */ __exportAll({
287
+ name: () => name$14,
288
+ rules: () => rules$15
289
+ });
290
+ const conflictingRules = [
291
+ "react-hooks/exhaustive-deps",
292
+ "react-hooks/rules-of-hooks",
293
+ "react-hooks/component-hook-factories",
294
+ "react-hooks/error-boundaries",
295
+ "react-hooks/immutability",
296
+ "react-hooks/purity",
297
+ "react-hooks/refs",
298
+ "react-hooks/set-state-in-effect",
299
+ "react-hooks/set-state-in-render",
300
+ "react-hooks/static-components",
301
+ "react-hooks/unsupported-syntax",
302
+ "react-hooks/use-memo"
303
+ ];
304
+ const name$14 = "@eslint-react/disable-conflict-eslint-plugin-react-hooks";
283
305
  const rules$15 = Object.fromEntries(conflictingRules.map((key) => [key, "off"]));
284
306
 
285
307
  //#endregion
@@ -289,7 +311,7 @@ var disable_dom_exports = /* @__PURE__ */ __exportAll({
289
311
  rules: () => rules$14
290
312
  });
291
313
  const name$13 = "@eslint-react/disable-dom";
292
- const rules$14 = Object.fromEntries(Object.entries(rules$19).map(([key]) => [key, "off"]));
314
+ const rules$14 = Object.fromEntries(Object.entries(rules$20).map(([key]) => [key, "off"]));
293
315
 
294
316
  //#endregion
295
317
  //#region src/configs/disable-experimental.ts
@@ -299,15 +321,17 @@ var disable_experimental_exports = /* @__PURE__ */ __exportAll({
299
321
  });
300
322
  const name$12 = "@eslint-react/disable-experimental";
301
323
  const rules$13 = {
324
+ "@eslint-react/exhaustive-deps": "off",
302
325
  "@eslint-react/jsx-key-before-spread": "off",
303
- "@eslint-react/jsx-no-iife": "off",
304
326
  "@eslint-react/no-duplicate-key": "off",
305
327
  "@eslint-react/no-implicit-key": "off",
306
328
  "@eslint-react/no-misused-capture-owner-stack": "off",
307
329
  "@eslint-react/no-unnecessary-use-callback": "off",
308
330
  "@eslint-react/no-unnecessary-use-memo": "off",
309
331
  "@eslint-react/no-unused-props": "off",
310
- "@eslint-react/prefer-read-only-props": "off",
332
+ "@eslint-react/refs": "off",
333
+ "@eslint-react/rules-of-hooks": "off",
334
+ "@eslint-react/set-state-in-render": "off",
311
335
  "@eslint-react/rsc/function-definition": "off"
312
336
  };
313
337
 
@@ -318,7 +342,7 @@ var disable_rsc_exports = /* @__PURE__ */ __exportAll({
318
342
  rules: () => rules$12
319
343
  });
320
344
  const name$11 = "@eslint-react/disable-rsc";
321
- const rules$12 = Object.fromEntries(Object.entries(rules$18).map(([key]) => [key, "off"]));
345
+ const rules$12 = Object.fromEntries(Object.entries(rules$19).map(([key]) => [key, "off"]));
322
346
 
323
347
  //#endregion
324
348
  //#region src/configs/disable-type-checked.ts
@@ -330,8 +354,7 @@ const name$10 = "@eslint-react/disable-type-checked";
330
354
  const rules$11 = {
331
355
  "@eslint-react/no-implicit-key": "off",
332
356
  "@eslint-react/no-leaked-conditional-rendering": "off",
333
- "@eslint-react/no-unused-props": "off",
334
- "@eslint-react/prefer-read-only-props": "off"
357
+ "@eslint-react/no-unused-props": "off"
335
358
  };
336
359
 
337
360
  //#endregion
@@ -393,7 +416,7 @@ var off_exports = /* @__PURE__ */ __exportAll({
393
416
  });
394
417
  const name$6 = "@eslint-react/off";
395
418
  const rules$7 = {
396
- ...Object.fromEntries(Object.entries(rules$16).map(([key]) => [key, "off"])),
419
+ ...Object.fromEntries(Object.entries(rules$17).map(([key]) => [key, "off"])),
397
420
  ...rules$11
398
421
  };
399
422
 
@@ -407,14 +430,14 @@ var recommended_exports = /* @__PURE__ */ __exportAll({
407
430
  });
408
431
  const name$5 = "@eslint-react/recommended";
409
432
  const rules$6 = {
410
- ...rules$17,
411
433
  ...rules$18,
412
434
  ...rules$19,
435
+ ...rules$20,
413
436
  ...rules$10,
414
437
  "@eslint-react/naming-convention/context-name": "warn",
415
438
  "@eslint-react/naming-convention/id-name": "warn",
416
439
  "@eslint-react/naming-convention/ref-name": "warn",
417
- "@eslint-react/naming-convention/use-state": "warn"
440
+ "@eslint-react/use-state": "warn"
418
441
  };
419
442
  const plugins$5 = {
420
443
  ...plugins$9,
@@ -434,7 +457,6 @@ const rules$5 = {
434
457
  "@eslint-react/dom/no-string-style-prop": "off",
435
458
  "@eslint-react/dom/no-unknown-property": "off",
436
459
  "@eslint-react/jsx-no-duplicate-props": "off",
437
- "@eslint-react/jsx-no-undef": "off",
438
460
  "@eslint-react/jsx-uses-react": "off",
439
461
  "@eslint-react/jsx-uses-vars": "off"
440
462
  };
@@ -483,7 +505,6 @@ var strict_exports = /* @__PURE__ */ __exportAll({
483
505
  const name$2 = "@eslint-react/strict";
484
506
  const rules$2 = {
485
507
  ...rules$6,
486
- "@eslint-react/jsx-no-iife": "error",
487
508
  "@eslint-react/no-children-prop": "error",
488
509
  "@eslint-react/no-class-component": "error",
489
510
  "@eslint-react/no-misused-capture-owner-stack": "error",
@@ -539,12 +560,13 @@ const settings = { ...settings$1 };
539
560
  //#region src/index.ts
540
561
  const plugin = {
541
562
  meta: {
542
- name: name$19,
563
+ name: name$20,
543
564
  version
544
565
  },
545
566
  configs: {
546
567
  ["all"]: all_exports,
547
568
  ["disable-conflict-eslint-plugin-react"]: disable_conflict_eslint_plugin_react_exports,
569
+ ["disable-conflict-eslint-plugin-react-hooks"]: disable_conflict_eslint_plugin_react_hooks_exports,
548
570
  ["disable-dom"]: disable_dom_exports,
549
571
  ["disable-experimental"]: disable_experimental_exports,
550
572
  ["disable-rsc"]: disable_rsc_exports,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/eslint-plugin",
3
- "version": "3.0.0-next.6",
3
+ "version": "3.0.0-next.60",
4
4
  "description": "A unified plugin that combines all individual plugins from the eslint-react monorepo into one.",
5
5
  "keywords": [
6
6
  "react",
@@ -46,16 +46,16 @@
46
46
  "@typescript-eslint/types": "canary",
47
47
  "@typescript-eslint/utils": "canary",
48
48
  "ts-api-utils": "^2.4.0",
49
- "@eslint-react/shared": "3.0.0-next.6",
50
- "@eslint-react/eff": "3.0.0-next.6",
51
- "eslint-plugin-react-dom": "3.0.0-next.6",
52
- "eslint-plugin-react-naming-convention": "3.0.0-next.6",
53
- "eslint-plugin-react-x": "3.0.0-next.6",
54
- "eslint-plugin-react-rsc": "3.0.0-next.6",
55
- "eslint-plugin-react-web-api": "3.0.0-next.6"
49
+ "@eslint-react/eff": "3.0.0-next.60",
50
+ "@eslint-react/shared": "3.0.0-next.60",
51
+ "eslint-plugin-react-naming-convention": "3.0.0-next.60",
52
+ "eslint-plugin-react-rsc": "3.0.0-next.60",
53
+ "eslint-plugin-react-web-api": "3.0.0-next.60",
54
+ "eslint-plugin-react-x": "3.0.0-next.60",
55
+ "eslint-plugin-react-dom": "3.0.0-next.60"
56
56
  },
57
57
  "devDependencies": {
58
- "tsdown": "^0.20.3",
58
+ "tsdown": "^0.21.0-beta.2",
59
59
  "@local/configs": "0.0.0"
60
60
  },
61
61
  "peerDependencies": {
@@ -71,6 +71,6 @@
71
71
  "scripts": {
72
72
  "build": "tsdown",
73
73
  "lint:publish": "pnpm publint",
74
- "lint:ts": "tsc --noEmit"
74
+ "lint:ts": "tsl"
75
75
  }
76
76
  }