Skip to content

Commit 01164e3

Browse files
committed
fix(eslint-plugin): [no-unused-vars] support React JSX (typescript-eslint#868)
1 parent 5eb40dc commit 01164e3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/eslint-plugin/src/rules/no-unused-vars.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ export default util.createRule({
6060
'TSEnumMember Identifier'(node: TSESTree.Identifier) {
6161
context.markVariableAsUsed(node.name);
6262
},
63+
JSXIdentifier(node: TSESTree.Identifier) {
64+
context.markVariableAsUsed(node.name);
65+
},
6366
'*[declare=true] Identifier'(node: TSESTree.Identifier) {
6467
context.markVariableAsUsed(node.name);
6568
const scope = context.getScope();

0 commit comments

Comments
 (0)