[website] Replace ESLint with Prettier
See original GitHub issueDo you want to request a feature or report a bug? Feature (Build tools)
What is the current behavior? ESLint rules are so annoying and slow down the development.
If the current behavior is a bug, please provide the steps to reproduce and a minimal repository on GitHub that we can yarn install
and yarn test
.
N/A
What is the expected behavior? Prettier is the standard currently and so many popular projects use it and makes you write the code without being worried about one less semicolon or on which line close which tag 😦
Please provide your exact Babel configuration and mention your Linaria, Node, Yarn/npm version and operating system. Not related.
Issue Analytics
- State:
- Created 6 years ago
- Comments:19 (11 by maintainers)
Top Results From Across the Web
How to replace Prettier by ESLint rules ? | by Florian Briand
In this article, I'll list and explain how to quickly replace Prettier rules by equivalent ESLint rules, to then allow you to really...
Read more >How to use Prettier with ESLint - Robin Wieruch
This tutorial is part 3 of 3 in this series. ... The default setup for my JavaScript projects: Prettier + ESLint. Whereas Prettier...
Read more >Integrating with Linters - Prettier
First, we have plugins that let you run Prettier as if it was a linter rule: eslint-plugin-prettier · stylelint-prettier. These plugins were especially...
Read more >Using Prettier and ESLint to automate formatting and fixing ...
Learn how to use ESLint and Prettier together to automatically format and fix JavaScript code in your projects.
Read more >Replace `'react'` with `"react"` eslint(prettier/prettier)
You can try something like this, it works for me. package.json "devDependencies": { "eslint-plugin-prettier": "^3.1.1", "prettier": ...
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
Prettier will format the code, but it can’t catch the mistakes in the code that a linter can. For example, trying to use a variable which is not defined and many more other rules that ESLint has. That’s why it’s important to use both ESLint and prettier together.
In our ESLint config we have only enabled rules which can catch potential errors and disabled all code style related rules which are handled by prettier. But since our config is based on Airbnb’s config, some rules could be annoying as the Airbnb config is unnecessary restrictive. If you are annoyed by a specific rule, please mention it and we can discuss disabling it in the config.
It’s different:
prettier-eslint
- format code with prettier, then override some style rules with eslint (for examplearray-bracket-spacing
), like runningprettier
, theneslint --fix
.eslint
witheslint-plugin-prettier
- disable all of the style related rules from eslint and always use the prettier for formatting, equivalent to runningeslint --fix
thenprettier