@eslint-react/eslint-plugin 1.26.3-beta.2 → 1.26.3-beta.21

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
@@ -5,7 +5,7 @@ var reactDom = require('eslint-plugin-react-dom');
5
5
  var reactHooksExtra = require('eslint-plugin-react-hooks-extra');
6
6
  var reactNamingConvention = require('eslint-plugin-react-naming-convention');
7
7
  var reactWebApi = require('eslint-plugin-react-web-api');
8
- var react = require('eslint-plugin-react-x');
8
+ var reactx = require('eslint-plugin-react-x');
9
9
  var shared = require('@eslint-react/shared');
10
10
 
11
11
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
@@ -15,7 +15,7 @@ var reactDom__default = /*#__PURE__*/_interopDefault(reactDom);
15
15
  var reactHooksExtra__default = /*#__PURE__*/_interopDefault(reactHooksExtra);
16
16
  var reactNamingConvention__default = /*#__PURE__*/_interopDefault(reactNamingConvention);
17
17
  var reactWebApi__default = /*#__PURE__*/_interopDefault(reactWebApi);
18
- var react__default = /*#__PURE__*/_interopDefault(react);
18
+ var reactx__default = /*#__PURE__*/_interopDefault(reactx);
19
19
 
20
20
  var __defProp = Object.defineProperty;
21
21
  var __export = (target, all) => {
@@ -25,7 +25,7 @@ var __export = (target, all) => {
25
25
 
26
26
  // package.json
27
27
  var name = "@eslint-react/eslint-plugin";
28
- var version = "1.26.3-beta.2";
28
+ var version = "1.26.3-beta.21";
29
29
 
30
30
  // src/configs/all.ts
31
31
  var all_exports = {};
@@ -64,7 +64,7 @@ var rules = {
64
64
  "@eslint-react/no-default-props": "error",
65
65
  "@eslint-react/no-direct-mutation-state": "error",
66
66
  "@eslint-react/no-duplicate-jsx-props": "warn",
67
- "@eslint-react/no-duplicate-key": "error",
67
+ "@eslint-react/no-duplicate-key": "warn",
68
68
  "@eslint-react/no-forward-ref": "warn",
69
69
  "@eslint-react/no-implicit-key": "warn",
70
70
  "@eslint-react/no-missing-key": "error",
@@ -86,7 +86,7 @@ var rules = {
86
86
  "@eslint-react/use-jsx-vars": "warn"
87
87
  };
88
88
  var plugins = {
89
- "@eslint-react": react__default.default
89
+ "@eslint-react": reactx__default.default
90
90
  };
91
91
  var settings = {
92
92
  "react-x": shared.DEFAULT_ESLINT_REACT_SETTINGS
@@ -145,7 +145,7 @@ var rules3 = {
145
145
  "@eslint-react/no-default-props": "error",
146
146
  "@eslint-react/no-direct-mutation-state": "error",
147
147
  "@eslint-react/no-duplicate-jsx-props": "warn",
148
- "@eslint-react/no-duplicate-key": "error",
148
+ "@eslint-react/no-duplicate-key": "warn",
149
149
  "@eslint-react/no-forward-ref": "warn",
150
150
  "@eslint-react/no-implicit-key": "warn",
151
151
  "@eslint-react/no-missing-component-display-name": "warn",
@@ -390,11 +390,10 @@ function padKeysLeft(obj, left) {
390
390
  }
391
391
 
392
392
  // src/index.ts
393
- function makeLegacyConfig(config) {
394
- const { name: drop, ...rest } = config;
393
+ function toLegacyConfig({ rules: rules14 }) {
395
394
  return {
396
- ...rest,
397
- plugins: ["@eslint-react"]
395
+ plugins: ["@eslint-react"],
396
+ rules: rules14
398
397
  };
399
398
  }
400
399
  var index_default = {
@@ -404,38 +403,37 @@ var index_default = {
404
403
  },
405
404
  configs: {
406
405
  ["all"]: all_exports,
406
+ ["all-legacy"]: toLegacyConfig(all_exports),
407
407
  ["core"]: core_exports,
408
+ ["core-legacy"]: toLegacyConfig(core_exports),
408
409
  ["debug"]: debug_exports,
410
+ ["debug-legacy"]: toLegacyConfig(debug_exports),
409
411
  ["disable-debug"]: disable_debug_exports,
412
+ ["disable-debug-legacy"]: toLegacyConfig(disable_debug_exports),
410
413
  ["disable-dom"]: disable_dom_exports,
414
+ ["disable-dom-legacy"]: toLegacyConfig(disable_dom_exports),
411
415
  ["disable-type-checked"]: disable_type_checked_exports,
416
+ ["disable-type-checked-legacy"]: toLegacyConfig(disable_type_checked_exports),
412
417
  ["disable-web-api"]: disable_web_api_exports,
418
+ ["disable-web-api-legacy"]: toLegacyConfig(disable_web_api_exports),
413
419
  ["dom"]: dom_exports,
420
+ ["dom-legacy"]: toLegacyConfig(dom_exports),
414
421
  ["off"]: off_exports,
422
+ ["off-legacy"]: toLegacyConfig(off_exports),
415
423
  ["recommended"]: recommended_exports,
424
+ ["recommended-legacy"]: toLegacyConfig(recommended_exports),
416
425
  ["recommended-type-checked"]: recommended_type_checked_exports,
426
+ ["recommended-type-checked-legacy"]: toLegacyConfig(recommended_type_checked_exports),
417
427
  ["recommended-typescript"]: recommended_typescript_exports,
418
- // Part: legacy presets
419
- ["all-legacy"]: makeLegacyConfig(all_exports),
420
- ["core-legacy"]: makeLegacyConfig(core_exports),
421
- ["debug-legacy"]: makeLegacyConfig(debug_exports),
422
- ["disable-debug-legacy"]: makeLegacyConfig(disable_debug_exports),
423
- ["disable-dom-legacy"]: makeLegacyConfig(disable_dom_exports),
424
- ["disable-type-checked-legacy"]: makeLegacyConfig(disable_type_checked_exports),
425
- ["disable-web-api-legacy"]: makeLegacyConfig(disable_web_api_exports),
426
- ["dom-legacy"]: makeLegacyConfig(dom_exports),
427
- ["off-legacy"]: makeLegacyConfig(off_exports),
428
- ["recommended-legacy"]: makeLegacyConfig(recommended_exports),
429
- ["recommended-type-checked-legacy"]: makeLegacyConfig(recommended_type_checked_exports),
430
- ["recommended-typescript-legacy"]: makeLegacyConfig(recommended_typescript_exports),
428
+ ["recommended-typescript-legacy"]: toLegacyConfig(recommended_typescript_exports),
431
429
  // Part: deprecated presets
432
430
  /** @deprecated Use `disable-dom` instead */
433
431
  ["off-dom"]: disable_dom_exports,
434
432
  /** @deprecated Use `disable-dom-legacy` instead */
435
- ["off-dom-legacy"]: makeLegacyConfig(disable_dom_exports)
433
+ ["off-dom-legacy"]: toLegacyConfig(disable_dom_exports)
436
434
  },
437
435
  rules: {
438
- ...react__default.default.rules,
436
+ ...reactx__default.default.rules,
439
437
  ...padKeysLeft(reactDom__default.default.rules, "dom/"),
440
438
  ...padKeysLeft(reactWebApi__default.default.rules, "web-api/"),
441
439
  ...padKeysLeft(reactHooksExtra__default.default.rules, "hooks-extra/"),
package/dist/index.mjs CHANGED
@@ -3,7 +3,7 @@ import reactDom from 'eslint-plugin-react-dom';
3
3
  import reactHooksExtra from 'eslint-plugin-react-hooks-extra';
4
4
  import reactNamingConvention from 'eslint-plugin-react-naming-convention';
5
5
  import reactWebApi from 'eslint-plugin-react-web-api';
6
- import react from 'eslint-plugin-react-x';
6
+ import reactx from 'eslint-plugin-react-x';
7
7
  import { DEFAULT_ESLINT_REACT_SETTINGS } from '@eslint-react/shared';
8
8
 
9
9
  var __defProp = Object.defineProperty;
@@ -14,7 +14,7 @@ var __export = (target, all) => {
14
14
 
15
15
  // package.json
16
16
  var name = "@eslint-react/eslint-plugin";
17
- var version = "1.26.3-beta.2";
17
+ var version = "1.26.3-beta.21";
18
18
 
19
19
  // src/configs/all.ts
20
20
  var all_exports = {};
@@ -53,7 +53,7 @@ var rules = {
53
53
  "@eslint-react/no-default-props": "error",
54
54
  "@eslint-react/no-direct-mutation-state": "error",
55
55
  "@eslint-react/no-duplicate-jsx-props": "warn",
56
- "@eslint-react/no-duplicate-key": "error",
56
+ "@eslint-react/no-duplicate-key": "warn",
57
57
  "@eslint-react/no-forward-ref": "warn",
58
58
  "@eslint-react/no-implicit-key": "warn",
59
59
  "@eslint-react/no-missing-key": "error",
@@ -75,7 +75,7 @@ var rules = {
75
75
  "@eslint-react/use-jsx-vars": "warn"
76
76
  };
77
77
  var plugins = {
78
- "@eslint-react": react
78
+ "@eslint-react": reactx
79
79
  };
80
80
  var settings = {
81
81
  "react-x": DEFAULT_ESLINT_REACT_SETTINGS
@@ -134,7 +134,7 @@ var rules3 = {
134
134
  "@eslint-react/no-default-props": "error",
135
135
  "@eslint-react/no-direct-mutation-state": "error",
136
136
  "@eslint-react/no-duplicate-jsx-props": "warn",
137
- "@eslint-react/no-duplicate-key": "error",
137
+ "@eslint-react/no-duplicate-key": "warn",
138
138
  "@eslint-react/no-forward-ref": "warn",
139
139
  "@eslint-react/no-implicit-key": "warn",
140
140
  "@eslint-react/no-missing-component-display-name": "warn",
@@ -379,11 +379,10 @@ function padKeysLeft(obj, left) {
379
379
  }
380
380
 
381
381
  // src/index.ts
382
- function makeLegacyConfig(config) {
383
- const { name: drop, ...rest } = config;
382
+ function toLegacyConfig({ rules: rules14 }) {
384
383
  return {
385
- ...rest,
386
- plugins: ["@eslint-react"]
384
+ plugins: ["@eslint-react"],
385
+ rules: rules14
387
386
  };
388
387
  }
389
388
  var index_default = {
@@ -393,38 +392,37 @@ var index_default = {
393
392
  },
394
393
  configs: {
395
394
  ["all"]: all_exports,
395
+ ["all-legacy"]: toLegacyConfig(all_exports),
396
396
  ["core"]: core_exports,
397
+ ["core-legacy"]: toLegacyConfig(core_exports),
397
398
  ["debug"]: debug_exports,
399
+ ["debug-legacy"]: toLegacyConfig(debug_exports),
398
400
  ["disable-debug"]: disable_debug_exports,
401
+ ["disable-debug-legacy"]: toLegacyConfig(disable_debug_exports),
399
402
  ["disable-dom"]: disable_dom_exports,
403
+ ["disable-dom-legacy"]: toLegacyConfig(disable_dom_exports),
400
404
  ["disable-type-checked"]: disable_type_checked_exports,
405
+ ["disable-type-checked-legacy"]: toLegacyConfig(disable_type_checked_exports),
401
406
  ["disable-web-api"]: disable_web_api_exports,
407
+ ["disable-web-api-legacy"]: toLegacyConfig(disable_web_api_exports),
402
408
  ["dom"]: dom_exports,
409
+ ["dom-legacy"]: toLegacyConfig(dom_exports),
403
410
  ["off"]: off_exports,
411
+ ["off-legacy"]: toLegacyConfig(off_exports),
404
412
  ["recommended"]: recommended_exports,
413
+ ["recommended-legacy"]: toLegacyConfig(recommended_exports),
405
414
  ["recommended-type-checked"]: recommended_type_checked_exports,
415
+ ["recommended-type-checked-legacy"]: toLegacyConfig(recommended_type_checked_exports),
406
416
  ["recommended-typescript"]: recommended_typescript_exports,
407
- // Part: legacy presets
408
- ["all-legacy"]: makeLegacyConfig(all_exports),
409
- ["core-legacy"]: makeLegacyConfig(core_exports),
410
- ["debug-legacy"]: makeLegacyConfig(debug_exports),
411
- ["disable-debug-legacy"]: makeLegacyConfig(disable_debug_exports),
412
- ["disable-dom-legacy"]: makeLegacyConfig(disable_dom_exports),
413
- ["disable-type-checked-legacy"]: makeLegacyConfig(disable_type_checked_exports),
414
- ["disable-web-api-legacy"]: makeLegacyConfig(disable_web_api_exports),
415
- ["dom-legacy"]: makeLegacyConfig(dom_exports),
416
- ["off-legacy"]: makeLegacyConfig(off_exports),
417
- ["recommended-legacy"]: makeLegacyConfig(recommended_exports),
418
- ["recommended-type-checked-legacy"]: makeLegacyConfig(recommended_type_checked_exports),
419
- ["recommended-typescript-legacy"]: makeLegacyConfig(recommended_typescript_exports),
417
+ ["recommended-typescript-legacy"]: toLegacyConfig(recommended_typescript_exports),
420
418
  // Part: deprecated presets
421
419
  /** @deprecated Use `disable-dom` instead */
422
420
  ["off-dom"]: disable_dom_exports,
423
421
  /** @deprecated Use `disable-dom-legacy` instead */
424
- ["off-dom-legacy"]: makeLegacyConfig(disable_dom_exports)
422
+ ["off-dom-legacy"]: toLegacyConfig(disable_dom_exports)
425
423
  },
426
424
  rules: {
427
- ...react.rules,
425
+ ...reactx.rules,
428
426
  ...padKeysLeft(reactDom.rules, "dom/"),
429
427
  ...padKeysLeft(reactWebApi.rules, "web-api/"),
430
428
  ...padKeysLeft(reactHooksExtra.rules, "hooks-extra/"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/eslint-plugin",
3
- "version": "1.26.3-beta.2",
3
+ "version": "1.26.3-beta.21",
4
4
  "description": "More than 80 high-quality linting rules for writing better React code.",
5
5
  "keywords": [
6
6
  "react",
@@ -46,22 +46,22 @@
46
46
  "./package.json"
47
47
  ],
48
48
  "dependencies": {
49
- "@typescript-eslint/scope-manager": "^8.23.0",
50
- "@typescript-eslint/type-utils": "^8.23.0",
51
- "@typescript-eslint/types": "^8.23.0",
52
- "@typescript-eslint/utils": "^8.23.0",
53
- "@eslint-react/eff": "1.26.3-beta.2",
54
- "@eslint-react/shared": "1.26.3-beta.2",
55
- "eslint-plugin-react-dom": "1.26.3-beta.2",
56
- "eslint-plugin-react-hooks-extra": "1.26.3-beta.2",
57
- "eslint-plugin-react-debug": "1.26.3-beta.2",
58
- "eslint-plugin-react-web-api": "1.26.3-beta.2",
59
- "eslint-plugin-react-x": "1.26.3-beta.2",
60
- "eslint-plugin-react-naming-convention": "1.26.3-beta.2"
49
+ "@typescript-eslint/scope-manager": "^8.24.1",
50
+ "@typescript-eslint/type-utils": "^8.24.1",
51
+ "@typescript-eslint/types": "^8.24.1",
52
+ "@typescript-eslint/utils": "^8.24.1",
53
+ "@eslint-react/shared": "1.26.3-beta.21",
54
+ "eslint-plugin-react-debug": "1.26.3-beta.21",
55
+ "eslint-plugin-react-dom": "1.26.3-beta.21",
56
+ "@eslint-react/eff": "1.26.3-beta.21",
57
+ "eslint-plugin-react-hooks-extra": "1.26.3-beta.21",
58
+ "eslint-plugin-react-naming-convention": "1.26.3-beta.21",
59
+ "eslint-plugin-react-x": "1.26.3-beta.21",
60
+ "eslint-plugin-react-web-api": "1.26.3-beta.21"
61
61
  },
62
62
  "devDependencies": {
63
63
  "tsup": "^8.3.6",
64
- "@workspace/configs": "0.0.0"
64
+ "@local/configs": "0.0.0"
65
65
  },
66
66
  "peerDependencies": {
67
67
  "eslint": "^8.57.0 || ^9.0.0",
@@ -85,6 +85,6 @@
85
85
  "scripts": {
86
86
  "build": "tsup --dts-resolve",
87
87
  "lint:publish": "pnpm publint",
88
- "lint:type": "tsc --noEmit"
88
+ "lint:ts": "tsc --noEmit"
89
89
  }
90
90
  }