Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[no-unused-vars] does not handle JSX? #1623

Closed
mightyiam opened this issue Feb 21, 2020 · 1 comment
Closed

[no-unused-vars] does not handle JSX? #1623

mightyiam opened this issue Feb 21, 2020 · 1 comment
Labels
package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin working as intended Issues that are closed as they are working as intended

Comments

@mightyiam
Copy link
Contributor

mightyiam commented Feb 21, 2020

From #1596 (comment).

Repro

Open source reproduction. Just remove this disable comment.

Expected Result

No hit.

Actual Result

Hit.

Versions

package version
@typescript-eslint/eslint-plugin 2.20.0
@typescript-eslint/parser 2.20.0
TypeScript 3.7.2
ESLint 6.8.0
node 12.10.0
npm Most likely 6.13.7
@mightyiam mightyiam added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for maintainers to take a look labels Feb 21, 2020
@bradzacher
Copy link
Member

This is by design.
The no-unused-vars rule is not intended to understand the semantics of JSX.

You should consider adding the rules from eslint-plugin-react to augment the rule
https://github.com/yannickcr/eslint-plugin-react/blob/HEAD/docs/rules/jsx-uses-react.md

@bradzacher bradzacher added working as intended Issues that are closed as they are working as intended and removed triage Waiting for maintainers to take a look labels Feb 21, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin working as intended Issues that are closed as they are working as intended
Projects
None yet
Development

No branches or pull requests

2 participants