Skip to content

Commit c7887ef

Browse files
chore(repo): enforce commitlint scopes (#209)
1 parent 20bf202 commit c7887ef

File tree

4 files changed

+18
-5
lines changed

4 files changed

+18
-5
lines changed

.github/actions/test/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ runs:
66
using: composite
77

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

1313
- name: Lint
1414
shell: bash

.husky/commit-msg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
npx --no-install commitlint --edit $1
4+
npm run commitlint ${1}

commitlint.config.cjs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
11
module.exports = {
22
extends: ['@commitlint/config-conventional'],
3+
rules: {
4+
'scope-enum': [
5+
2,
6+
'always',
7+
[
8+
'qwik-nx',
9+
'create-qwik-nx',
10+
'repo', // anything related to managing the repo itself
11+
],
12+
],
13+
'scope-empty': [2, 'never'],
14+
},
315
};

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"prepare": "husky install",
1111
"start": "nx serve",
1212
"test": "nx test",
13-
"e2e": "nx e2e"
13+
"e2e": "nx e2e",
14+
"commitlint": "commitlint --edit"
1415
},
1516
"private": true,
1617
"packageManager": "[email protected]",

0 commit comments

Comments
 (0)