@eslint-react/eslint-plugin 1.26.3-next.8 → 1.27.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/README.md +5 -5
- package/dist/index.d.mts +2189 -369
- package/dist/index.d.ts +2189 -369
- package/dist/index.js +24 -25
- package/dist/index.mjs +23 -24
- package/package.json +14 -14
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
|
|
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
|
|
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.
|
|
28
|
+
var version = "1.27.0-beta.1";
|
|
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": "
|
|
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":
|
|
89
|
+
"@eslint-react": reactx__default.default
|
|
90
90
|
};
|
|
91
91
|
var settings = {
|
|
92
92
|
"react-x": shared.DEFAULT_ESLINT_REACT_SETTINGS
|
|
@@ -145,10 +145,11 @@ 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": "
|
|
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",
|
|
152
|
+
"@eslint-react/no-missing-context-display-name": "warn",
|
|
152
153
|
"@eslint-react/no-missing-key": "error",
|
|
153
154
|
"@eslint-react/no-nested-components": "error",
|
|
154
155
|
"@eslint-react/no-prop-types": "error",
|
|
@@ -390,11 +391,10 @@ function padKeysLeft(obj, left) {
|
|
|
390
391
|
}
|
|
391
392
|
|
|
392
393
|
// src/index.ts
|
|
393
|
-
function
|
|
394
|
-
const { name: drop, ...rest } = config;
|
|
394
|
+
function toLegacyConfig({ rules: rules14 }) {
|
|
395
395
|
return {
|
|
396
|
-
|
|
397
|
-
|
|
396
|
+
plugins: ["@eslint-react"],
|
|
397
|
+
rules: rules14
|
|
398
398
|
};
|
|
399
399
|
}
|
|
400
400
|
var index_default = {
|
|
@@ -404,38 +404,37 @@ var index_default = {
|
|
|
404
404
|
},
|
|
405
405
|
configs: {
|
|
406
406
|
["all"]: all_exports,
|
|
407
|
+
["all-legacy"]: toLegacyConfig(all_exports),
|
|
407
408
|
["core"]: core_exports,
|
|
409
|
+
["core-legacy"]: toLegacyConfig(core_exports),
|
|
408
410
|
["debug"]: debug_exports,
|
|
411
|
+
["debug-legacy"]: toLegacyConfig(debug_exports),
|
|
409
412
|
["disable-debug"]: disable_debug_exports,
|
|
413
|
+
["disable-debug-legacy"]: toLegacyConfig(disable_debug_exports),
|
|
410
414
|
["disable-dom"]: disable_dom_exports,
|
|
415
|
+
["disable-dom-legacy"]: toLegacyConfig(disable_dom_exports),
|
|
411
416
|
["disable-type-checked"]: disable_type_checked_exports,
|
|
417
|
+
["disable-type-checked-legacy"]: toLegacyConfig(disable_type_checked_exports),
|
|
412
418
|
["disable-web-api"]: disable_web_api_exports,
|
|
419
|
+
["disable-web-api-legacy"]: toLegacyConfig(disable_web_api_exports),
|
|
413
420
|
["dom"]: dom_exports,
|
|
421
|
+
["dom-legacy"]: toLegacyConfig(dom_exports),
|
|
414
422
|
["off"]: off_exports,
|
|
423
|
+
["off-legacy"]: toLegacyConfig(off_exports),
|
|
415
424
|
["recommended"]: recommended_exports,
|
|
425
|
+
["recommended-legacy"]: toLegacyConfig(recommended_exports),
|
|
416
426
|
["recommended-type-checked"]: recommended_type_checked_exports,
|
|
427
|
+
["recommended-type-checked-legacy"]: toLegacyConfig(recommended_type_checked_exports),
|
|
417
428
|
["recommended-typescript"]: recommended_typescript_exports,
|
|
418
|
-
|
|
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),
|
|
429
|
+
["recommended-typescript-legacy"]: toLegacyConfig(recommended_typescript_exports),
|
|
431
430
|
// Part: deprecated presets
|
|
432
431
|
/** @deprecated Use `disable-dom` instead */
|
|
433
432
|
["off-dom"]: disable_dom_exports,
|
|
434
433
|
/** @deprecated Use `disable-dom-legacy` instead */
|
|
435
|
-
["off-dom-legacy"]:
|
|
434
|
+
["off-dom-legacy"]: toLegacyConfig(disable_dom_exports)
|
|
436
435
|
},
|
|
437
436
|
rules: {
|
|
438
|
-
...
|
|
437
|
+
...reactx__default.default.rules,
|
|
439
438
|
...padKeysLeft(reactDom__default.default.rules, "dom/"),
|
|
440
439
|
...padKeysLeft(reactWebApi__default.default.rules, "web-api/"),
|
|
441
440
|
...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
|
|
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.
|
|
17
|
+
var version = "1.27.0-beta.1";
|
|
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": "
|
|
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":
|
|
78
|
+
"@eslint-react": reactx
|
|
79
79
|
};
|
|
80
80
|
var settings = {
|
|
81
81
|
"react-x": DEFAULT_ESLINT_REACT_SETTINGS
|
|
@@ -134,10 +134,11 @@ 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": "
|
|
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",
|
|
141
|
+
"@eslint-react/no-missing-context-display-name": "warn",
|
|
141
142
|
"@eslint-react/no-missing-key": "error",
|
|
142
143
|
"@eslint-react/no-nested-components": "error",
|
|
143
144
|
"@eslint-react/no-prop-types": "error",
|
|
@@ -379,11 +380,10 @@ function padKeysLeft(obj, left) {
|
|
|
379
380
|
}
|
|
380
381
|
|
|
381
382
|
// src/index.ts
|
|
382
|
-
function
|
|
383
|
-
const { name: drop, ...rest } = config;
|
|
383
|
+
function toLegacyConfig({ rules: rules14 }) {
|
|
384
384
|
return {
|
|
385
|
-
|
|
386
|
-
|
|
385
|
+
plugins: ["@eslint-react"],
|
|
386
|
+
rules: rules14
|
|
387
387
|
};
|
|
388
388
|
}
|
|
389
389
|
var index_default = {
|
|
@@ -393,38 +393,37 @@ var index_default = {
|
|
|
393
393
|
},
|
|
394
394
|
configs: {
|
|
395
395
|
["all"]: all_exports,
|
|
396
|
+
["all-legacy"]: toLegacyConfig(all_exports),
|
|
396
397
|
["core"]: core_exports,
|
|
398
|
+
["core-legacy"]: toLegacyConfig(core_exports),
|
|
397
399
|
["debug"]: debug_exports,
|
|
400
|
+
["debug-legacy"]: toLegacyConfig(debug_exports),
|
|
398
401
|
["disable-debug"]: disable_debug_exports,
|
|
402
|
+
["disable-debug-legacy"]: toLegacyConfig(disable_debug_exports),
|
|
399
403
|
["disable-dom"]: disable_dom_exports,
|
|
404
|
+
["disable-dom-legacy"]: toLegacyConfig(disable_dom_exports),
|
|
400
405
|
["disable-type-checked"]: disable_type_checked_exports,
|
|
406
|
+
["disable-type-checked-legacy"]: toLegacyConfig(disable_type_checked_exports),
|
|
401
407
|
["disable-web-api"]: disable_web_api_exports,
|
|
408
|
+
["disable-web-api-legacy"]: toLegacyConfig(disable_web_api_exports),
|
|
402
409
|
["dom"]: dom_exports,
|
|
410
|
+
["dom-legacy"]: toLegacyConfig(dom_exports),
|
|
403
411
|
["off"]: off_exports,
|
|
412
|
+
["off-legacy"]: toLegacyConfig(off_exports),
|
|
404
413
|
["recommended"]: recommended_exports,
|
|
414
|
+
["recommended-legacy"]: toLegacyConfig(recommended_exports),
|
|
405
415
|
["recommended-type-checked"]: recommended_type_checked_exports,
|
|
416
|
+
["recommended-type-checked-legacy"]: toLegacyConfig(recommended_type_checked_exports),
|
|
406
417
|
["recommended-typescript"]: recommended_typescript_exports,
|
|
407
|
-
|
|
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),
|
|
418
|
+
["recommended-typescript-legacy"]: toLegacyConfig(recommended_typescript_exports),
|
|
420
419
|
// Part: deprecated presets
|
|
421
420
|
/** @deprecated Use `disable-dom` instead */
|
|
422
421
|
["off-dom"]: disable_dom_exports,
|
|
423
422
|
/** @deprecated Use `disable-dom-legacy` instead */
|
|
424
|
-
["off-dom-legacy"]:
|
|
423
|
+
["off-dom-legacy"]: toLegacyConfig(disable_dom_exports)
|
|
425
424
|
},
|
|
426
425
|
rules: {
|
|
427
|
-
...
|
|
426
|
+
...reactx.rules,
|
|
428
427
|
...padKeysLeft(reactDom.rules, "dom/"),
|
|
429
428
|
...padKeysLeft(reactWebApi.rules, "web-api/"),
|
|
430
429
|
...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.
|
|
3
|
+
"version": "1.27.0-beta.1",
|
|
4
4
|
"description": "More than 80 high-quality linting rules for writing better React code.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -46,18 +46,18 @@
|
|
|
46
46
|
"./package.json"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@typescript-eslint/scope-manager": "^8.
|
|
50
|
-
"@typescript-eslint/type-utils": "^8.
|
|
51
|
-
"@typescript-eslint/types": "^8.
|
|
52
|
-
"@typescript-eslint/utils": "^8.
|
|
53
|
-
"@eslint-react/eff": "1.
|
|
54
|
-
"@eslint-react/shared": "1.
|
|
55
|
-
"eslint-plugin-react-dom": "1.
|
|
56
|
-
"eslint-plugin-react-debug": "1.
|
|
57
|
-
"eslint-plugin-react-
|
|
58
|
-
"eslint-plugin-react-
|
|
59
|
-
"eslint-plugin-react-web-api": "1.
|
|
60
|
-
"eslint-plugin-react-x": "1.
|
|
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/eff": "1.27.0-beta.1",
|
|
54
|
+
"@eslint-react/shared": "1.27.0-beta.1",
|
|
55
|
+
"eslint-plugin-react-dom": "1.27.0-beta.1",
|
|
56
|
+
"eslint-plugin-react-debug": "1.27.0-beta.1",
|
|
57
|
+
"eslint-plugin-react-naming-convention": "1.27.0-beta.1",
|
|
58
|
+
"eslint-plugin-react-hooks-extra": "1.27.0-beta.1",
|
|
59
|
+
"eslint-plugin-react-web-api": "1.27.0-beta.1",
|
|
60
|
+
"eslint-plugin-react-x": "1.27.0-beta.1"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"tsup": "^8.3.6",
|
|
@@ -85,6 +85,6 @@
|
|
|
85
85
|
"scripts": {
|
|
86
86
|
"build": "tsup --dts-resolve",
|
|
87
87
|
"lint:publish": "pnpm publint",
|
|
88
|
-
"lint:
|
|
88
|
+
"lint:ts": "tsc --noEmit"
|
|
89
89
|
}
|
|
90
90
|
}
|