Shared Prettier config for Next.js projects.
- Install package as a dev dependency
npm install --save-dev @nharox/next-prettier-config
- Update
package.json
{
// ...
"prettier": "@nharox/next-prettier-config"
}
- Add the following script in your
package.json
{
// ...
"scripts": {
// ...
"format": "prettier --write \"**/*.{ts,tsx}\""
}
}