chore: add commitlint
This commit is contained in:
parent
fac8349878
commit
51ed1266c9
5 changed files with 711 additions and 36 deletions
4
.husky/commit-msg
Executable file
4
.husky/commit-msg
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
. "$(dirname -- "$0")/_/husky.sh"
|
||||||
|
|
||||||
|
npx --no -- commitlint --edit "${1}"
|
|
@ -36,7 +36,11 @@
|
||||||
```
|
```
|
||||||
pnpm install
|
pnpm install
|
||||||
```
|
```
|
||||||
4. Run whatever command you need either in project root or in individual packages
|
4. Setup husky
|
||||||
|
```
|
||||||
|
pnpm husky install
|
||||||
|
```
|
||||||
|
5. Run whatever command you need either in project root or in individual packages
|
||||||
- `pnpm build` - Build all apps and packages
|
- `pnpm build` - Build all apps and packages
|
||||||
- `pnpm dev` - Run all apps and packages locally
|
- `pnpm dev` - Run all apps and packages locally
|
||||||
- blog - http://localhost:3000
|
- blog - http://localhost:3000
|
||||||
|
|
28
commitlint.config.js
Normal file
28
commitlint.config.js
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
/** @type {import('@commitlint/types').UserConfig} */
|
||||||
|
module.exports = {
|
||||||
|
extends: ["@commitlint/config-conventional"],
|
||||||
|
rules: {
|
||||||
|
"type-enum": [
|
||||||
|
2,
|
||||||
|
"always",
|
||||||
|
["chore", "ci", "docs", "feat", "fix", "refactor"],
|
||||||
|
],
|
||||||
|
"scope-enum": [
|
||||||
|
2,
|
||||||
|
"always",
|
||||||
|
[
|
||||||
|
// apps
|
||||||
|
"blog",
|
||||||
|
"main",
|
||||||
|
"portfolio",
|
||||||
|
|
||||||
|
// packages
|
||||||
|
"content",
|
||||||
|
"eslint-config",
|
||||||
|
"playwright-config",
|
||||||
|
"prettier-config",
|
||||||
|
"tailwind-config",
|
||||||
|
],
|
||||||
|
],
|
||||||
|
},
|
||||||
|
}
|
|
@ -11,10 +11,13 @@
|
||||||
"clean": "turbo run clean && rm -rf node_modules"
|
"clean": "turbo run clean && rm -rf node_modules"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@commitlint/cli": "^17.7.1",
|
||||||
|
"@commitlint/config-conventional": "^17.7.0",
|
||||||
"@developomp-site/eslint-config": "workspace:*",
|
"@developomp-site/eslint-config": "workspace:*",
|
||||||
"@developomp-site/prettier-config": "workspace:*",
|
"@developomp-site/prettier-config": "workspace:*",
|
||||||
"eslint": "^8.44.0",
|
"eslint": "^8.44.0",
|
||||||
"eslint-plugin-turbo": "^1.10.7",
|
"eslint-plugin-turbo": "^1.10.7",
|
||||||
|
"husky": "^8.0.3",
|
||||||
"prettier": "^2.8.8",
|
"prettier": "^2.8.8",
|
||||||
"turbo": "1.10.12"
|
"turbo": "1.10.12"
|
||||||
}
|
}
|
||||||
|
|
706
pnpm-lock.yaml
generated
706
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue