Skip to content

Commit

Permalink
feat: add commitlint #33
Browse files Browse the repository at this point in the history
  • Loading branch information
wazolab committed Nov 21, 2024
1 parent 27611ab commit 3126b2f
Show file tree
Hide file tree
Showing 4 changed files with 690 additions and 278 deletions.
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,6 @@ Install dependencies
yarn install
```

Enable `simple-git-hooks`
```bash
yarn dlx simple-git-hooks
```

Serve the demo page
```bash
yarn dev
Expand Down
7 changes: 7 additions & 0 deletions commitlint.config.ts
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
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"preversion": "yarn build",
"prepare": "simple-git-hooks",
"preview": "vite preview",
"test": "vitest"
},
Expand All @@ -44,13 +45,16 @@
},
"devDependencies": {
"@antfu/eslint-config": "^3.9.2",
"@commitlint/cli": "^19.6.0",
"@commitlint/config-conventional": "^19.6.0",
"eslint": "^9.15.0",
"lint-staged": "^15.2.10",
"simple-git-hooks": "^2.11.1",
"typescript": "^5.6.2",
"vite": "^5.4.4"
},
"simple-git-hooks": {
"commit-msg": "yarn dlx commitlint --edit $1",
"pre-commit": "yarn dlx lint-staged",
"preserveUnused": true
},
Expand Down
Loading

0 comments on commit 3126b2f

Please sign in to comment.