@eslint-react/eslint-plugin 1.8.0-beta.1 → 1.8.0-beta.2

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
@@ -32,14 +32,6 @@ A series of composable ESLint rules rewritten from scratch for libraries and fra
32
32
  - [`eslint-plugin-react-hooks-extra`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-hooks-extra) - Extra React Hooks rules.
33
33
  - [`eslint-plugin-react-naming-convention`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-naming-convention) - Naming convention rules.
34
34
 
35
- ## Supported ESLint versions
36
-
37
- - 8.57.0 or later
38
-
39
- ## Supported React versions
40
-
41
- - 18.2.0 or later
42
-
43
35
  ## Supported engines
44
36
 
45
37
  ### Node.js
@@ -142,6 +134,24 @@ Add the plugin to your `.eslintrc.json`:
142
134
 
143
135
  [Frequently Asked Questions ↗](https://eslint-react.xyz/docs/faq)
144
136
 
137
+ ## Who is using?
138
+
139
+ - [`antfu/​eslint-config`](https://github.com/antfu/eslint-config) - Anthony's ESLint config preset.
140
+ - [`christopher-buss/roblox-ts-eslint-config`](https://github.com/christopher-buss/roblox-ts-eslint-config) - iSentinel's ESLint config preset for Roblox-TS.
141
+ - [`DimensionDev/Maskbook`](https://github.com/DimensionDev/Maskbook) - The portal to the new, open Internet. ([I:b]).
142
+ - [`dream-num/univer`](https://github.com/dream-num/univer) - Univer is an open-source alternative to Google Sheets, Slides, and Docs.
143
+ - [`hairyf/overlastic`](https://github.com/hairyf/overlastic) - A universal overlays utils, support react, vue, vanilla, svelte.
144
+ - [`react-navigation/​react-navigation`](https://github.com/react-navigation/react-navigation) - Routing and navigation for your React Native apps.
145
+ - [`RSSNext/​follow`](https://github.com/RSSNext/follow) - 🧡 Next generation information browser.
146
+ - [`SukkaW/eslint-config-sukka`](https://github.com/SukkaW/eslint-config-sukka) - ESLint configuration of Sukka.
147
+ - [`SukkaW/foxact`](https://github.com/SukkaW/foxact) - React Hooks/Utils done right. For Browser, SSR, and React Server Components.
148
+ - [`TanStack/​form`](https://github.com/TanStack/form) - 🤖 Powerful and type-safe form state management for the web. TS/JS, React Form, Solid Form, Lit Form and Vue Form.
149
+ - [`TanStack/​query`](https://github.com/TanStack/query) - 🤖 Powerful asynchronous state management, server-state utilities and data fetching for the web. TS/JS, React Query, Solid Query, Svelte Query and Vue Query.
150
+ - [`TanStack/​router`](https://github.com/TanStack/router) - 🤖 Fully typesafe Router for React (and friends) w/ built-in caching, 1st class search-param APIs, client-side cache integration and isomorphic rendering.
151
+ - [`TanStack/​store`](https://github.com/TanStack/store) - 🤖 Framework agnostic, type-safe store w/ reactive framework adapters.
152
+
153
+ Find more projects using ESLint React on [GitHub](https://github.com/Rel1cx/eslint-react/network/dependents).
154
+
145
155
  ## Contributing
146
156
 
147
157
  Before you start working on something, it's best to check if there is an existing issue first. It's also a good idea to reach the maintainer and confirm if it makes sense or if someone else is already working on it.
package/dist/index.d.mts CHANGED
@@ -6,6 +6,13 @@ import * as reactHooksExtra from 'eslint-plugin-react-hooks-extra';
6
6
  import * as reactNamingConvention from 'eslint-plugin-react-naming-convention';
7
7
  import * as react from 'eslint-plugin-react-x';
8
8
 
9
+ declare const plugins: {
10
+ readonly "@eslint-react": typeof react;
11
+ readonly "@eslint-react/debug": typeof reactDebug;
12
+ readonly "@eslint-react/dom": typeof reactDom;
13
+ readonly "@eslint-react/hooks-extra": typeof reactHooksExtra;
14
+ readonly "@eslint-react/naming-convention": typeof reactNamingConvention;
15
+ };
9
16
  declare const _default: {
10
17
  readonly meta: {
11
18
  readonly name: string;
@@ -727,4 +734,4 @@ declare const _default: {
727
734
  };
728
735
  };
729
736
 
730
- export { _default as default };
737
+ export { _default as default, plugins };
package/dist/index.d.ts CHANGED
@@ -6,6 +6,13 @@ import * as reactHooksExtra from 'eslint-plugin-react-hooks-extra';
6
6
  import * as reactNamingConvention from 'eslint-plugin-react-naming-convention';
7
7
  import * as react from 'eslint-plugin-react-x';
8
8
 
9
+ declare const plugins: {
10
+ readonly "@eslint-react": typeof react;
11
+ readonly "@eslint-react/debug": typeof reactDebug;
12
+ readonly "@eslint-react/dom": typeof reactDom;
13
+ readonly "@eslint-react/hooks-extra": typeof reactHooksExtra;
14
+ readonly "@eslint-react/naming-convention": typeof reactNamingConvention;
15
+ };
9
16
  declare const _default: {
10
17
  readonly meta: {
11
18
  readonly name: string;
@@ -727,4 +734,4 @@ declare const _default: {
727
734
  };
728
735
  };
729
736
 
730
- export { _default as default };
737
+ export { _default as default, plugins };
package/dist/index.js CHANGED
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var shared = require('@eslint-react/shared');
4
6
  var reactDebug = require('eslint-plugin-react-debug');
5
7
  var reactDom = require('eslint-plugin-react-dom');
@@ -38,7 +40,7 @@ var R__namespace = /*#__PURE__*/_interopNamespace(R);
38
40
 
39
41
  // package.json
40
42
  var name = "@eslint-react/eslint-plugin";
41
- var version = "1.8.0-beta.1";
43
+ var version = "1.8.0-beta.2";
42
44
  function transformKeys(obj, transform) {
43
45
  if (tools.typeOf(obj) !== "object") return obj;
44
46
  const res = {};
@@ -232,8 +234,7 @@ var debugPreset = {
232
234
  var allPresetEntries = R__namespace.entries(allPreset);
233
235
  var offPreset = R__namespace.fromEntries(allPresetEntries.map(([key]) => [key, "off"]));
234
236
  var offDomPreset = R__namespace.fromEntries(R__namespace.entries(domPreset).map(([key]) => [key, "off"]));
235
- var legacyConfigPlugins = ["@eslint-react"];
236
- var flatConfigPlugins = {
237
+ var plugins = {
237
238
  "@eslint-react": react__namespace,
238
239
  "@eslint-react/debug": reactDebug__namespace,
239
240
  "@eslint-react/dom": reactDom__namespace,
@@ -242,16 +243,16 @@ var flatConfigPlugins = {
242
243
  };
243
244
  function createLegacyConfig(rules6, settings = shared.DEFAULT_ESLINT_REACT_SETTINGS) {
244
245
  return {
245
- plugins: legacyConfigPlugins,
246
+ plugins: ["@eslint-react"],
246
247
  rules: padKeysLeft(rules6, "@eslint-react/"),
247
248
  settings: {
248
249
  "react-x": settings
249
250
  }
250
251
  };
251
252
  }
252
- function createFlatConfig(rules6, settings = shared.DEFAULT_ESLINT_REACT_SETTINGS) {
253
+ function createConfig(rules6, settings = shared.DEFAULT_ESLINT_REACT_SETTINGS) {
253
254
  return {
254
- plugins: flatConfigPlugins,
255
+ plugins,
255
256
  rules: padKeysLeft(rules6, "@eslint-react/"),
256
257
  settings: {
257
258
  "react-x": settings
@@ -264,13 +265,13 @@ var src_default = {
264
265
  version
265
266
  },
266
267
  configs: {
267
- all: createFlatConfig(allPreset),
268
- debug: createFlatConfig(debugPreset),
269
- dom: createFlatConfig(domPreset, domPresetSettings),
270
- off: createFlatConfig(offPreset),
271
- "off-dom": createFlatConfig(offDomPreset),
272
- recommended: createFlatConfig(recommendedPreset),
273
- "recommended-type-checked": createFlatConfig(recommendedTypeCheckedPreset),
268
+ all: createConfig(allPreset),
269
+ debug: createConfig(debugPreset),
270
+ dom: createConfig(domPreset, domPresetSettings),
271
+ off: createConfig(offPreset),
272
+ "off-dom": createConfig(offDomPreset),
273
+ recommended: createConfig(recommendedPreset),
274
+ "recommended-type-checked": createConfig(recommendedTypeCheckedPreset),
274
275
  // eslint-disable-next-line perfectionist/sort-objects
275
276
  "all-legacy": createLegacyConfig(allPreset),
276
277
  "debug-legacy": createLegacyConfig(debugPreset),
@@ -289,4 +290,5 @@ var src_default = {
289
290
  }
290
291
  };
291
292
 
292
- module.exports = src_default;
293
+ exports.default = src_default;
294
+ exports.plugins = plugins;
package/dist/index.mjs CHANGED
@@ -11,7 +11,7 @@ import { typeOf } from '@eslint-react/tools';
11
11
 
12
12
  // package.json
13
13
  var name = "@eslint-react/eslint-plugin";
14
- var version = "1.8.0-beta.1";
14
+ var version = "1.8.0-beta.2";
15
15
  function transformKeys(obj, transform) {
16
16
  if (typeOf(obj) !== "object") return obj;
17
17
  const res = {};
@@ -205,8 +205,7 @@ var debugPreset = {
205
205
  var allPresetEntries = R.entries(allPreset);
206
206
  var offPreset = R.fromEntries(allPresetEntries.map(([key]) => [key, "off"]));
207
207
  var offDomPreset = R.fromEntries(R.entries(domPreset).map(([key]) => [key, "off"]));
208
- var legacyConfigPlugins = ["@eslint-react"];
209
- var flatConfigPlugins = {
208
+ var plugins = {
210
209
  "@eslint-react": react,
211
210
  "@eslint-react/debug": reactDebug,
212
211
  "@eslint-react/dom": reactDom,
@@ -215,16 +214,16 @@ var flatConfigPlugins = {
215
214
  };
216
215
  function createLegacyConfig(rules6, settings = DEFAULT_ESLINT_REACT_SETTINGS) {
217
216
  return {
218
- plugins: legacyConfigPlugins,
217
+ plugins: ["@eslint-react"],
219
218
  rules: padKeysLeft(rules6, "@eslint-react/"),
220
219
  settings: {
221
220
  "react-x": settings
222
221
  }
223
222
  };
224
223
  }
225
- function createFlatConfig(rules6, settings = DEFAULT_ESLINT_REACT_SETTINGS) {
224
+ function createConfig(rules6, settings = DEFAULT_ESLINT_REACT_SETTINGS) {
226
225
  return {
227
- plugins: flatConfigPlugins,
226
+ plugins,
228
227
  rules: padKeysLeft(rules6, "@eslint-react/"),
229
228
  settings: {
230
229
  "react-x": settings
@@ -237,13 +236,13 @@ var src_default = {
237
236
  version
238
237
  },
239
238
  configs: {
240
- all: createFlatConfig(allPreset),
241
- debug: createFlatConfig(debugPreset),
242
- dom: createFlatConfig(domPreset, domPresetSettings),
243
- off: createFlatConfig(offPreset),
244
- "off-dom": createFlatConfig(offDomPreset),
245
- recommended: createFlatConfig(recommendedPreset),
246
- "recommended-type-checked": createFlatConfig(recommendedTypeCheckedPreset),
239
+ all: createConfig(allPreset),
240
+ debug: createConfig(debugPreset),
241
+ dom: createConfig(domPreset, domPresetSettings),
242
+ off: createConfig(offPreset),
243
+ "off-dom": createConfig(offDomPreset),
244
+ recommended: createConfig(recommendedPreset),
245
+ "recommended-type-checked": createConfig(recommendedTypeCheckedPreset),
247
246
  // eslint-disable-next-line perfectionist/sort-objects
248
247
  "all-legacy": createLegacyConfig(allPreset),
249
248
  "debug-legacy": createLegacyConfig(debugPreset),
@@ -262,4 +261,4 @@ var src_default = {
262
261
  }
263
262
  };
264
263
 
265
- export { src_default as default };
264
+ export { src_default as default, plugins };
package/package.json CHANGED
@@ -1,16 +1,13 @@
1
1
  {
2
2
  "name": "@eslint-react/eslint-plugin",
3
- "version": "1.8.0-beta.1",
3
+ "version": "1.8.0-beta.2",
4
4
  "description": "The main ESLint plugin of ESLint React. Contains all the rules and presets of ESLint React.",
5
5
  "keywords": [
6
6
  "eslint",
7
7
  "eslint-plugin",
8
8
  "eslint-react",
9
9
  "react",
10
- "ts",
11
10
  "tsx",
12
- "typescript",
13
- "typescript-eslint",
14
11
  "typescript-react"
15
12
  ],
16
13
  "homepage": "https://github.com/rel1cx/eslint-react",
@@ -51,14 +48,14 @@
51
48
  "@typescript-eslint/types": "^8.0.0",
52
49
  "@typescript-eslint/utils": "^8.0.0",
53
50
  "remeda": "^2.6.0",
54
- "@eslint-react/tools": "1.8.0-beta.1",
55
- "eslint-plugin-react-debug": "1.8.0-beta.1",
56
- "@eslint-react/types": "1.8.0-beta.1",
57
- "@eslint-react/shared": "1.8.0-beta.1",
58
- "eslint-plugin-react-dom": "1.8.0-beta.1",
59
- "eslint-plugin-react-naming-convention": "1.8.0-beta.1",
60
- "eslint-plugin-react-x": "1.8.0-beta.1",
61
- "eslint-plugin-react-hooks-extra": "1.8.0-beta.1"
51
+ "@eslint-react/shared": "1.8.0-beta.2",
52
+ "@eslint-react/tools": "1.8.0-beta.2",
53
+ "@eslint-react/types": "1.8.0-beta.2",
54
+ "eslint-plugin-react-dom": "1.8.0-beta.2",
55
+ "eslint-plugin-react-debug": "1.8.0-beta.2",
56
+ "eslint-plugin-react-naming-convention": "1.8.0-beta.2",
57
+ "eslint-plugin-react-hooks-extra": "1.8.0-beta.2",
58
+ "eslint-plugin-react-x": "1.8.0-beta.2"
62
59
  },
63
60
  "devDependencies": {
64
61
  "tsup": "8.2.3"