question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"prettier.arrowParens": "always" does not work in vscode

See original GitHub issue

When I saved a javascript file today, I noticed that it deleted the parentheses around a sole arrow function parameter: (res) => {} turned to res => {}, which was not what I wanted. Then I set "prettier.arrowParens" to "always" in settings.json, it still showed that way.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (2 by maintainers)

github_iconTop GitHub Comments

17reactions
forsartiscommented, Mar 11, 2018

Just changing those files won’t work (needs to be recompiled from source). We have to wait for the Vetur extension to get updated. For a hotfix you can try adding this to your package.json file: "prettier": { "arrowParens": "always" }

1reaction
CiGitcommented, Mar 10, 2018

If you have a prettier config file, those settings dismissed, thus prettier will format with settings given in one of those files or default. https://prettier.io/docs/en/configuration.html

Read more comments on GitHub >

github_iconTop Results From Across the Web

VSCode Prettier warning on save - Arrow Parens
First move all your Prettier rules from the VSCode settings.json into the .prettierrc file. ... If this does not work then:.
Read more >
Options - Prettier
Prettier's printWidth option does not work the same way. It is not the hard upper allowed line length limit. It is a way...
Read more >
arrow-parens - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
How to fix Prettier Extension not working issue in VS CODE
0:00 · New! Watch ads now so you can enjoy fewer interruptions. Got it.
Read more >
Visual Studio Code and Prettier not respecting print width field
Your question is best suited to be posted as an issue on https://github.com/prettier/prettier-vscode/issues than Salesforce Forum.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found