Disable individual prettier options #13925
-
My understanding is that prettier sets defaults for options, for example I believe the My main reason for this is because I can get ESLint to do everything I want from prettier except the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
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 See https://prettier.io/docs/en/comparison.html for more details. The best option to make Prettier compatible with ESLint is to add |
Beta Was this translation helpful? Give feedback.
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.…