Skip to content

Add parens for nullish coalescing in tenary#16391

Merged
kachkaev merged 8 commits intoprettier:mainfrom
cdignam-segment:cdignam-nullish-parens
Jun 18, 2024
Merged

Add parens for nullish coalescing in tenary#16391
kachkaev merged 8 commits intoprettier:mainfrom
cdignam-segment:cdignam-nullish-parens

Conversation

@cdignam-segment
Copy link
Copy Markdown
Contributor

@cdignam-segment cdignam-segment commented Jun 12, 2024

Description

This change adds clarity to operator precedence when using nullish coalescing within a ternary.

fix #4873

Checklist

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory).
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parentheses around nullish coalescing operator within conditional expression

4 participants