eslint-plugin-react-x 5.8.4-next.0 → 5.8.4-next.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/dist/index.js +7 -7
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -4,9 +4,9 @@ import { Check, Compare, Extract, Traverse, is, isOneOf } from "@eslint-react/as
|
|
|
4
4
|
import * as core from "@eslint-react/core";
|
|
5
5
|
import { merge } from "@eslint-react/eslint";
|
|
6
6
|
import { AST_NODE_TYPES } from "@typescript-eslint/types";
|
|
7
|
+
import { DefinitionType, ScopeType } from "@typescript-eslint/scope-manager";
|
|
7
8
|
import { findVariable, getStaticValue } from "@typescript-eslint/utils/ast-utils";
|
|
8
9
|
import { computeObjectType, isAssignmentTargetEqual, resolve, resolveEnclosingAssignmentTarget } from "@eslint-react/var";
|
|
9
|
-
import { DefinitionType } from "@typescript-eslint/scope-manager";
|
|
10
10
|
import { P, isMatching, match } from "ts-pattern";
|
|
11
11
|
import { findParentAttribute, getElementFullType, hasAttribute } from "@eslint-react/jsx";
|
|
12
12
|
import { compare } from "compare-versions";
|
|
@@ -143,7 +143,7 @@ const rules$6 = {
|
|
|
143
143
|
//#endregion
|
|
144
144
|
//#region package.json
|
|
145
145
|
var name$6 = "eslint-plugin-react-x";
|
|
146
|
-
var version = "5.8.4-next.
|
|
146
|
+
var version = "5.8.4-next.2";
|
|
147
147
|
|
|
148
148
|
//#endregion
|
|
149
149
|
//#region src/utils/create-rule.ts
|
|
@@ -185,7 +185,7 @@ function getEnclosingTryBlock(node) {
|
|
|
185
185
|
n = n.parent;
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
|
-
if (current.type ===
|
|
188
|
+
if (current.type === AST_NODE_TYPES.Program) return null;
|
|
189
189
|
current = current.parent;
|
|
190
190
|
}
|
|
191
191
|
return null;
|
|
@@ -1188,7 +1188,7 @@ function create$49(context) {
|
|
|
1188
1188
|
if (variable == null) return true;
|
|
1189
1189
|
if (variable.defs.length === 0) return true;
|
|
1190
1190
|
const scopeType = variable.scope.type;
|
|
1191
|
-
return scopeType ===
|
|
1191
|
+
return scopeType === ScopeType.global || scopeType === ScopeType.module;
|
|
1192
1192
|
}
|
|
1193
1193
|
/**
|
|
1194
1194
|
* Return the nearest enclosing function for `node`.
|
|
@@ -1795,7 +1795,7 @@ function create$47(context) {
|
|
|
1795
1795
|
function report$2(context) {
|
|
1796
1796
|
return (descriptor) => {
|
|
1797
1797
|
if (descriptor == null) return;
|
|
1798
|
-
|
|
1798
|
+
context.report(descriptor);
|
|
1799
1799
|
};
|
|
1800
1800
|
}
|
|
1801
1801
|
function getIndexParamPosition(methodName) {
|
|
@@ -2595,7 +2595,7 @@ function create$28(context) {
|
|
|
2595
2595
|
function report$1(context) {
|
|
2596
2596
|
return (descriptor) => {
|
|
2597
2597
|
if (descriptor == null) return;
|
|
2598
|
-
|
|
2598
|
+
context.report(descriptor);
|
|
2599
2599
|
};
|
|
2600
2600
|
}
|
|
2601
2601
|
|
|
@@ -2780,7 +2780,7 @@ function create$25(context) {
|
|
|
2780
2780
|
function report(context) {
|
|
2781
2781
|
return (descriptor) => {
|
|
2782
2782
|
if (descriptor == null) return;
|
|
2783
|
-
|
|
2783
|
+
context.report(descriptor);
|
|
2784
2784
|
};
|
|
2785
2785
|
}
|
|
2786
2786
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-x",
|
|
3
|
-
"version": "5.8.4-next.
|
|
3
|
+
"version": "5.8.4-next.2",
|
|
4
4
|
"description": "A set of composable ESLint rules for libraries and frameworks that use React as a UI runtime.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
"string-ts": "^2.3.1",
|
|
46
46
|
"ts-api-utils": "^2.5.0",
|
|
47
47
|
"ts-pattern": "^5.9.0",
|
|
48
|
-
"@eslint-react/ast": "5.8.4-next.
|
|
49
|
-
"@eslint-react/
|
|
50
|
-
"@eslint-react/
|
|
51
|
-
"@eslint-react/
|
|
52
|
-
"@eslint-react/
|
|
53
|
-
"@eslint-react/var": "5.8.4-next.
|
|
48
|
+
"@eslint-react/ast": "5.8.4-next.2",
|
|
49
|
+
"@eslint-react/eslint": "5.8.4-next.2",
|
|
50
|
+
"@eslint-react/core": "5.8.4-next.2",
|
|
51
|
+
"@eslint-react/jsx": "5.8.4-next.2",
|
|
52
|
+
"@eslint-react/shared": "5.8.4-next.2",
|
|
53
|
+
"@eslint-react/var": "5.8.4-next.2"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@types/react": "^19.2.14",
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"tsl": "^1.0.30",
|
|
64
64
|
"tsl-dx": "^0.12.1",
|
|
65
65
|
"typescript": "^6.0.3",
|
|
66
|
-
"@local/
|
|
67
|
-
"@local/
|
|
66
|
+
"@local/configs": "0.0.0",
|
|
67
|
+
"@local/eff": "3.0.0-beta.72"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"eslint": "^10.3.0",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"@local/eff": "workspace:*"
|
|
78
78
|
},
|
|
79
79
|
"scripts": {
|
|
80
|
-
"build": "tsdown
|
|
80
|
+
"build": "tsdown",
|
|
81
81
|
"lint:publish": "publint",
|
|
82
82
|
"lint:ts": "tsl"
|
|
83
83
|
}
|