Prettier as a dev dependency

Viewed 2137

I'm collaborating on a project and use prettier as my code formatter. The number of collaborators is growing and I just suggested that we install prettier as a dev dependency and set up a config file so that our formatting is consistent. I have two questions about this:

  1. I want to specify a specific version in the package.json so that versioning does not create diffs. I have Prettier installed globally on my machine and want to make sure the dev dependency is taking precedence over the globally installed version.
  2. I wanted to know if anyone had any experience putting multiple config files in their project to format different directories slightly differently and if this caused any issues. specifically I'm thinking of using separate config files for the server and client code.

Any help is appreciated. Thanks so much.

1 Answers
Related