Arrow Function Parentheses option is incompatible with ESLint
See original GitHub issueWe use both ESLint and Prettier.
ESLint is configured as [2, "as-needed", { "requireForBlockBody": true }]
.
There are tons of developers who follows Airbnb JS codestyle, which recommends exactly this configuration.
How can we configure Prettier to avoid mangling our codebase? Is there any chance to provide an option to either disable this behavior or make it compatible with ESLint?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
arrow-parens - ESLint - Pluggable JavaScript Linter
Arrow functions can omit parentheses when they have exactly one parameter. In all other cases the parameter(s) must be wrapped in parentheses.
Read more >Automatically vscode creates parentheses when the ...
autocomplete - Automatically vscode creates parentheses when the parameter of the arrow function is only one. How to fix up this? - Stack ......
Read more >All of a sudden I am having issues with ESLint and Prettier not ...
All of a sudden I am having issues with ESLint and Prettier not playing nice - especially with parenthesis around functions with one...
Read more >@typescript-eslint/eslint-plugin-tslint | Yarn - Package Manager
ESLint plugin that wraps a TSLint configuration and lints the whole source ... See typescript-eslint.io for documentation on the latest released version.
Read more >Changelog - JSCS
Configuration: Do not set default options if preset is set (Oleg Gaidarenko) ... parentheses around arrow function expressions with a single parameter.
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 FreeTop 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
Top GitHub Comments
Actually I believe that Airbnb are planning on changing to always require parens. https://github.com/airbnb/javascript/pull/1863
Sad the prettier not be compatible with Airbnb