Skip to content

Commit cf6a5e9

Browse files
committed
chore: move to lefthook
1 parent 4a69770 commit cf6a5e9

File tree

5 files changed

+824
-83
lines changed

5 files changed

+824
-83
lines changed

.yarn/install-state.gz

53 KB
Binary file not shown.

commitlint.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: ['@commitlint/config-conventional'],
3+
};

lefthook.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
pre-commit:
2+
parallel: true
3+
commands:
4+
lint:
5+
glob: "*.{js,ts,tsx}"
6+
run: yarn lint {staged_files}
7+
types:
8+
glob: "*.{json,js,ts,tsx}"
9+
run: yarn tsc --noEmit
10+
test:
11+
glob: "*.{json,js,ts,tsx}"
12+
run: yarn test
13+
commit-msg:
14+
parallel: true
15+
commands:
16+
commitlint:
17+
run: yarn commitlint --edit

package.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,17 @@
3030
},
3131
"devDependencies": {
3232
"@babel/core": "^7.12.3",
33+
"@commitlint/cli": "^19.3.0",
34+
"@commitlint/config-conventional": "^19.2.2",
3335
"@release-it/conventional-changelog": "^2.0.0",
3436
"@types/jest": "^26.0.15",
3537
"@types/jest-diff": "^24.3.0",
3638
"@types/mkdirp": "^1.0.1",
3739
"conventional-changelog-cli": "^2.1.0",
3840
"eslint": "^7.12.1",
3941
"eslint-config-satya164": "^3.1.8",
40-
"husky": "^4.3.0",
4142
"jest": "^26.6.1",
43+
"lefthook": "^1.7.0",
4244
"prettier": "^2.1.2",
4345
"release-it": "^14.2.0",
4446
"typescript": "^4.0.5"
@@ -58,10 +60,5 @@
5860
"(__fixtures__|__file_snapshots__)"
5961
]
6062
},
61-
"husky": {
62-
"hooks": {
63-
"pre-commit": "yarn lint && yarn typecheck && yarn test"
64-
}
65-
},
6663
"packageManager": "[email protected]"
6764
}

0 commit comments

Comments
 (0)