Skip to content

Disable individual prettier options #13925

Answered by kachkaev
caribou-code asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @caribou-code! Disabling Prettier rules is not possible by design. Prettier works as a printer, so applies to the whole doc. The only option to make formatting exceptions is to use prettier-ignore comments. However, they are supposed to be used very rarely.

See https://prettier.io/docs/en/comparison.html for more details.

The best option to make Prettier compatible with ESLint is to add eslint-config-prettier to your project. It will turn conflicting ESLint rules off, thus making ESLint focused only on semantics. This works really well because formatting everything with Prettier instead of ESLint reduces the number of squiggly red lines you see in your editor. This reduces distraction.…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@kachkaev
Comment options

@caribou-code
Comment options

Answer selected by fisker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants