Skip to content

Commit e0b2940

Browse files
committed
fix(plugins/debug): 'is-from-react' use correct settings when calling 'isInitializedFromReact'
1 parent f90c948 commit e0b2940

File tree

19 files changed

+33
-28
lines changed

19 files changed

+33
-28
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.17.1-beta.0
1+
1.17.1-next.1

examples/vite-react-dom-legacy/.eslintrc.cjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ module.exports = {
1111
extends: [
1212
"plugin:@eslint-react/recommended-legacy",
1313
],
14+
rules: {
15+
"@eslint-react/naming-convention/filename": ["warn", "kebab-case"],
16+
},
1417
},
1518
],
1619
};

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@eslint-react/monorepo",
3-
"version": "1.17.1-beta.0",
3+
"version": "1.17.1-next.1",
44
"private": true,
55
"description": "A series of composable ESLint plugins for libraries and frameworks that use React as a UI runtime.",
66
"keywords": [
@@ -124,8 +124,7 @@
124124
"safer-buffer": "npm:@nolyfill/safer-buffer@^1.0.41",
125125
"side-channel": "npm:@nolyfill/side-channel@^1.0.29",
126126
"typedarray": "npm:@nolyfill/typedarray@^1.0.29",
127-
"typescript": "^5.6.3",
128-
"valibot": "0.42.1"
127+
"typescript": "^5.6.3"
129128
}
130129
}
131130
}

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@eslint-react/core",
3-
"version": "1.17.1-beta.0",
3+
"version": "1.17.1-next.1",
44
"description": "ESLint React's ESLint utility module for static analysis of React core APIs and Patterns.",
55
"homepage": "https://github.com/rel1cx/eslint-react",
66
"bugs": {

packages/plugins/eslint-plugin-react-debug/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-plugin-react-debug",
3-
"version": "1.17.1-beta.0",
3+
"version": "1.17.1-next.1",
44
"description": "ESLint React's ESLint plugin for debugging related rules.",
55
"keywords": [
66
"eslint",

packages/plugins/eslint-plugin-react-debug/src/rules/is-from-react.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ export default createRule<[], MessageID>({
2828
name: RULE_NAME,
2929
create(context) {
3030
const settings = decodeSettings(context.settings);
31+
const finalSettings = {
32+
...settings,
33+
strictImportCheck: true,
34+
} satisfies typeof settings;
3135
function isFromReact(
3236
node: TSESTree.Identifier | TSESTree.JSXIdentifier,
3337
initialScope: Scope,
@@ -37,13 +41,13 @@ export default createRule<[], MessageID>({
3741
case node.parent.type === AST_NODE_TYPES.MemberExpression
3842
&& node.parent.property === node
3943
&& node.parent.object.type === AST_NODE_TYPES.Identifier:
40-
return isInitializedFromReact(node.parent.object.name, initialScope, settings);
44+
return isInitializedFromReact(node.parent.object.name, initialScope, finalSettings);
4145
case node.parent.type === AST_NODE_TYPES.JSXMemberExpression
4246
&& node.parent.property === node
4347
&& node.parent.object.type === AST_NODE_TYPES.JSXIdentifier:
44-
return isInitializedFromReact(node.parent.object.name, initialScope, settings);
48+
return isInitializedFromReact(node.parent.object.name, initialScope, finalSettings);
4549
default:
46-
return isInitializedFromReact(name, initialScope, settings);
50+
return isInitializedFromReact(name, initialScope, finalSettings);
4751
}
4852
}
4953
function getReportDescriptor(

packages/plugins/eslint-plugin-react-dom/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-plugin-react-dom",
3-
"version": "1.17.1-beta.0",
3+
"version": "1.17.1-next.1",
44
"description": "ESLint React's ESLint plugin for React DOM related rules.",
55
"keywords": [
66
"eslint",

packages/plugins/eslint-plugin-react-hooks-extra/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-plugin-react-hooks-extra",
3-
"version": "1.17.1-beta.0",
3+
"version": "1.17.1-next.1",
44
"description": "ESLint React's ESLint plugin for React Hooks related rules.",
55
"keywords": [
66
"eslint",

packages/plugins/eslint-plugin-react-naming-convention/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-plugin-react-naming-convention",
3-
"version": "1.17.1-beta.0",
3+
"version": "1.17.1-next.1",
44
"description": "ESLint React's ESLint plugin for naming convention related rules.",
55
"keywords": [
66
"eslint",

packages/plugins/eslint-plugin-react-web-api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-plugin-react-web-api",
3-
"version": "1.17.1-beta.0",
3+
"version": "1.17.1-next.1",
44
"description": "ESLint React's ESLint plugin for interacting with Web APIs",
55
"keywords": [
66
"eslint",

0 commit comments

Comments
 (0)