Markdown ​
本页记录当前依赖版本和仓库配置最终产生的 17 条规则。每条规则均列出实际严重级别、生效范围、上游说明、常见报告以及错误/正确示例。
第三方预置规则(17 条) ​
markdown/fenced-code-language ​
检查该规则对应的代码约束。上游说明:Require languages for fenced code blocks
- 生效级别与范围:error: Markdown
- 自动修复:不支持或上游未声明
- 规则来源:官方文档
- 常见报告:
Missing code block language.;Code block language "{{lang}}" is not allowed. - 示例类型:第三方预置规则的直接代码示例
错误示例:
```
const ready = true;
```正确示例:
```js
const ready = true;
```markdown/heading-increment ​
检查该规则对应的代码约束。上游说明:Enforce heading levels increment by one
- 生效级别与范围:error: Markdown
- 自动修复:不支持或上游未声明
- 规则来源:官方文档
- 常见报告:
Heading level skipped from {{fromLevel}} to {{toLevel}}. - 示例类型:第三方预置规则的直接代码示例
错误示例:
# Guide
### Setup正确示例:
# Guide
## Setupmarkdown/no-duplicate-definitions ​
禁止出现该规则定义的不安全、无效或易误解结构。上游说明:Disallow duplicate definitions
- 生效级别与范围:error: Markdown
- 自动修复:不支持或上游未声明
- 规则来源:官方文档
- 常见报告:
Unexpected duplicate definition '{{ identifier }}' (label: '{{ label }}') found. First defined at line {{ firstLine }} (label: '{{ firstLabel }}').;Unexpected duplicate footnote definition '{{ identifier }}' (label: '{{ label }}') found. First defined at line {{ firstLine }} (label: '{{ firstLabel }}'). - 示例类型:第三方预置规则的直接代码示例
错误示例:
[docs]: https://example.com/a
[docs]: https://example.com/b正确示例:
[docs]: https://example.com/a
[api]: https://example.com/bmarkdown/no-empty-definitions ​
禁止出现该规则定义的不安全、无效或易误解结构。上游说明:Disallow empty definitions
- 生效级别与范围:error: Markdown
- 自动修复:不支持或上游未声明
- 规则来源:官方文档
- 常见报告:
Unexpected empty definition '{{ identifier }}' (label: '{{ label }}') found.;Unexpected empty footnote definition '{{ identifier }}' (label: '{{ label }}') found. - 示例类型:第三方预置规则的直接代码示例
错误示例:
[docs]: #正确示例:
[Guide][docs]
[docs]: https://example.com/docsmarkdown/no-empty-images ​
禁止出现该规则定义的不安全、无效或易误解结构。上游说明:Disallow empty images
- 生效级别与范围:error: Markdown
- 自动修复:不支持或上游未声明
- 规则来源:官方文档
- 常见报告:
Unexpected empty image found. - 示例类型:第三方预置规则的直接代码示例
错误示例:
![Fast logo]()正确示例:
markdown/no-empty-links ​
禁止出现该规则定义的不安全、无效或易误解结构。上游说明:Disallow empty links
- 生效级别与范围:error: Markdown
- 自动修复:不支持或上游未声明
- 规则来源:官方文档
- 常见报告:
Unexpected empty link found. - 示例类型:第三方预置规则的直接代码示例
错误示例:
[Fast]()正确示例:
[Fast](https://example.com)markdown/no-invalid-label-refs ​
禁止出现该规则定义的不安全、无效或易误解结构。上游说明:Disallow invalid label references
- 生效级别与范围:error: Markdown
- 自动修复:不支持或上游未声明
- 规则来源:官方文档
- 常见报告:
Label reference '{{label}}' is invalid due to white space between [ and ]. - 示例类型:第三方预置规则的直接代码示例
错误示例:
[Guide][ ]正确示例:
[Guide][guide]
[guide]: /guidemarkdown/no-missing-atx-heading-space ​
禁止出现该规则定义的不安全、无效或易误解结构。上游说明:Disallow headings without a space after the hash characters
- 生效级别与范围:error: Markdown
- 自动修复:支持;执行前仍应检查语义和差异
- 规则来源:官方文档
- 常见报告:
Missing space {{position}} hash(es) on ATX style heading. - 示例类型:第三方预置规则的直接代码示例
错误示例:
##Setup正确示例:
## Setupmarkdown/no-missing-label-refs ​
禁止出现该规则定义的不安全、无效或易误解结构。上游说明:Disallow missing label references
- 生效级别与范围:error: Markdown
- 自动修复:不支持或上游未声明
- 规则来源:官方文档
- 常见报告:
Label reference '{{label}}' not found. - 示例类型:第三方预置规则的直接代码示例
错误示例:
[Guide][missing]正确示例:
[Guide][guide]
[guide]: /guidemarkdown/no-missing-link-fragments ​
禁止出现该规则定义的不安全、无效或易误解结构。上游说明:Disallow link fragments that do not reference valid headings
- 生效级别与范围:error: Markdown
- 自动修复:不支持或上游未声明
- 规则来源:官方文档
- 常见报告:
Link fragment '#{{fragment}}' does not reference a heading or anchor in this document. - 示例类型:第三方预置规则的直接代码示例
错误示例:
[Install](#missing)正确示例:
## Install
[Install](#install)markdown/no-multiple-h1 ​
禁止出现该规则定义的不安全、无效或易误解结构。上游说明:Disallow multiple H1 headings in the same document
- 生效级别与范围:error: Markdown
- 自动修复:不支持或上游未声明
- 规则来源:官方文档
- 常见报告:
Unexpected additional H1 heading found. - 示例类型:第三方预置规则的直接代码示例
错误示例:
# Guide
# API正确示例:
# Guide
## APImarkdown/no-reference-like-urls ​
禁止出现该规则定义的不安全、无效或易误解结构。上游说明:Disallow URLs that match defined reference identifiers
- 生效级别与范围:error: Markdown
- 自动修复:支持;执行前仍应检查语义和差异
- 规则来源:官方文档
- 常见报告:
Unexpected resource {{type}} ('{{prefix}}[text](url)') with URL that matches a definition identifier. Use '[text][id]' syntax instead. - 示例类型:第三方预置规则的直接代码示例
错误示例:
[docs]: /guide
[Guide](docs)正确示例:
[docs]: /guide
[Guide][docs]markdown/no-reversed-media-syntax ​
禁止出现该规则定义的不安全、无效或易误解结构。上游说明:Disallow reversed link and image syntax
- 生效级别与范围:error: Markdown
- 自动修复:支持;执行前仍应检查语义和差异
- 规则来源:官方文档
- 常见报告:
Unexpected reversed syntax found. Use [label](URL) syntax instead. - 示例类型:第三方预置规则的直接代码示例
错误示例:
(Guide)[/guide]正确示例:
[Guide](/guide)markdown/no-space-in-emphasis ​
禁止出现该规则定义的不安全、无效或易误解结构。上游说明:Disallow spaces around emphasis markers
- 生效级别与范围:error: Markdown
- 自动修复:支持;执行前仍应检查语义和差异
- 规则来源:官方文档
- 常见报告:
Unexpected space around emphasis marker. - 示例类型:第三方预置规则的直接代码示例
错误示例:
** emphasized **正确示例:
**emphasized**markdown/no-unused-definitions ​
禁止出现该规则定义的不安全、无效或易误解结构。上游说明:Disallow unused definitions
- 生效级别与范围:error: Markdown
- 自动修复:不支持或上游未声明
- 规则来源:官方文档
- 常见报告:
Unexpected unused definition '{{ identifier }}' (label: '{{ label }}') found.;Unexpected unused footnote definition '{{ identifier }}' (label: '{{ label }}') found. - 示例类型:第三方预置规则的直接代码示例
错误示例:
Text only.
[docs]: /guide正确示例:
[Guide][docs]
[docs]: /guidemarkdown/require-alt-text ​
要求补齐该规则所需的声明、属性或结构。上游说明:Require alternative text for images
- 生效级别与范围:error: Markdown
- 自动修复:不支持或上游未声明
- 规则来源:官方文档
- 常见报告:
Alternative text for image is required. - 示例类型:第三方预置规则的直接代码示例
错误示例:
正确示例:
markdown/table-column-count ​
检查该规则对应的代码约束。上游说明:Disallow data rows in a GitHub Flavored Markdown table from having more cells than the header row
- 生效级别与范围:error: Markdown
- 自动修复:不支持或上游未声明
- 规则来源:官方文档
- 常见报告:
Table column count mismatch (Expected: {{expectedCells}}, Actual: {{actualCells}}), extra data starting here will be ignored.;Table column count mismatch (Expected: {{expectedCells}}, Actual: {{actualCells}}), row might be missing data. - 示例类型:第三方预置规则的直接代码示例
错误示例:
| Name | Value |
| --- | --- |
| A | 1 | extra |正确示例:
| Name | Value |
| --- | --- |
| A | 1 |