typicode / husky

Git hooks made easy 🐶 woof!
https://typicode.github.io/husky
MIT License
31.69k stars 996 forks source link

npx husky add cannot be used ? #1428

Closed gitboyzcf closed 3 weeks ago

gitboyzcf commented 3 weeks ago

"husky": "^9.0.11"

npx husky add .husky/pre-commit "npx --no-install -- lint-staged" 👇 add command is deprecated ???

typicode commented 3 weeks ago

It's not needed anymore. It was doing changing permissions and setting up some things. You can simply create the file now.

gitboyzcf commented 2 weeks ago

May I ask if there are any alternatives? What are they?

typicode commented 2 weeks ago

If you're on macOS or Linux, echo "your command" > .husky/pre-commit or using your code editor to create the file.