Prettier does not respect the "no-multiple-empty-lines" rule of eslint
See original GitHub issuePrettier removes any multiple empty lines collapsing to max 1 empty line. I understand the default behavior but I would like to override it with eslint
Example with my rule (google/airbnb style guide):
"no-multiple-empty-lines": ["error", { "max": 2 }]
a = 1
b = 2
Becomes:
a = 1
b = 2
Opinionated behavior should only be the default and should be configurable. Ref: https://github.com/prettier/prettier/issues/1613
Issue Analytics
- State:
- Created 5 years ago
- Reactions:23
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Prettier doesn't format based on my eslint config - Stack Overflow
I already have an .eslintrc.js and my default formatter (Eslint-prettier) doesn't format according to my eslint rules. For example: when i type ...
Read more >Integrating with Linters - Prettier
Linters usually contain not only code quality rules, but also stylistic rules. Most stylistic rules are unnecessary when using Prettier, but worse –...
Read more >How to make ESLint work with Prettier avoiding conflicts and ...
At this point, you have both Prettier and ESLint up and running on your code. Even if it's working, it could be that...
Read more >Setting up efficient workflows with ESLint, Prettier and ...
In this article I would like to start very easily and go into more depth from topic to topic. In the first step...
Read more >How to use Prettier with ESLint - Robin Wieruch
How to combine Prettier and ESLint for VSCode, Sublime, or any other IDE/editor. You will get to know the ESLint Prettier Rules that...
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
I’m thinking that for your case if you really don’t want the prettier way of formatting then maybe it’s just better for you to go with using eslint only.
Why do they decide for us what will be more beautiful for our project?