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.

Arrow Function Parentheses option is incompatible with ESLint

See original GitHub issue

We 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:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
aboytoncommented, Dec 6, 2018

Actually I believe that Airbnb are planning on changing to always require parens. https://github.com/airbnb/javascript/pull/1863

0reactions
ivanguimamcommented, Dec 6, 2018

Sad the prettier not be compatible with Airbnb

Read more comments on GitHub >

github_iconTop 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 >

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