Skip to content

Commit 7811fca

Browse files
feat: setup pre commit settings
1 parent 876b12d commit 7811fca

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

.commitlintrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"extends": [
3+
"@commitlint/config-conventional"
4+
]
5+
}

.huskyrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"hooks": {
3+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
4+
"pre-commit": "lint-staged"
5+
}
6+
}

.lintstagedrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"*.{js,jsx,ts,tsx}": "yarn lint:fix"
3+
}

package.json

+4
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,18 @@
3333
"update-section": "^0.3.3"
3434
},
3535
"devDependencies": {
36+
"@commitlint/cli": "^8.3.5",
37+
"@commitlint/config-conventional": "^8.3.4",
3638
"@technote-space/github-action-test-helper": "^0.2.4",
3739
"@types/jest": "^25.1.3",
3840
"@types/node": "^13.7.4",
3941
"@typescript-eslint/eslint-plugin": "^2.20.0",
4042
"@typescript-eslint/parser": "^2.20.0",
4143
"eslint": "^6.8.0",
44+
"husky": "^4.2.3",
4245
"jest": "^25.1.0",
4346
"jest-circus": "^25.1.0",
47+
"lint-staged": "^10.0.7",
4448
"nock": "^12.0.1",
4549
"ts-jest": "^25.2.1",
4650
"typescript": "^3.8.2"

0 commit comments

Comments
 (0)