-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmarkdown.mdc
More file actions
42 lines (29 loc) · 1.6 KB
/
markdown.mdc
File metadata and controls
42 lines (29 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
description: Markdown and markdownlint (MD060) conventions for this repo.
globs:
- "**/*.md"
alwaysApply: false
---
# Markdown
Repo **`.markdownlint.yaml`** disables **MD013** (line length); do not re-wrap markdown to an arbitrary column limit unless the user asks.
## Root `README.md` — terraform-docs (do not edit)
The block between **`<!-- BEGIN_TF_DOCS -->`** and **`<!-- END_TF_DOCS -->`** is **generated by terraform-docs**. **Never** edit, reformat, or fix lint inside those markers.
- To change inputs/outputs/docs in that section: edit `variables.tf`, `outputs.tf`, or other Terraform in the root module, then regenerate (e.g. `terraform-docs markdown table --output-file README.md --output-mode inject .` from the repo root, per your local workflow).
- **Do not remove** the `<!-- markdownlint-disable MD060 -->` / `<!-- markdownlint-enable MD060 -->` pair that wraps that block (they sit **outside** the BEGIN/END markers). They suppress MD060 for terraform-docs’ default table separators.
## MD060 — table column style (`compact`)
For **hand-written** markdown (outside the generated README block), markdownlint **MD060** uses **compact** style:
1. **Every cell** has one space after the opening `|` and one space before the closing `|`.
2. **Separator rows** use `| --- | --- |`, not `|---------|---------|`.
**Correct:**
```markdown
| Column A | Column B |
| --- | --- |
| foo | bar |
```
**Wrong (triggers MD060):**
```markdown
| Column A | Column B |
|----------|----------|
| foo | bar |
```
Apply this pattern to **all** manually authored tables in `*.md` (example READMEs, module docs, etc.).