commitlint-pre-commit-hook
commitlint-pre-commit-hook copied to clipboard
Commit hook fails on a project with tsconfig.json
While related to conventional-changelog/commitlint#3256 bug, I think this could be solved in the hooks as pre-commit already provides a (mostly) isolated node environment.
Instead of running the CLI directly, the hook should remember the current path, chdir to the isolated env (NODE_VIRTUAL_ENV) and then run bin/commitlint --cwd $ORIGINAL_PATH $COMMIT_FILE.
Hey, thanks for reporting. I'll take a look into this once I get a chance.
Are you still experiencing this issue? I tried reproducing locally adding a tsconfig.json file to a dummy project and could not reproduce. If you could provide a minimal repro that would be much useful.