Standard configuration for Prettier.
npm install --save-dev @la-ots/prettier-config
Create .prettierrc.js
file with the following content:
module.exports = {
...require("@la-ots/prettier-config"),
};
Follow instructions provided by Prettier for integration setup.
Add the following scripts to your package.json
:
{
"scripts": {
"format:check": "prettier --check .",
"format": "prettier --write --ignore-unknown ."
}
}
Execute scripts:
npm run format:check
npm run format