Skip to content

Commit

Permalink
feat(ts): introduce conventional commit check
Browse files Browse the repository at this point in the history
  • Loading branch information
pplmx committed Aug 31, 2024
1 parent b5a0558 commit ae1639f
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpx commitlint --edit $1
4 changes: 2 additions & 2 deletions template/ts/{{cookiecutter.project_slug}}/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
npm test
npx lint-staged
pnpm test
pnpx lint-staged
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import type { UserConfig } from "@commitlint/types";

const Configuration: UserConfig = {
extends: ["@commitlint/config-conventional"],
};

export default Configuration;
15 changes: 13 additions & 2 deletions template/ts/{{cookiecutter.project_slug}}/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,37 @@
"build": "tsc && ncc build lib/index.js",
"test": "jest",
"lint": "biome check --write --no-errors-on-unmatched --files-ignore-unknown=true",
"prepare": "husky"
"prepare": "husky",
"commit": "pnpx git-cz"
},
"dependencies": {
"@actions/core": "^1.10.1",
"@actions/github": "^6.0.0",
"@types/node": "^22.5.1",
"axios": "^1.7.5",
"axios": "^1.7.6",
"toml": "^3.0.0"
},
"devDependencies": {
"@biomejs/biome": "1.8.3",
"@commitlint/cli": "^19.4.1",
"@commitlint/config-conventional": "^19.4.1",
"@commitlint/cz-commitlint": "^19.4.0",
"@commitlint/types": "^19.0.3",
"@types/jest": "^29.5.12",
"@vercel/ncc": "^0.38.1",
"husky": "^9.1.5",
"inquirer": "^9.3.6",
"jest": "^29.7.0",
"lint-staged": "^15.2.9",
"ts-jest": "^29.2.5",
"typescript": "^5.5.4"
},
"lint-staged": {
"*": ["biome check --write --no-errors-on-unmatched --files-ignore-unknown=true"]
},
"config": {
"commitizen": {
"path": "@commitlint/cz-commitlint"
}
}
}

0 comments on commit ae1639f

Please sign in to comment.