EsLint Git Pre-commit Hook
Instructions
- Copy the pre-commit file to your repository > .git/hooks/{copy file here}
- Inside .git/hooks/ , run > chmod u+x pre-commit
- In Line 22:13 change directory to point to .eslintrc file in your project.
- Run > npm install -g eslint babel-eslint eslint-plugin-react
- Commit your code to see the validations working.
Thanks To linhmtran168