-
Notifications
You must be signed in to change notification settings - Fork 181
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
[Proposal] Add basic commit QA tooling #173
base: master
Are you sure you want to change the base?
[Proposal] Add basic commit QA tooling #173
Conversation
"lint-src": "./node_modules/.bin/eslint src/**/*.js", | ||
"lint-test": "./node_modules/.bin/eslint test/**/*.js", | ||
"lint": "npm run lint-src && npm run lint-test", | ||
"lint": "run-p lint-*", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you help me understand a bit more of what is going on here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is using npm-run-all
to execute task in parallel. Before they were running sequentially (&&
)
It's cross platform and supports globs, like in this case, where it will execute in parallel all scripts that start with lint-
.
"test": "mocha --require babel-core/register", | ||
"prepare": "npm run prepublish", | ||
"precommit": "lint-staged", | ||
"prepush": "yarn qa" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar enough with yarn - is this a yarn only script?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sure looks like a typo. I would say this is supposed to be npm run qa
This adds:
husky
and its hooks to ensure quality of the commits that are pushed. It is not intended to replace CI that runs tests, it is more for contributor to be sure that his/her commit is passing all the tests and follow the linting guidelines for the repo.