Skip to content

Commit

Permalink
feat: add commitlint
Browse files Browse the repository at this point in the history
  • Loading branch information
shijistar committed May 3, 2024
1 parent 9bc1c7e commit d2fe275
Show file tree
Hide file tree
Showing 6 changed files with 854 additions and 35 deletions.
9 changes: 9 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env sh

. "$(dirname "$0")/_/husky.sh"

echo "\033[36m Linting commit messages... \033[0m"
sleep 0.5

npx commitlint --edit $1

34 changes: 2 additions & 32 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,43 +1,13 @@
.umi
.umi-production
**/src/umi
node_modules
dist
lib
.dockerignore
.DS_Store
.eslintignore
*.png
*.toml
docker
.editorconfig
Dockerfile*
.gitignore
.prettierignore
.prettierrc.json
LICENSE
.eslintcache
*.lock
yarn-error.log
.history
CNAME
/modules
build
public
CHANGELOG.md
**/*.less.d.ts
packages/*/dist
packages/*/build
packages/*/public
packages/*/src/api/*/**/*
packages/gdcd/es
packages/gdcd/lib
packages/gdcd/dist
packages/gdcd/_site
packages/gdcd-pro/packages/*/es
packages/gdcd-pro/packages/*/lib
packages/gdcc/es
packages/gdcc/lib
packages/gdcb/es
packages/gdcb/lib

iconfont.js
pnpm-lock.yaml
8 changes: 5 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
- ## 0.1.0
# 1.0.0-alpha.0 (2024-05-02)

2024-04-29
### Features

- 🆕 The first release
- add commitlint ([fba1adf](https://github.com/shijistar/api-hub/commit/fba1adfc3d440c7b5b2c24eb2514053ae8d4556b))
- add husky and lint-staged ([d58e331](https://github.com/shijistar/api-hub/commit/d58e3318e48df67dcbe63df4e9287d810d531bae))
- add main implementation of api-hub ([63af1d3](https://github.com/shijistar/api-hub/commit/63af1d3b545d1f403928067130d3db7b077561ad))
4 changes: 4 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
parserPreset: 'conventional-changelog-conventionalcommits',
};
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
],
"scripts": {
"build": "father build",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
"prepare": "husky",
"prepublishOnly": "npm run build"
},
Expand All @@ -49,12 +50,18 @@
"tsx": "^4.8.2"
},
"devDependencies": {
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@trivago/prettier-plugin-sort-imports": "4.3.0",
"@types/cross-spawn": "^6.0.6",
"@types/node": "^20.12.7",
"@types/signale": "^1.4.7",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.0",
"commitlint": "^19.3.0",
"conventional-changelog": "^5.1.0",
"conventional-changelog-cli": "^4.1.0",
"conventional-changelog-conventionalcommits": "^7.0.2",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-standard": "^17.1.0",
Expand Down
Loading

0 comments on commit d2fe275

Please sign in to comment.