Skip to content

Commit

Permalink
fix: turn on commitlint
Browse files Browse the repository at this point in the history
Because releases are automated with semantic-release, we need
conventional commits.
  • Loading branch information
cmars committed Feb 10, 2022
1 parent 54fcfe7 commit 4273322
Show file tree
Hide file tree
Showing 3 changed files with 607 additions and 16 deletions.
12 changes: 12 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"rules": {
"header-max-length": [2, "always", 72],
"body-leading-blank": [2, "always"],
"type-empty": [2, "never"],
"type-enum": [
2,
"always",
["feat", "fix", "docs", "chore", "refactor", "test", "revert"]
]
}
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@
"changelog": "yarn ts-node src/changelog.ts",
"lint": "run-p lint:*",
"lint:formatting": "prettier --check 'src/**/*.{js,ts}'",
"lint:commits": "commitlint --from=HEAD~1",
"format": "prettier --write 'src/**/*.{js,ts}'"
},
"devDependencies": {
"@babel/plugin-transform-runtime": "^7.16.0",
"@babel/preset-env": "^7.16.0",
"@babel/preset-typescript": "^7.16.0",
"@commitlint/cli": "16.0.2",
"@types/fs-extra": "^9.0.13",
"@types/jest": "^26.0.24",
"@types/json-stable-stringify": "^1.0.33",
Expand Down
Loading

0 comments on commit 4273322

Please sign in to comment.