"prettier.arrowParens": "always" does not work in vscode
See original GitHub issueWhen 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:
- Created 6 years ago
- Comments:14 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

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.jsonfile:"prettier": { "arrowParens": "always" }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