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-expressions] false negatives when using assertions #8668
fix(eslint-plugin): [no-unused-expressions] false negatives when using assertions #8668
Conversation
Thanks for the PR, @up201304504! 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 ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8668 +/- ##
==========================================
- Coverage 88.02% 87.24% -0.79%
==========================================
Files 401 251 -150
Lines 13934 12336 -1598
Branches 4087 3882 -205
==========================================
- Hits 12265 10762 -1503
+ Misses 1370 1305 -65
+ Partials 299 269 -30
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.
Nice start! 🚀
The code changes look good to me. I'm requesting one change in tests.
packages/eslint-plugin/tests/rules/no-unused-expressions.test.ts
Outdated
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.
🚀 LGTM! Thanks for working on this!
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.
fb18de9
into
typescript-eslint:main
PR Checklist
Overview
The no-unused-expressions rule was producing false negatives when assertions are used within TypeScript code:
This pull request resolves the identified bug by correcting the behavior of the no-unused-expressions rule. The changes made in this PR have been validated in the TypeScript playground: