'how to run pre-commit in angular 7?

when I run the git commit that time I need to run the ng lint --fix I tried with this. my package.json file image attached below:

enter image description here

but it not working for me



Solution 1:[1]

Follow this

install husky globally: npm install husky -g

Install git hooks (this will create the .husky folder): husky install

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Zach Jensz