Skip to content

Commit

Permalink
Chore: adds commitlint
Browse files Browse the repository at this point in the history
  • Loading branch information
pustovitDmytro committed Apr 8, 2021
1 parent a075dab commit 38ded63
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"rules": {
"subject-empty": [2, "never"],
"type-empty": [2, "never"],
"type-enum": [
2,
"always",
[
"Chore",
"Fix",
"New",
"Update",
"Breaking",
"Docs",
"Upgrade"
]
]
}
}
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit $1
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "./lib",
"scripts": {
"build": "babel src --out-dir ./lib",
"prepare": "npm run build",
"prepare": "npm run build && husky install",
"coveralls": "cat ./coverage/lcov.info | coveralls",
"test:security": "npm audit",
"test:lint": "eslint src",
Expand Down Expand Up @@ -36,6 +36,7 @@
"@babel/polyfill": "^7.8.7",
"@babel/preset-env": "^7.3.4",
"@babel/runtime": "^7.3.4",
"@commitlint/cli": "^12.1.1",
"@semantic-release/changelog": "^3.0.4",
"@semantic-release/commit-analyzer": "^6.1.0",
"@semantic-release/git": "^7.0.8",
Expand All @@ -56,6 +57,7 @@
"eslint-plugin-prefer-spread": "^1.0.3",
"eslint-plugin-react": "^7.12.4",
"fs-extra": "^8.1.0",
"husky": "^6.0.0",
"mocha": "^6.2.3",
"nyc": "^14.1.1",
"semantic-release": "^15.13.19",
Expand Down

0 comments on commit 38ded63

Please sign in to comment.