@zeitonline/prettier-config
v0.6.0
Published
Common prettier config for ZEIT ONLINE
Downloads
625
Readme
@zeitonline/prettier-config
This package provides a shared Prettier configuration for ZEIT ONLINE projects.
Installation & Usage
- Make sure to add the
.editorconfig
file to your project as well, since prettier picks up a few settings from it:
wget https://raw.githubusercontent.com/zeitonline/frontend-code-style/main/.editorconfig
- Install the package using npm:
npm install --save-dev @zeitonline/prettier-config
- Create a
.prettierrc.mjs
file in the root of your project, import and spread the shared configuration:
import zonPrettierConfig from "@zeitonline/prettier-config";
export default {
...zonPrettierConfig,
};
- (Optional) Add a .prettierignore file to your project to exclude files from formatting, e.g.:
package-lock.json
*.md
*.css
*.scss
*.html
*.yml
*.yaml
*.lock
- (Optional) Add a
format
script to yourpackage.json
, e.g.:
{
"scripts": {
"format": "prettier --write ."
}
}