Open dischii opened 1 day ago
The underlying issue is a known problem the pre-commit team does not want tools like this to fix. You can read more in this issue (which links back to this repo eventually): https://github.com/DavidAnson/markdownlint-cli2/issues/437
Your error message is different than the one I linked above (and present in a more recent duplicate of it), but fundamentally you want the tool to declare supported versions of Node and the pre-commit team forbid that.
So far as I know, what you suggest in option two at the bottom is the appropriate path forward. Or you might consider one of the proposals from the creator of the issue I link above.
Sorry about the trouble, I wish I understood why it has to be this way.
Looking at this again, I do not see anything in the error messages above that points to this project being the cause. (Maybe the full log file has more to go on?)
The best I can guess is the version of ava being used declares itself unable to run on Node 23 and pre-commit is unwilling to use Node 22 instead. But this is irrelevant because ava is a devDependency and therefore not needed at runtime anyway.
Installation error in pre-commit with node version >22
Summary
The installation markdownlint-cli in my pre-commit configuration does not work with the current version of node: v23.10.0.
In my Windows Environment in VSCode i can't execute the pre-commit with this package.
Error Message
Possible but failed solution
Unfortunately, I didn't found any solution how to configure pre-commit to use an earlier node version.
I tried already the use of
nvm
but pre-commit use still the latest version v23.1.0:Acceptance Criteria
pre-commit-config.yaml
file because it should be used from other participants and in my linux environment it is working sufficient)