Would it make sense to keep configuration in some sort of .prettierrc
file?
I feel that would be useful for sharing in teams and usage in whatever IDEs people wanna use.
On a related note, I need to ignore some directories. Can we also have a .prettierignore
file?
If you need project-specific prettier config and a .prettierignore
_right now,_ running prettier inside eslint --fix
using eslint-plugin-prettier works really well.
We are not going to add two more dot files :) I think it's an anti-pattern to rely on dot files and it's crazy when projects have like ~30 of them just to work with the tooling.
The answer is https://github.com/prettier/prettier/issues/918 where we can read from a package.json. As for ignoring files, I'm pretty sure glob supports ignoring paths.
This tool is not interested in embracing complex mechanisms for deriving and inheriting configuration. We are focusing on a simple integration path that other tools, if desired, can build on.
Most helpful comment
On a related note, I need to ignore some directories. Can we also have a
.prettierignore
file?