Skip to content

Commit 6cd54f9

Browse files
authored
fix: update suggestion for 'no-missing-button-type' rule to use dynamic prop name (#1139)
1 parent edd262f commit 6cd54f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/plugins/eslint-plugin-react-dom/src/rules/no-missing-button-type.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export function create(context: RuleContext<MessageID, []>): RuleListener {
7171
messageId: "noMissingButtonType",
7272
node,
7373
suggest: getSuggest((type) => (fixer: RuleFixer) => {
74-
return fixer.insertTextAfter(node.openingElement.name, ` type="${type}"`);
74+
return fixer.insertTextAfter(node.openingElement.name, ` ${propNameOnJsx}="${type}"`);
7575
}),
7676
});
7777
}

0 commit comments

Comments
 (0)