

Then you can have for example eslint -fix fix that up for you. Those are useful if some aspect of Prettier’s output makes Prettier completely unusable to you.

By running Prettier inside your linters, you didn’t have to set up any new infrastructure and you could re-use your editor integrations for the linters. These plugins were especially useful when Prettier was new. These are generally not recommended, but can be useful in certain circumstances.įirst, we have plugins that let you run Prettier as if it was a linter rule: When searching for both Prettier and your linter on the Internet you’ll probably find more related projects.
#Code prettier how to
Luckily it’s easy to turn off rules that conflict or are unnecessary with Prettier, by using these pre-made configs:Ĭheck out the above links for instructions on how to install and set things up. Most stylistic rules are unnecessary when using Prettier, but worse – they might conflict with Prettier! Use Prettier for code formatting concerns, and linters for code-quality concerns, as outlined in Prettier vs. Linters usually contain not only code quality rules, but also stylistic rules.
