react-native-boilerplate icon indicating copy to clipboard operation
react-native-boilerplate copied to clipboard

Setup pre-commit hook to lint the files before comitting

Open Andras-Simon opened this issue 5 years ago • 2 comments

Since the .git folder is not versioned I created the .githooks folder, where the pre-commit script resides.

I created a setup-pre-commit-linting npm script, which simply sets the git hooks directory to .githooks. This will be automatically executed after npm install. #15

Andras-Simon avatar Oct 16 '19 14:10 Andras-Simon

Hi @Andras-Simon thanks for the PR, currently it is not running npm run lint. Am I missing something, please let me know 😃

JayaKrishnaNamburu avatar Oct 16 '19 16:10 JayaKrishnaNamburu

Hi @JayaKrishnaNamburu ,

if you run npm install it will set up the hook for you. You can also use npm run setup-pre-commit-linting if you already ran npm install.

Andras-Simon avatar Oct 17 '19 11:10 Andras-Simon