How to use Vitest with Git pre commit hook? #1626
-
|
Dear all =) I would like to create a new project based on this , where I use Vitest instead of Jest. Based on Question What is the recommended way to use Vitest with Git pre commit hooks? Any packages or help will be much appreciated =) Hugs, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
This line runs |
Beta Was this translation helpful? Give feedback.
jestin.eslintrcis for eslint rules. This is because jest uses global imports that eslint does not like.If you don't have globals enabled with Vitest you do not need eslint rules.
This line runs
testscript as a pre-commit hook:https://github.com/stemmlerjs/simple-typescript-starter/blob/3b1fb5311aa6bc9dc8dbbc7749c9d3022a43d897/package.json#L24
You only need to change
testscript to usevitestand husky will run it.