eslint-plugin-react-debug 1.17.1-next.0 → 1.17.1-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 +8 -4
- package/dist/index.mjs +8 -4
- package/package.json +8 -8
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.17.1-next.
|
|
10
|
+
var version = "1.17.1-next.2";
|
|
11
11
|
var createRule = shared.createRuleForPlugin("debug");
|
|
12
12
|
|
|
13
13
|
// src/rules/class-component.ts
|
|
@@ -133,15 +133,19 @@ var is_from_react_default = createRule({
|
|
|
133
133
|
name: RULE_NAME4,
|
|
134
134
|
create(context) {
|
|
135
135
|
const settings = shared.decodeSettings(context.settings);
|
|
136
|
+
const finalSettings = {
|
|
137
|
+
...settings,
|
|
138
|
+
strictImportCheck: true
|
|
139
|
+
};
|
|
136
140
|
function isFromReact(node, initialScope) {
|
|
137
141
|
const name2 = node.name;
|
|
138
142
|
switch (true) {
|
|
139
143
|
case (node.parent.type === utils.AST_NODE_TYPES.MemberExpression && node.parent.property === node && node.parent.object.type === utils.AST_NODE_TYPES.Identifier):
|
|
140
|
-
return core.isInitializedFromReact(node.parent.object.name, initialScope,
|
|
144
|
+
return core.isInitializedFromReact(node.parent.object.name, initialScope, finalSettings);
|
|
141
145
|
case (node.parent.type === utils.AST_NODE_TYPES.JSXMemberExpression && node.parent.property === node && node.parent.object.type === utils.AST_NODE_TYPES.JSXIdentifier):
|
|
142
|
-
return core.isInitializedFromReact(node.parent.object.name, initialScope,
|
|
146
|
+
return core.isInitializedFromReact(node.parent.object.name, initialScope, finalSettings);
|
|
143
147
|
default:
|
|
144
|
-
return core.isInitializedFromReact(name2, initialScope,
|
|
148
|
+
return core.isInitializedFromReact(name2, initialScope, finalSettings);
|
|
145
149
|
}
|
|
146
150
|
}
|
|
147
151
|
function getReportDescriptor(node) {
|
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.17.1-next.
|
|
8
|
+
var version = "1.17.1-next.2";
|
|
9
9
|
var createRule = createRuleForPlugin("debug");
|
|
10
10
|
|
|
11
11
|
// src/rules/class-component.ts
|
|
@@ -131,15 +131,19 @@ var is_from_react_default = createRule({
|
|
|
131
131
|
name: RULE_NAME4,
|
|
132
132
|
create(context) {
|
|
133
133
|
const settings = decodeSettings(context.settings);
|
|
134
|
+
const finalSettings = {
|
|
135
|
+
...settings,
|
|
136
|
+
strictImportCheck: true
|
|
137
|
+
};
|
|
134
138
|
function isFromReact(node, initialScope) {
|
|
135
139
|
const name2 = node.name;
|
|
136
140
|
switch (true) {
|
|
137
141
|
case (node.parent.type === AST_NODE_TYPES.MemberExpression && node.parent.property === node && node.parent.object.type === AST_NODE_TYPES.Identifier):
|
|
138
|
-
return isInitializedFromReact(node.parent.object.name, initialScope,
|
|
142
|
+
return isInitializedFromReact(node.parent.object.name, initialScope, finalSettings);
|
|
139
143
|
case (node.parent.type === AST_NODE_TYPES.JSXMemberExpression && node.parent.property === node && node.parent.object.type === AST_NODE_TYPES.JSXIdentifier):
|
|
140
|
-
return isInitializedFromReact(node.parent.object.name, initialScope,
|
|
144
|
+
return isInitializedFromReact(node.parent.object.name, initialScope, finalSettings);
|
|
141
145
|
default:
|
|
142
|
-
return isInitializedFromReact(name2, initialScope,
|
|
146
|
+
return isInitializedFromReact(name2, initialScope, finalSettings);
|
|
143
147
|
}
|
|
144
148
|
}
|
|
145
149
|
function getReportDescriptor(node) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-debug",
|
|
3
|
-
"version": "1.17.1-next.
|
|
3
|
+
"version": "1.17.1-next.2",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for debugging related rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
"@typescript-eslint/utils": "^8.15.0",
|
|
48
48
|
"string-ts": "^2.2.0",
|
|
49
49
|
"ts-pattern": "^5.5.0",
|
|
50
|
-
"@eslint-react/
|
|
51
|
-
"@eslint-react/
|
|
52
|
-
"@eslint-react/shared": "1.17.1-next.
|
|
53
|
-
"@eslint-react/
|
|
54
|
-
"@eslint-react/
|
|
55
|
-
"@eslint-react/
|
|
56
|
-
"@eslint-react/
|
|
50
|
+
"@eslint-react/jsx": "1.17.1-next.2",
|
|
51
|
+
"@eslint-react/ast": "1.17.1-next.2",
|
|
52
|
+
"@eslint-react/shared": "1.17.1-next.2",
|
|
53
|
+
"@eslint-react/types": "1.17.1-next.2",
|
|
54
|
+
"@eslint-react/core": "1.17.1-next.2",
|
|
55
|
+
"@eslint-react/tools": "1.17.1-next.2",
|
|
56
|
+
"@eslint-react/var": "1.17.1-next.2"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@types/react": "^18.3.12",
|