-
Notifications
You must be signed in to change notification settings - Fork 85
build: Add commitzen and lint-staged #98
Conversation
Adds commitzen as a dev dependency so we can write better commit messages. Also adds `lint-staged` as a dev dependency, which was overlooked from a previous commit when integrating Prettier.
Codecov Report
@@ Coverage Diff @@
## master #98 +/- ##
=======================================
Coverage 98.58% 98.58%
=======================================
Files 11 11
Lines 636 636
=======================================
Hits 627 627
Misses 9 9 Continue to review full report at Codecov.
|
}, | ||
"config": { | ||
"commitizen": { | ||
"path": "./node_modules/cz-conventional-changelog" |
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.
nit: I think "path": "cz-conventional-changelog"
should be enough.
@@ -15,7 +15,8 @@ | |||
"lint": "eslint \"./{lib,test}/**/*.js\"", | |||
"format": "prettier-eslint --write --list-different \"./{lib,test}/**/*.{js,json,md}\"", | |||
"precommit": "lint-staged", | |||
"np": "np --no-publish" | |||
"np": "np --no-publish", | |||
"commit": "git cz" |
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 means that precommit
will be executed twice, the first time by npm
before commit
and the second time by husky
after commit
. See typicode/husky#99 for some workarounds.
I'm not sure to understand this part. I don't see anything related to I'm a big While I think we should keep it for new users we should use something like |
Re:lint-staged, this is because without adding it as a dev dependency, Down to try other tools here! My main goal is to be able to generate more friendly changelog from commit messages. |
I meant that there is no changes about |
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.
A remark about npm/husky hooks, but LGTM otherwise. Really like conventional commits 👍
You're right - not sure why |
@fathyb I think we should do these! I'll close this one for now, but feel free to send a PR to set those up. |
Adds commitzen as a dev dependency so we can write better commit messages. Also adds
lint-staged
as a dev dependency, which was overlooked from a previous commit when integrating Prettier.