Setup prettier fortmat staged files at precommit.
After installation you'll got following setting automatically and
run prettier staged file when you git commit.
package.json
"lint-staged": {
"*": "prettier --ignore-unknown --write"
}.huskey/precommit
npx lint-stagedRun script at your project root directory.
- npm
npx prettier-husky-lint-staged-installer- pnpm
pnpm dlx prettier-husky-lint-staged-installer- bun
bunx prettier-husky-lint-staged-installerThanks goes to these wonderful people (emoji key):
ryota-murakami 💻 📖 |