Skip to content

Commit ac5ea42

Browse files
committed
switch to rumdl for markdown lint and format
1 parent a13a9e9 commit ac5ea42

File tree

2 files changed

+28
-25
lines changed

2 files changed

+28
-25
lines changed

dev/treefmt.nix

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,13 @@ in
1818
nixfmt.enable = true;
1919
ruff-check.enable = true;
2020
ruff-format.enable = true;
21+
rumdl-check.enable = true;
2122
shellcheck.enable = true;
2223
shfmt.enable = true;
2324
statix.enable = true;
2425
terraform.enable = true;
2526
};
2627

27-
programs.mdformat = {
28-
enable = true;
29-
excludes = [ "docs/*.md" ];
30-
settings = {
31-
number = true;
32-
wrap = "no";
33-
};
34-
};
35-
3628
programs.yamlfmt = {
3729
enable = true;
3830
settings.formatter.retain_line_breaks_single = true;
@@ -51,22 +43,6 @@ in
5143

5244
dnscontrol.includes = [ "*dnsconfig.js" ];
5345

54-
mdformat-mkdocs = {
55-
command = pkgs.mdformat.withPlugins (p: [
56-
p.mdformat-frontmatter
57-
p.mdformat-mkdocs
58-
p.mdformat-simple-breaks
59-
]);
60-
options = [
61-
"--number"
62-
"--wrap"
63-
"no"
64-
];
65-
includes = [
66-
"docs/*.md"
67-
];
68-
};
69-
7046
shellcheck.priority = 1;
7147
shfmt.priority = 2;
7248

pyproject.toml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,30 @@ ignore = [
3232
"S101",
3333
"SIM117",
3434
]
35+
36+
[tool.rumdl]
37+
disable = ["MD014", "MD041"]
38+
flavor = "gfm"
39+
40+
[tool.rumdl.MD013]
41+
line-length = 0
42+
reflow = true
43+
reflow-mode = "sentence-per-line"
44+
45+
[tool.rumdl.MD029]
46+
style = "ordered"
47+
48+
[tool.rumdl.MD057]
49+
absolute-links = "relative_to_docs"
50+
compact-paths = true
51+
52+
[tool.rumdl.MD074]
53+
absolute-links = "warn"
54+
not-found = "warn"
55+
omitted-files = "warn"
56+
57+
[tool.rumdl.per-file-flavor]
58+
"docs/**/*.md" = "mkdocs"
59+
60+
[tool.rumdl.per-file-ignores]
61+
"docs/**/*.md" = ["MD033", "MD059"]

0 commit comments

Comments
 (0)