Skip to content

Commit 2a97620

Browse files
committed
fix: rule name and message id key mismatch in no-nested-lazy-component-declarations
1 parent 668df0f commit 2a97620

File tree

3 files changed

+424
-416
lines changed

3 files changed

+424
-416
lines changed

packages/plugins/eslint-plugin-react-x/src/rules/no-nested-lazy-component-declarations.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ ruleTester.run(RULE_NAME, rule, {
2121
`,
2222
errors: [
2323
{
24-
messageId: "noNestedComponentDefinitions",
24+
messageId: "noNestedLazyComponentDeclarations",
2525
},
2626
],
2727
},

packages/plugins/eslint-plugin-react-x/src/rules/no-nested-lazy-component-declarations.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import type { CamelCase } from "string-ts";
88
import { AST_NODE_TYPES as T } from "@typescript-eslint/types";
99
import { createRule } from "../utils";
1010

11-
export const RULE_NAME = "no-nested-component-definitions";
11+
export const RULE_NAME = "no-nested-lazy-component-declarations";
1212

1313
export const RULE_FEATURES = [] as const satisfies RuleFeature[];
1414

@@ -22,7 +22,7 @@ export default createRule<[], MessageID>({
2222
[Symbol.for("rule_features")]: RULE_FEATURES,
2323
},
2424
messages: {
25-
noNestedComponentDefinitions:
25+
noNestedLazyComponentDeclarations:
2626
"Do not declare lazy components inside other components. Instead, always declare them at the top level of your module.",
2727
},
2828
schema: [],
@@ -79,7 +79,7 @@ export function create(context: RuleContext<MessageID, []>): RuleListener {
7979
});
8080
if (significantParent != null) {
8181
context.report({
82-
messageId: "noNestedComponentDefinitions",
82+
messageId: "noNestedLazyComponentDeclarations",
8383
node: lazy,
8484
});
8585
}

0 commit comments

Comments
 (0)