Created
November 9, 2022 05:22
-
-
Save NikhilVerma/ecba75d4af2e6dae6f565e1ef40256ea to your computer and use it in GitHub Desktop.
Using pre-push hooks for validation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
"**/*.{ts?(x),vue}": () => "tsc", | |
"**/*.{ts?(x),vue,js?(x)}": "yarn lint", | |
"**/*.{vue,ts?(x),js?(x)}": () => "env CI=true yarn test:unit", | |
"{package.json,yarn.lock}": () => "yarn check --integrity" | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
. "$(dirname "$0")/_/husky.sh" | |
# This runs lint-staged on all files which have been changed from the main branch | |
./node_modules/.bin/lint-staged --diff="origin/main...HEAD" -v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment