Skip to content

Commit

Permalink
chore: config lint-staged and commitlint
Browse files Browse the repository at this point in the history
  • Loading branch information
Aarebecca committed Sep 19, 2024
1 parent 8589e4d commit 03941eb
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx --no-install commitlint --edit ""
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged
23 changes: 12 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,18 @@
"build": "run-p build:*",
"ci": "run-s lint test build",
"prepublishOnly": "npm run ci",
"benchmarks": "node benchmarks/path-2-string.test && node benchmarks/path-2-absolute.test"
"benchmarks": "node benchmarks/path-2-string.test && node benchmarks/path-2-absolute.test",
"postinstall": "husky install",
"prepare": "husky install"
},
"keywords": [
"util",
"antv"
],
"devDependencies": {
"@antv/path-util": "^2.0.15",
"@commitlint/cli": "^11.0.0",
"@commitlint/cli": "^18.6.1",
"@commitlint/config-conventional": "^18.6.3",
"@rollup/plugin-commonjs": "^22.0.0",
"@rollup/plugin-node-resolve": "^13.3.0",
"@rollup/plugin-typescript": "^8.3.2",
Expand All @@ -44,11 +47,11 @@
"benchmark": "^2.1.4",
"eslint": "^7.22.0",
"eslint-plugin-import": "^2.22.1",
"husky": "^5.0.9",
"husky": "^5.2.0",
"jest": "^26.6.3",
"jest-electron": "^0.1.12",
"limit-size": "^0.1.4",
"lint-staged": "^10.5.4",
"lint-staged": "^15.2.10",
"npm-run-all": "^4.1.5",
"prettier": "^2.2.1",
"rimraf": "^3.0.2",
Expand All @@ -70,8 +73,7 @@
"lint-staged": {
"*.{ts,tsx}": [
"eslint --fix",
"prettier --write",
"git add"
"prettier --write"
]
},
"limit-size": [
Expand All @@ -85,11 +87,10 @@
"limit": "40 Kb"
}
],
"husky": {
"hooks": {
"pre-commit": "npm run lint-staged",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"dependencies": {
"fast-deep-equal": "^3.1.3",
Expand Down

0 comments on commit 03941eb

Please sign in to comment.