-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(app): setup commitlint for commit message validation
- Loading branch information
1 parent
0a2ee05
commit 63ab9b8
Showing
5 changed files
with
1,021 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn commitlint --edit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
const conventionalCommit = require("./conventionalCommit.json"); | ||
|
||
const typesEnum = Object.keys(conventionalCommit.types); | ||
const scopesEnum = Object.keys(conventionalCommit.scopes); | ||
|
||
module.exports = { | ||
extends: ["@commitlint/config-conventional"], | ||
rules: { | ||
"type-enum": [2, "always", typesEnum], | ||
"scope-case": [2, "always", ["camel-case"]], | ||
"scope-enum": [2, "always", scopesEnum], | ||
"subject-empty": [2, "never"], | ||
"subject-case": [2, "always", ["lower-case"]], | ||
"header-max-length": [2, "always", 72], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"types": { | ||
"build": { | ||
"description": "Changes which affect CI configuration files and scripts" | ||
}, | ||
"chore": { | ||
"description": "Changes which aren't user-facing" | ||
}, | ||
"enh": { | ||
"description": "Changes which improve a feature" | ||
}, | ||
"docs": { | ||
"description": "Changes which affect documentation" | ||
}, | ||
"feat": { | ||
"description": "Changes which introduce a new feature" | ||
}, | ||
"fix": { | ||
"description": "Changes which patch a bug" | ||
}, | ||
"perf": { | ||
"description": "changes which improve performance." | ||
}, | ||
"refactor": { | ||
"description": "Changes which neither fix a bug nor add a feature" | ||
}, | ||
"revert": { | ||
"description": "Changes which revert a previous commit" | ||
}, | ||
"style": { | ||
"description": "Changes which don't affect code logic, such as white-spaces, formatting, missing semi-colons" | ||
}, | ||
"test": { | ||
"description": "Changes which add missing tests or correct existing tests" | ||
} | ||
}, | ||
"scopes": { | ||
"api": {}, | ||
"app": {}, | ||
"auth": {}, | ||
"backend": {}, | ||
"ci": {}, | ||
"cli": {}, | ||
"core": {}, | ||
"database": {}, | ||
"frontend": {}, | ||
"lib": {}, | ||
"settings": {}, | ||
"turbo": {}, | ||
"utils": {}, | ||
"web": {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.