eslint-plugin-react-debug 1.23.2-next.2 → 1.23.2-next.6
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 +8 -8
- package/dist/index.mjs +8 -8
- package/package.json +13 -13
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ var utils = require('@typescript-eslint/utils');
|
|
|
7
7
|
|
|
8
8
|
// package.json
|
|
9
9
|
var name = "eslint-plugin-react-debug";
|
|
10
|
-
var version = "1.23.2-next.
|
|
10
|
+
var version = "1.23.2-next.6";
|
|
11
11
|
var createRule = shared.createRuleForPlugin("debug");
|
|
12
12
|
|
|
13
13
|
// src/rules/class-component.ts
|
|
@@ -148,20 +148,20 @@ var is_from_react_default = createRule({
|
|
|
148
148
|
},
|
|
149
149
|
name: RULE_NAME4,
|
|
150
150
|
create(context) {
|
|
151
|
-
const settings =
|
|
152
|
-
|
|
153
|
-
...
|
|
151
|
+
const settings = {
|
|
152
|
+
importSource: "react",
|
|
153
|
+
...shared.getSettingsFromContext(context),
|
|
154
154
|
strictImportCheck: true
|
|
155
155
|
};
|
|
156
156
|
function isFromReact(node, initialScope) {
|
|
157
157
|
const name2 = node.name;
|
|
158
158
|
switch (true) {
|
|
159
159
|
case (node.parent.type === utils.AST_NODE_TYPES.MemberExpression && node.parent.property === node && node.parent.object.type === utils.AST_NODE_TYPES.Identifier):
|
|
160
|
-
return core.isInitializedFromReact(node.parent.object.name, initialScope,
|
|
160
|
+
return core.isInitializedFromReact(node.parent.object.name, initialScope, settings.importSource);
|
|
161
161
|
case (node.parent.type === utils.AST_NODE_TYPES.JSXMemberExpression && node.parent.property === node && node.parent.object.type === utils.AST_NODE_TYPES.JSXIdentifier):
|
|
162
|
-
return core.isInitializedFromReact(node.parent.object.name, initialScope,
|
|
162
|
+
return core.isInitializedFromReact(node.parent.object.name, initialScope, settings.importSource);
|
|
163
163
|
default:
|
|
164
|
-
return core.isInitializedFromReact(name2, initialScope,
|
|
164
|
+
return core.isInitializedFromReact(name2, initialScope, settings.importSource);
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
function getReportDescriptor(node) {
|
|
@@ -176,7 +176,7 @@ var is_from_react_default = createRule({
|
|
|
176
176
|
data: {
|
|
177
177
|
type: node.type,
|
|
178
178
|
name: name2,
|
|
179
|
-
importSource: settings.importSource
|
|
179
|
+
importSource: settings.importSource
|
|
180
180
|
}
|
|
181
181
|
});
|
|
182
182
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { AST_NODE_TYPES } from '@typescript-eslint/utils';
|
|
|
5
5
|
|
|
6
6
|
// package.json
|
|
7
7
|
var name = "eslint-plugin-react-debug";
|
|
8
|
-
var version = "1.23.2-next.
|
|
8
|
+
var version = "1.23.2-next.6";
|
|
9
9
|
var createRule = createRuleForPlugin("debug");
|
|
10
10
|
|
|
11
11
|
// src/rules/class-component.ts
|
|
@@ -146,20 +146,20 @@ var is_from_react_default = createRule({
|
|
|
146
146
|
},
|
|
147
147
|
name: RULE_NAME4,
|
|
148
148
|
create(context) {
|
|
149
|
-
const settings =
|
|
150
|
-
|
|
151
|
-
...
|
|
149
|
+
const settings = {
|
|
150
|
+
importSource: "react",
|
|
151
|
+
...getSettingsFromContext(context),
|
|
152
152
|
strictImportCheck: true
|
|
153
153
|
};
|
|
154
154
|
function isFromReact(node, initialScope) {
|
|
155
155
|
const name2 = node.name;
|
|
156
156
|
switch (true) {
|
|
157
157
|
case (node.parent.type === AST_NODE_TYPES.MemberExpression && node.parent.property === node && node.parent.object.type === AST_NODE_TYPES.Identifier):
|
|
158
|
-
return isInitializedFromReact(node.parent.object.name, initialScope,
|
|
158
|
+
return isInitializedFromReact(node.parent.object.name, initialScope, settings.importSource);
|
|
159
159
|
case (node.parent.type === AST_NODE_TYPES.JSXMemberExpression && node.parent.property === node && node.parent.object.type === AST_NODE_TYPES.JSXIdentifier):
|
|
160
|
-
return isInitializedFromReact(node.parent.object.name, initialScope,
|
|
160
|
+
return isInitializedFromReact(node.parent.object.name, initialScope, settings.importSource);
|
|
161
161
|
default:
|
|
162
|
-
return isInitializedFromReact(name2, initialScope,
|
|
162
|
+
return isInitializedFromReact(name2, initialScope, settings.importSource);
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
function getReportDescriptor(node) {
|
|
@@ -174,7 +174,7 @@ var is_from_react_default = createRule({
|
|
|
174
174
|
data: {
|
|
175
175
|
type: node.type,
|
|
176
176
|
name: name2,
|
|
177
|
-
importSource: settings.importSource
|
|
177
|
+
importSource: settings.importSource
|
|
178
178
|
}
|
|
179
179
|
});
|
|
180
180
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-debug",
|
|
3
|
-
"version": "1.23.2-next.
|
|
3
|
+
"version": "1.23.2-next.6",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for debugging related rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -41,22 +41,22 @@
|
|
|
41
41
|
"./package.json"
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@typescript-eslint/scope-manager": "^8.19.
|
|
45
|
-
"@typescript-eslint/type-utils": "^8.19.
|
|
46
|
-
"@typescript-eslint/types": "^8.19.
|
|
47
|
-
"@typescript-eslint/utils": "^8.19.
|
|
44
|
+
"@typescript-eslint/scope-manager": "^8.19.1",
|
|
45
|
+
"@typescript-eslint/type-utils": "^8.19.1",
|
|
46
|
+
"@typescript-eslint/types": "^8.19.1",
|
|
47
|
+
"@typescript-eslint/utils": "^8.19.1",
|
|
48
48
|
"string-ts": "^2.2.0",
|
|
49
49
|
"ts-pattern": "^5.6.0",
|
|
50
|
-
"@eslint-react/ast": "1.23.2-next.
|
|
51
|
-
"@eslint-react/core": "1.23.2-next.
|
|
52
|
-
"@eslint-react/
|
|
53
|
-
"@eslint-react/
|
|
54
|
-
"@eslint-react/eff": "1.23.2-next.
|
|
55
|
-
"@eslint-react/
|
|
56
|
-
"@eslint-react/
|
|
50
|
+
"@eslint-react/ast": "1.23.2-next.6",
|
|
51
|
+
"@eslint-react/core": "1.23.2-next.6",
|
|
52
|
+
"@eslint-react/jsx": "1.23.2-next.6",
|
|
53
|
+
"@eslint-react/shared": "1.23.2-next.6",
|
|
54
|
+
"@eslint-react/eff": "1.23.2-next.6",
|
|
55
|
+
"@eslint-react/types": "1.23.2-next.6",
|
|
56
|
+
"@eslint-react/var": "1.23.2-next.6"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@types/react": "^19.0.
|
|
59
|
+
"@types/react": "^19.0.3",
|
|
60
60
|
"@types/react-dom": "^19.0.2",
|
|
61
61
|
"tsup": "^8.3.5",
|
|
62
62
|
"@workspace/configs": "0.0.0"
|