-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat(eslint-plugin): [prefer-nullish-coalescing] support if
statement assignment (??=
) and fix several minor bugs
#10861
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
feat(eslint-plugin): [prefer-nullish-coalescing] support if
statement assignment (??=
) and fix several minor bugs
#10861
Conversation
Thanks for the PR, @OlivierZal! 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. |
View your CI Pipeline Execution ↗ for commit 513b085.
☁️ Nx Cloud last updated this comment at |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #10861 +/- ##
==========================================
+ Coverage 87.97% 88.00% +0.03%
==========================================
Files 470 470
Lines 16709 16763 +54
Branches 4710 4735 +25
==========================================
+ Hits 14699 14753 +54
Misses 1664 1664
Partials 346 346
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
25f4ea7
to
46330a5
Compare
505fd3e
to
1299a38
Compare
144036b
to
1299a38
Compare
1299a38
to
fcc9bea
Compare
46cbf12
to
849bf03
Compare
4a72913
to
60091c8
Compare
96c95a8
to
16150a2
Compare
Ready for review: new feature in the playground While moving / refactoring the
In the playground: |
24210d9
to
f69b588
Compare
packages/eslint-plugin/tests/rules/prefer-nullish-coalescing.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.
I think it looks good enough for me! IMO we're just going for a best effort on comment placement.
Thanks!
@JoshuaKGoldberg, the latest commit doesn't seem related to PR's failure (which was ok one commit before). Merging |
Yeah 😬 #10992 - we can ignore those failures. |
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.
I regret not thinking more on comments earlier, thanks Kirk for the catch. After playing around with a bunch more cases there are only a couple more comment locations I could break. Getting there! 🚀
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 the thorough PR & discussion! 🔥
7151489
into
typescript-eslint:main
Hi is there an option to disable this only for assignments and keep the general lint for the other types? |
PR Checklist
if
statement assignment (??=
) #10829, Bug: [prefer-nullish-coalescing] bad handling of computed members #10890, Bug: [prefer-nullish-coalescing] has various bugs around multi-part nullishness checks #10733Overview