Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commit hook fails on a project with tsconfig.json #124

Open
lqc opened this issue Oct 2, 2023 · 2 comments
Open

Commit hook fails on a project with tsconfig.json #124

lqc opened this issue Oct 2, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@lqc
Copy link

lqc commented Oct 2, 2023

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.

@alessandrojcm alessandrojcm self-assigned this Oct 2, 2023
@alessandrojcm alessandrojcm added the bug Something isn't working label Oct 2, 2023
@alessandrojcm
Copy link
Owner

Hey, thanks for reporting. I'll take a look into this once I get a chance.

@alessandrojcm
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants