Open mschoettle opened 4 hours ago
While I completely agree this change is appropriate, when I made it four years ago I was told very clearly by the pre-commit team that they did NOT want tools doing so and I had to revert the change. I don't agree that performance is more important than correctness, but it's their tool and people who choose to use it should play by their rules.
If that team's stance has changed in the last four years, I would love to hear that. If you can please point to documentation or reach out to one of them to confirm this is now acceptable practice, I am happy accept your PR to fix this.
Here is the relevant conversation: https://github.com/igorshubovych/markdownlint-cli/issues/157
We run
pre-commit
in our CI pipeline and it suddenly started failing yesterday with the following error when initializing the markdownlint-cli2 hook:I was able to reproduce this locally as well after running
pre-commit clean
to get rid of the cache. In the log I noticed that node 23.0.0 is used. I am not entirely sure what causes this (I see that it is looking forarsers/jsonc-parse.js
instead ofparsers/jsonc-parse.js
.pre-commit hooks can specify a
language_version
so I propose to use this. nodeenv actually has the ability to use the LTS version so that would make it consistent with theDockerfile
:https://github.com/DavidAnson/markdownlint-cli2/blob/da711fa8b30421506086eb2dc7ea0a6c3cb27b9f/docker/Dockerfile#L15