Enforce prettier code style
NOTE: Netlify Build Plugins are in beta.
To install, add prettier
and this plugin to your project:
yarn add --dev prettier netlify-plugin-prettier
or
npm install --save-dev prettier netlify-plugin-prettier
Then add the following lines to your netlify.toml
file:
[[plugins]]
package = "netlify-plugin-prettier"
Note: The [[plugins]]
line is required for each plugin, even if you have other plugins in your netlify.toml
file already.
If prettier
is checking too many things, try adding a .prettierignore
file.