git-hooks.nix icon indicating copy to clipboard operation
git-hooks.nix copied to clipboard

Use custom configuration JSON file for markdownlint

Open yannham opened this issue 3 years ago • 2 comments

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?

yannham avatar Aug 04 '22 13:08 yannham

Ideally, there would be a config setting exposed for the formatter.

domenkozar avatar Aug 04 '22 15:08 domenkozar

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.

yannham avatar Aug 04 '22 15:08 yannham