DEV Community

Discussion on: Adding Prettier to a Project

Collapse
 
piotrlewandowski profile image
Piotr Lewandowski

Prettier does whatever you ask it to do. If you hate the result, change the prettier configuration to your liking. Tools like prettier suppose to help with consistent formatting of the source code (especially useful when working on codebase with multiple devs). It works especially great when combined with some linting tool (ESLint).

Collapse
 
jonrandy profile image
Jon Randy 🎖️

I've tried everything I can to make it not wreck the way I format my code. No go

Thread Thread
 
piotrlewandowski profile image
Piotr Lewandowski • Edited

Did you try to combine prettier and ESLint? (eslint-plugin-prettier). Unless you have very, very unusual way of formatting you code it should really help...
I could help with configuration if you'd be able to publish your prettier/eslint config (on gist maybe?)
edit: here's my Webpack 5 boilerplate with ESLint/prettier config, maybe it'll help: github.com/piotrlewandowski/webpac...