Skip to content
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

chore(package): add lint-staged eslint autofix #2946

Merged
merged 1 commit into from
Jan 14, 2018
Merged

Conversation

JLHwung
Copy link
Collaborator

@JLHwung JLHwung commented Jan 6, 2018

This PR introduces pre-commit hook to run eslint autofix on staged .js files. Most of time you will not waste your time adding whitespace or commas after you draft a PR and the travis fails due to style issues. No more, it is frustrating and tedious. We really treasure your time.

In this time you simply draft your ideas and let eslint fix most style issues for you on commit, you just sit and don't have to run eslint after you revise files.

git-exec-and-restage is less popular but it proves pretty handy over half a year coporate trial. Basically git-exec-and-restage will only run git add on fully staged file. It runs linter on partially staged file and it depends on you to commit the style changes of specific hunks later.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 97.249% when pulling dae3bbc on precommit-eslint into f19629e on master.

1 similar comment
@coveralls
Copy link

coveralls commented Jan 6, 2018

Coverage Status

Coverage remained the same at 97.249% when pulling dae3bbc on precommit-eslint into f19629e on master.

@JLHwung JLHwung merged commit ca5065e into master Jan 14, 2018
@JLHwung JLHwung deleted the precommit-eslint branch January 14, 2018 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants