feat(): add commitlint

This commit is contained in:
Alexander Bukhalo 2021-01-07 13:35:32 +03:00
parent f863c8f790
commit 3a00e83aa7
4 changed files with 2604 additions and 0 deletions

28
.commitlintrc.json Normal file
View File

@ -0,0 +1,28 @@
{
"extends": ["@commitlint/config-angular"],
"rules": {
"subject-case": [
2,
"always",
["sentence-case", "start-case", "pascal-case", "upper-case", "lower-case"]
],
"type-enum": [
2,
"always",
[
"build",
"chore",
"ci",
"docs",
"feat",
"fix",
"perf",
"refactor",
"revert",
"style",
"test",
"sample"
]
]
}
}

View File

@ -2,6 +2,7 @@
lib lib
sample sample
website website
.commitlintrc.json
.eslintrc.js .eslintrc.js
.prettierrc .prettierrc
package-lock.json package-lock.json

2572
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -47,6 +47,8 @@
"telegraf": "3.38.0" "telegraf": "3.38.0"
}, },
"devDependencies": { "devDependencies": {
"@commitlint/cli": "11.0.0",
"@commitlint/config-angular": "11.0.0",
"@nestjs/common": "7.6.5", "@nestjs/common": "7.6.5",
"@nestjs/core": "7.6.5", "@nestjs/core": "7.6.5",
"@types/lodash": "4.14.167", "@types/lodash": "4.14.167",
@ -71,6 +73,7 @@
}, },
"husky": { "husky": {
"hooks": { "hooks": {
"commit-msg": "commitlint -c .commitlintrc.json -E HUSKY_GIT_PARAMS",
"pre-commit": "lint-staged" "pre-commit": "lint-staged"
} }
}, },