Skip to content

Add pre-commit hook #4 #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add pre-commit hook #4 #8

wants to merge 1 commit into from

Conversation

adarshlilha
Copy link

Added husky and modified package.json scripts to run linter before git commit

@adarshlilha adarshlilha mentioned this pull request Jun 29, 2018
@iamchathu iamchathu requested a review from rahulrana95 June 30, 2018 03:43
@iamchathu iamchathu added this to the GSSOC milestone Jun 30, 2018
@@ -21,7 +21,9 @@
"develop": "gatsby develop",
"format": "prettier --write 'src/**/*.js'",
"eslint": "node_modules/eslint-watch/bin/esw -w --fix",
"test": "echo \"Error: no test specified\" && exit 1"
"lint": "node_modules/.bin/eslint .",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why you have added it again.
eslint is already there right?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the earlier eslint command runs in watch mode, can I change it to the new command?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know what pre-hook commit do ?

Copy link
Contributor

@rahulrana95 rahulrana95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first character of the word in commit should be capital
Is it done?

@adarshlilha
Copy link
Author

@rahulrana95 should all the words in the commit message be capitalized (Add Precommit Hook) or only the first word of the message(Add precommit hook) ?

@rahulrana95
Copy link
Contributor

@adarshlilha Make first character of all letters capital

@iamchathu
Copy link
Collaborator

@adarshlilha Any update on this PR

@adarshlilha
Copy link
Author

sorry for the delay. I tried using husky to run a custom script to verify all words start with a capital letter but couldn't get this working. Will need help from someone to look into this.

@rahulrana95
Copy link
Contributor

Google about pre-hook and how it works.

@iamchathu
Copy link
Collaborator

@adarshlilha Are you planning to work on this issue?

@rahulrana95 Please Provide complete comment with what needs to updated in the PR to merge. Need to close this soon.

@iamchathu iamchathu self-requested a review July 14, 2018 12:48
@iamchathu iamchathu added the GSSoC GirlScript Summer of Code label Jul 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GSSoC GirlScript Summer of Code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants