Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
fix(eslint-plugin): [prefer-nullish-coalescing] report on chain expressions in a ternary#10708
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
Merged
JoshuaKGoldberg merged 30 commits intotypescript-eslint:mainfromOlivierZal:prefer-nullish-coalescing-10531Feb 24, 2025
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
30 commits Select commitHold shift + click to select a range
200e6e2
handle ChainExpression in preferNullishOverTernary
OlivierZald0a06a7
simplify
OlivierZal58eabb3
naming
OlivierZal5af7ed9
Move block which comes too early
OlivierZaldd90ef8
add tests
OlivierZalbc3ff36
handle use case where 2 conditions
OlivierZal6a207b6
renaming
OlivierZal3ec45e5
Merge branch 'main' into prefer-nullish-coalescing-10531
OlivierZalaee2f23
changes after review
OlivierZalf8cc815
Merge branch 'main' into prefer-nullish-coalescing-10531
OlivierZal833b967
use new API
OlivierZal628c69d
move skipChainExpression to utils
OlivierZal3c14cf6
use skipChainExpression util for no-floating-promises as well
OlivierZal3b6430a
Merge branch 'main' into prefer-nullish-coalescing-10531
OlivierZal201e196
use skipChainExpression wherever it's possible
OlivierZal0318385
move line
OlivierZal259a4a1
simplify
OlivierZal97fa249
add tests
OlivierZal1eba720
add symetric node equivalence
OlivierZal23d52a5
simplify
OlivierZal53dd427
simplify
OlivierZal7114958
Simplify
OlivierZalb5e3fcd
Merge branch 'main' into prefer-nullish-coalescing-10531
OlivierZal8eed250
Typo
OlivierZala1674cf
Simplify
OlivierZalb31b29e
renaming and adding JS doc
OlivierZalc131cad
simplify js doc
OlivierZal7970bfa
Merge branch 'main' into prefer-nullish-coalescing-10531
OlivierZal2c2f3ec
Merge branch 'main' into prefer-nullish-coalescing-10531
JoshuaKGoldberge800c2a
Merge branch 'main' into prefer-nullish-coalescing-10531
OlivierZalFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
7 changes: 2 additions & 5 deletionspackages/eslint-plugin/src/rules/no-floating-promises.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
17 changes: 10 additions & 7 deletionspackages/eslint-plugin/src/rules/no-inferrable-types.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
28 changes: 10 additions & 18 deletionspackages/eslint-plugin/src/rules/prefer-find.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
133 changes: 98 additions & 35 deletionspackages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
9 changes: 1 addition & 8 deletionspackages/eslint-plugin/src/rules/prefer-promise-reject-errors.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
16 changes: 5 additions & 11 deletionspackages/eslint-plugin/src/rules/prefer-string-starts-ends-with.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.