Open adrianbrowning opened 4 months ago
Setup:
pnpm exec commitlint --edit "$1"
pnpm exec lint-staged
MESSAGE=$(cat $FILE) TICKET=[$(git rev-parse --abbrev-ref HEAD | grep -Eo '^(\w+/)?(\w+[-_])?[0-9]+' | grep -Eo '(\w+[-])?[0-9]+' | tr "[:lower:]" "[:upper:]")] if [[ $TICKET == "[]" || "$MESSAGE" == "$TICKET"* ]];then exit 0; fi
echo $"$MESSAGE\n\n$TICKET" > $FILE
- [ ] Eslint both packages
"lint": "tsc --noEmit ; eslint \"src/*/.{j,t}s{,x}\" --max-warnings=0 --cache", "lint:fix": "eslint \"src/*/.{j,t}s{,x}\" --cache --max-warnings=0 --fix",
"knip": { "entry": [ "scripts/*/.{js,ts}" ], "project": [ "*/.{js,ts}" ], "ignoreBinaries": [ "date" ], "ignoreDependencies": [ "prisma-.+" ] },
```commitlinit.config.js export default { "extends": [ "@commitlint/config-conventional" ], "rules": { "subject-case": [ 2, "always", [ "sentence-case", "lower-case" ]], }, };
Setup:
pnpm exec commitlint --edit "$1"
pnpm exec lint-staged
echo $"$MESSAGE\n\n$TICKET" > $FILE
"lint": "tsc --noEmit ; eslint \"src/*/.{j,t}s{,x}\" --max-warnings=0 --cache", "lint:fix": "eslint \"src/*/.{j,t}s{,x}\" --cache --max-warnings=0 --fix",
"knip": { "entry": [ "scripts/*/.{js,ts}" ], "project": [ "*/.{js,ts}" ], "ignoreBinaries": [ "date" ], "ignoreDependencies": [ "prisma-.+" ] },