You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 42d7b50
Browse filesBrowse the repository at this point in the historyBrowse files
fix(rules): multiple rule fixes and no-empty-heading allowList
- heading-title-case: skip scientific notation (e.g. 1e6), hyphen compound segment handling
- no-empty-heading: add allowList and stripNumberingForAllowList for allowed empty titles
- no-heading-like-lines: strip trailing colons from fix/insert text
- one-sentence-per-line: fix space and next-word position handling
- config: enable MD046 fenced; document one-off suppression; README title case
- tests: expand unit and fix tests for above rules
# To override: Uncomment the block and set minimumContentLines, count* options, and/or excludePathPatterns. H2+ must have content before any subheading. Per-section suppress: "<!-- no-empty-heading allow -->".
279
+
# To override: Uncomment the block and set minimumContentLines, count* options,
280
+
# allowList, and/or excludePathPatterns. H2+ must have content before any subheading.
281
+
# One-off: put "<!-- no-empty-heading allow -->" on the previous line or at end of heading line.
258
282
# Options (all optional):
259
283
# minimumContentLines: number (default 1); minimum lines that count as content under each H2+
allowList: # optional; headings with these titles may be empty
291
+
- "Overview"
292
+
- "Summary"
293
+
stripNumberingForAllowList: true # optional; default true; strip numbering before allowList match
290
294
excludePathPatterns:
291
295
- "**/*_index.md" # optional; skip rule for these paths
292
296
```
@@ -299,13 +303,18 @@ no-empty-heading:
299
303
- **`countHtmlLinesAsContent`** (boolean, default `false`): If `true`, lines that are only an HTML tag (e.g. `<br>`, `<div>...</div>`) count toward the minimum.
300
304
- **`countCodeBlockLinesAsContent`** (boolean, default `true`): If `false`, lines inside fenced code blocks (` ``` `or `~~~`) do not count toward the minimum.
301
305
When `true`, they do (default).
306
+
- **`allowList`** (array of strings, optional): Exact heading titles (after optional numbering strip) that are allowed to have no direct content.
307
+
Match is case-insensitive and trimmed.
308
+
Same idea as `heading-min-words` allowList.
309
+
- **`stripNumberingForAllowList`** (boolean, default `true`): When `true`, leading numbering (e.g. `1.2.3`) is stripped from the heading text before comparing to `allowList`.
302
310
- **`excludePathPatterns`** (list of strings, default none): Glob patterns for file paths where this rule is skipped.
303
311
304
312
Behavior:
305
313
306
314
- For each H2-H6 heading, only _direct_ content counts: lines that appear **before** the next heading (any level).
307
315
Content under subheadings does **not** count for the parent heading.
308
316
Which line types count is controlled by the options above (by default: prose and code block lines; blank, HTML-comment, and HTML-tag lines do not).
317
+
- **Allow by title:** If `allowList` is set, any H2+ heading whose title (after optional numbering strip) matches an entry (case-insensitive) is allowed to be empty.
309
318
- **Suppress per section:** A section is allowed without meeting the minimum if it contains a line that is solely the comment `<!-- no-empty-heading allow -->` (optional whitespace around or inside the comment).
0 commit comments