Skip to content

Git hook scripts are useful for identifying simple issues before submission to code review. We run our hooks on every commit to automatically point out issues like npm high & critical vulnerabilities, npm test, eslint, branch naming

License

Notifications You must be signed in to change notification settings

SarasaGunawardhana/pre-commit-hooks-nodejs-reactjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pre-commit-hooks-nodejs-reactjs

  • The pre-commit hooks I have code will help to find High and Critical Vulnerabilities, if find, commit will be discarded.
  • Also Validate branch names, this will not let you to push changes to bad naming branches.

steps to use pre-commit hooks on your nodejs project, can be used in React Js projects

copy and paste ./scripts folder into your porject in root path. in package.json, add this lines scripts section

"postinstall": "shx echo 'Installing hooks...' && shx cp ./scripts/pre-commit.bash .git/hooks/pre-commit"

also need to install shx npm module as Dev dependency

install pre-commit hooks

npm i

About

Git hook scripts are useful for identifying simple issues before submission to code review. We run our hooks on every commit to automatically point out issues like npm high & critical vulnerabilities, npm test, eslint, branch naming

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages