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
fix(eslint-plugin): [no-unused-vars] check if any variable definition is exported #6873
Conversation
Thanks for the PR, @Maxim-Mazurok! typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community. The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately. Thanks again! 🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. |
✅ Deploy Preview for typescript-eslint ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #6873 +/- ##
==========================================
- Coverage 87.47% 87.47% -0.01%
==========================================
Files 379 379
Lines 13230 13228 -2
Branches 3906 3905 -1
==========================================
- Hits 11573 11571 -2
Misses 1279 1279
Partials 378 378
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super, thanks! Implementation looks great 🙌 - just requesting changes on a teeny bit more testing (unless I missed it already existing?).
packages/eslint-plugin/tests/rules/no-unused-vars/no-unused-vars.test.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super, thanks @Maxim-Mazurok! This looks clean and great. And the extra tests are always lovely, much appreciated!
Aside - my apologies for taking so long without getting back to you. I got sidetracked during the v6 work and dropped priority on the PR queue. But I should have let you know (or, honestly, just reviewed this PR - it's a pretty straightforwardly great one). Sorry about that!
587ac30
into
typescript-eslint:main
PR Checklist
Overview
As per #6188 (comment) suggestion, instead of checking the first declaration of a variable to determine if it's exported or not, I'm checking all declarations. Test included.