prettier icon indicating copy to clipboard operation
prettier copied to clipboard

Improve `needsParentheses`

Open fisker opened this issue 2 weeks ago • 3 comments

Description

There should be more places not allow to be parenthesized, I'll go through the visitor keys, to make a full list.

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.

fisker avatar Dec 07 '25 10:12 fisker

Deploy Preview for prettier ready!

Name Link
Latest commit 75b882604edd0d43cd48696e5a1831117e89722e
Latest deploy log https://app.netlify.com/projects/prettier/deploys/69355718c7d15e0009c8904e
Deploy Preview https://deploy-preview-18441--prettier.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

netlify[bot] avatar Dec 07 '25 10:12 netlify[bot]

Open in StackBlitz

yarn add https://pkg.pr.new/@prettier/[email protected]
yarn add https://pkg.pr.new/@prettier/[email protected]
yarn add https://pkg.pr.new/[email protected]

commit: e4f1438

pkg-pr-new[bot] avatar Dec 07 '25 10:12 pkg-pr-new[bot]

Deploy Preview for prettier ready!

Name Link
Latest commit e4f143803bc0f2af337bbded32bcd8bd762745bc
Latest deploy log https://app.netlify.com/projects/prettier/deploys/69355dfbb9b4ea0008fb76dd
Deploy Preview https://deploy-preview-18441--prettier.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

netlify[bot] avatar Dec 07 '25 10:12 netlify[bot]