Skip to content

Commit f485258

Browse files
committed
chore: add husky and commit message linting
1 parent 79cafa6 commit f485258

File tree

6 files changed

+426
-10
lines changed

6 files changed

+426
-10
lines changed

.commitlintrc.json

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

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
node_modules
2+
yarn-error.log

.huskyrc

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

.lintstagedrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"*.{js,vue}": "eslint --fix"
3+
}

package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "dist/index.js",
66
"repository": {
77
"type": "git",
8-
"url":"https://github.com/chakra-ui/chakra-loader.git",
8+
"url": "https://github.com/chakra-ui/chakra-loader.git"
99
},
1010
"author": "Jonathan Bakebwa <[email protected]>",
1111
"license": "MIT",
@@ -22,7 +22,9 @@
2222
"@commitlint/cli": "^9.1.1",
2323
"@commitlint/config-conventional": "^9.1.1",
2424
"cross-env": "^7.0.2",
25-
"eslint": "^7.5.0"
25+
"eslint": "^7.5.0",
26+
"husky": "^4.2.5",
27+
"lint-staged": "^10.2.11"
2628
},
2729
"keywords": [
2830
"chakra-ui",

0 commit comments

Comments
 (0)