Skip to content

Commit 06232a0

Browse files
conf(github): add commitlint PE-37037
1 parent dae1bd5 commit 06232a0

File tree

5 files changed

+662
-11
lines changed

5 files changed

+662
-11
lines changed

.commitlintrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["./node_modules/cz-ls-commits/commitlint"]
3+
}

.github/workflows/commitlint.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: commitlint
2+
on: [push, pull_request]
3+
4+
jobs:
5+
commitlint:
6+
runs-on: ubuntu-latest
7+
8+
steps:
9+
- name: Checkout repository
10+
uses: actions/checkout@v4
11+
with:
12+
fetch-depth: 0
13+
14+
- name: Use Node.js
15+
uses: actions/setup-node@v4
16+
with:
17+
cache: yarn
18+
node-version-file: .nvmrc
19+
20+
- name: Install dependencies
21+
run: yarn
22+
23+
- name: Lint commit message
24+
run: yarn commitlint --from=HEAD~1

.husky/commit-msg

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
yarn commitlint --edit $1

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@
2828
"lodash.isobject": "^3.0.2"
2929
},
3030
"devDependencies": {
31+
"@commitlint/cli": "^19.2.1",
3132
"@react-native-picker/picker": "^2.4.0",
3233
"@types/react-native": "^0.60.22",
3334
"babel-jest": "^23.6.0",
3435
"babel-preset-react-native": "^4.0.1",
36+
"cz-ls-commits": "^1.1.0",
3537
"enzyme": "^3.7.0",
3638
"enzyme-adapter-react-16": "^1.7.0",
3739
"enzyme-to-json": "^3.3.5",

0 commit comments

Comments
 (0)