3 ms·
In new projects I usually add an empty .prettierrc file with a single comment: // Empty file. Use default Prettier settings. No rules here. To make it clear
by j1elo 2y ago
In new projects I usually add an empty .prettierrc file with a single comment:
// Empty file. Use default Prettier settings. No rules here.
To make it clear for other people that it was not just a mistake that the formatter was missing its configuration or that no config file existed at all. Useful to deter from adding new rules because someone is capricious about their own preferences...
- vhcr 2y agoMaybe even add a CI step that closes PRs if someone modifies formatter config files.
- xandrius 2y agoAnd fires them too, while we are at it!
- koolba 2y agoI like to put a haikus in spots like this: // Empty by choice // Use the Prettier defaults // No customized rules Taking the time to write a specific one gives added weight to the decision to use the defaults as anyone adding a rule has to remove the haiku.