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] False positive when var is used in @jsxFrag #2514
Comments
Not sure if this will be solved by #1856 but linking the issue as it might be related |
We have However this style of config will need to be built specifically - which is why support for inline config comments has not implemented. Happy to accept a PR. |
Thanks! I'll first need to finish the project where I'm using this, but happy to work on a PR for this next. I haven't yet contributed to typescript-eslint, so a small hint where to start would be greatly appreciated (only if it doesn't take you much time). It seems like the jsx pragma is already implemented? If you think, adding the jsxFrag pragma is a good first issue, I'm happy to take it, though a hint where to start would be greatly appreciated (I would assume somewhere in scope-manager?). |
The way it is set up is such that concerns are separated.
So the feature would live in typescript-eslint/packages/parser/src/parser.ts Lines 137 to 171 in ec7449d
The feature could be to iterate the comments in the AST, and then overwrite the the option that we find config comments for. This would match TS's behaviour, as you can configure |
Thanks! Unfortunately I did not get to this issue over the last weeks and due to changes in priorities won't be able to take it in the near future :( |
@dbartholomae |
@daryazata please file a separate issue. That is entirely unrelated to this issue. |
Repro
Expected Result
This should lint just fine.
Actual Result
Versions
@typescript-eslint/eslint-plugin
4.1.1-alpha.5
@typescript-eslint/parser
4.1.1-alpha.5
TypeScript
4.0.2
ESLint
7.8.1
node
12.18.3
The text was updated successfully, but these errors were encountered: