Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
feat(eslint-plugin): [prefer-nullish-coalescing]: add support for assignment expressions#5234
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
feat(eslint-plugin): [prefer-nullish-coalescing]: add support for assignment expressions#5234
Uh oh!
There was an error while loading.Please reload this page.
Conversation
nx-cloudbot commentedJun 23, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Thanks for the PR,@JoshuaKGoldberg! 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 onhttps://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitorsper day. |
netlifybot commentedJun 23, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
✅ Deploy Preview fortypescript-eslint ready!
To edit notification comments on pull requests, go to yourNetlify site settings. |
codecovbot commentedJun 23, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@## v6 #5234 +/- ##==========================================+ Coverage 91.33% 91.44% +0.11%========================================== Files 361 355 -6 Lines 12044 12060 +16 Branches 3506 3531 +25 ==========================================+ Hits 11000 11028 +28+ Misses 748 733 -15- Partials 296 299 +3
Flags with carried forward coverage won't be shown.Click here to find out more.
|
jakebailey commentedJun 23, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Thanks for working on this! I'm currently running this on the TS codebase (as in some benchmarks, even our downleveled code for (I have to fork in order to skip the rule when the left side is potentially a string/number/boolean; applying the fixes from this rule without review breaks a few things as the behavior is not equivalent.) |
note that technically This is a very slight difference that makes them marginally faster because you only assign if it's required. |
…ignment expressions (#5234)BREAKING CHANGE:Adds an additional class of checks to the rule
PR Checklist
Overview
Adds
||=
to??=
support to the rule by reusing much of the existing rule's logic.Note that this is a breaking change, as it targets a significant new area of syntax. We'll probably have to wait until 6.X to merge. 😕