Skip to content

Commit

Permalink
chore(repo): enforce commitlint scopes (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-stepanenko authored Nov 1, 2023
1 parent 20bf202 commit c7887ef
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ runs:
using: composite

steps:
# - name: Commitlint
# shell: bash
# run: npx --no-install commitlint --from=last-release
- name: Commitlint
if: runner.os != 'Windows'
uses: wagoid/commitlint-github-action@v5

- name: Lint
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit $1
npm run commitlint ${1}
12 changes: 12 additions & 0 deletions commitlint.config.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'scope-enum': [
2,
'always',
[
'qwik-nx',
'create-qwik-nx',
'repo', // anything related to managing the repo itself
],
],
'scope-empty': [2, 'never'],
},
};
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"prepare": "husky install",
"start": "nx serve",
"test": "nx test",
"e2e": "nx e2e"
"e2e": "nx e2e",
"commitlint": "commitlint --edit"
},
"private": true,
"packageManager": "[email protected]",
Expand Down

0 comments on commit c7887ef

Please sign in to comment.