Skip to content
This repository has been archived by the owner on Sep 6, 2024. It is now read-only.

Commit

Permalink
Merge pull request hercules-ci#182 from cachix/markdownlint-config
Browse files Browse the repository at this point in the history
Add settings.markdownlint.config
  • Loading branch information
domenkozar committed Nov 5, 2022
2 parents b845485 + 4089e23 commit cc21c79
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion modules/hooks.nix
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,15 @@ in
example = [ "flake.nix" "_*" ];
};
};
markdownlint = {
config =
mkOption {
type = types.attrs;
description = lib.mdDoc
"See https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.jsonc";
default = { };
};
};
nix-linter =
{
checks =
Expand Down Expand Up @@ -530,7 +539,7 @@ in
{
name = "markdownlint";
description = "Style checker and linter for markdown files.";
entry = "${tools.markdownlint-cli}/bin/markdownlint";
entry = "${tools.markdownlint-cli}/bin/markdownlint -c ${pkgs.writeText "markdownlint.json" (builtins.toJSON settings.markdownlint.config)}";
files = "\\.md$";
};

Expand Down

0 comments on commit cc21c79

Please sign in to comment.