git-hooks.nix
git-hooks.nix copied to clipboard
Use custom configuration JSON file for markdownlint
Hello,
I have a .markdownlint.json file that relax some rules for markdown linting. It is automatically picked by default by markdownlint-cli in a normal setting but here it doesn't seem to be the case. Is there a way to use that config that in the framework of pre-commit-hooks? Otherwise, what would be a reasonable approach? To use pkgs.lib.mkForce to overwrite entry and explicitly pass an explicit --config flag?
Ideally, there would be a config setting exposed for the formatter.
It actually correctly automatically picks the configuration file named .markdownlint.json at the base of the repo. The issue was unrelated to pre-commit-hooks.nix. Although, it's still an issue if someone wants to use their own file that doesn't follow the default naming of markdown lint, or choose different settings for the CI. I let you choose if this issue is worth keeping open, but on my side, my concrete problem is solved.