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

[Proposal] Add basic commit QA tooling #173

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Mindaugas-Jacionis
Copy link

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.
  • Reworked scripts to parallelize the ones that possible to and remove redundant ones

"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-*",
Copy link
Owner

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?

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"
Copy link
Owner

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?

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

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.

None yet

3 participants