Skip to content

fix: don't parenthesize assign inside static variable declaration#2463

Merged
czosel merged 1 commit intoprettier:mainfrom
jorgsowa:fix/static-variable-assign-parens
Mar 29, 2026
Merged

fix: don't parenthesize assign inside static variable declaration#2463
czosel merged 1 commit intoprettier:mainfrom
jorgsowa:fix/static-variable-assign-parens

Conversation

@jorgsowa
Copy link
Copy Markdown
Collaborator

@jorgsowa jorgsowa commented Mar 23, 2026

Fix incorrect parent node kind check ("static" -> "staticvariable") that caused assignment expressions in static variable declarations to be unnecessarily parenthesized (e.g. static $x = ($a = 1) instead of static $x = $a = 1)

@jorgsowa jorgsowa force-pushed the fix/static-variable-assign-parens branch from 8dea319 to a93e179 Compare March 23, 2026 21:18
@jorgsowa jorgsowa marked this pull request as ready for review March 23, 2026 21:18
@jorgsowa jorgsowa force-pushed the fix/static-variable-assign-parens branch from a93e179 to 869f4ec Compare March 25, 2026 20:50
@czosel czosel merged commit 6ce4e8a into prettier:main Mar 29, 2026
15 checks passed
@czosel
Copy link
Copy Markdown
Collaborator

czosel commented Mar 29, 2026

Released in v0.25.0 🎉

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.

2 participants