Skip to content

Commit

Permalink
chore: move to lefthook
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Jul 8, 2024
1 parent 4a69770 commit 9688704
Show file tree
Hide file tree
Showing 5 changed files with 820 additions and 196 deletions.
Binary file removed .yarn/install-state.gz
Binary file not shown.
3 changes: 3 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
};
17 changes: 17 additions & 0 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
pre-commit:
parallel: true
commands:
lint:
glob: "*.{js,ts,tsx}"
run: yarn lint {staged_files}
types:
glob: "*.{json,js,ts,tsx}"
run: yarn tsc --noEmit
test:
glob: "*.{json,js,ts,tsx}"
run: yarn test
commit-msg:
parallel: true
commands:
commitlint:
run: yarn commitlint --edit
9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,17 @@
},
"devDependencies": {
"@babel/core": "^7.12.3",
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@release-it/conventional-changelog": "^2.0.0",
"@types/jest": "^26.0.15",
"@types/jest-diff": "^24.3.0",
"@types/mkdirp": "^1.0.1",
"conventional-changelog-cli": "^2.1.0",
"eslint": "^7.12.1",
"eslint-config-satya164": "^3.1.8",
"husky": "^4.3.0",
"jest": "^26.6.1",
"lefthook": "^1.7.0",
"prettier": "^2.1.2",
"release-it": "^14.2.0",
"typescript": "^4.0.5"
Expand All @@ -58,10 +60,5 @@
"(__fixtures__|__file_snapshots__)"
]
},
"husky": {
"hooks": {
"pre-commit": "yarn lint && yarn typecheck && yarn test"
}
},
"packageManager": "[email protected]"
}
Loading

0 comments on commit 9688704

Please sign in to comment.