The package is not working with husky v5
See original GitHub issueI’m trying to use commit-msg-linter
and Husky v5
, if I have husky installed the commit-msg-linter
doesn’t work, but if I uninstall husky, everything works.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:10 (5 by maintainers)
Top Results From Across the Web
The package is not working with husky v5 · Issue #8 - GitHub
I'm trying to use your last solution @legend80s, but I'm receiving the error below: ℹ No staged files match any configured task. (node:98010) ......
Read more >Husky v5 doesn't create Git hooks - Stack Overflow
git/hooks/pre-commit file has been created in my git configuration files. So, when I commit, the hook is not ran and the commit passes...
Read more >husky - npm
Start using husky in your project by running `npm i husky`. ... run npx --no-install husky install . or upgrade to husky v5....
Read more >How to add git hooks using husky v5 ( Bonus - Aamir Saleem
Before push, run the test locally or create the build to check build compiles or not. Husky. Husky is an npm package that...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As for husky@5, it will ignore the
.git/hooks/commit-msg
so we need add.husky/commit-msg
manuallyThen
commit-msg-linter
will work.@legend80s
I’m trying to use your last solution, but I’m receiving the error below:
ℹ No staged files match any configured task. (node:98010) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The “path” argument must be of type string or an instance of Buffer or URL. Received undefined at readFile (fs.js:326:10) at internal/util.js:297:30 at new Promise (<anonymous>) at readFile (internal/util.js:296:12) at main (/Users/viniciuscarvalho/Projects/hub-api/.git/hooks/commit-msg:47:5) at Object.<anonymous> (/Users/viniciuscarvalho/Projects/hub-api/.git/hooks/commit-msg:56:1) at Module._compile (internal/modules/cjs/loader.js:1063:30) at Object.Module._extensions…js (internal/modules/cjs/loader.js:1092:10) at Module.load (internal/modules/cjs/loader.js:928:32) at Function.Module._load (internal/modules/cjs/loader.js:769:14) (Use
node --trace-warnings ...
to show where the warning was created) (node:98010) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) (node:98010) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. [feat/signup 656afe6] asdfsdaf 1 file changed, 6 insertions(+), 6 deletions(-)