docs: 统一规范文档示例格式,使用三级标题 Example 和四级标题 Good/Bad 展示代码示例

This commit is contained in:
Lyda
2026-04-13 13:00:57 +08:00
parent dae54e90b6
commit f34b31f542
8 changed files with 141 additions and 71 deletions
+1 -1
View File
@@ -121,6 +121,6 @@
- 一级标题:规范名称 + 规则前缀(如 ``[JsTs.Base]``
- 二级标题:单条规则描述 + 完整规则 ID(如 ``[JsTs.Base.ConstUpperCase]``
- 元信息:`includes` / `override` / `severity`(如适用)
- 示例:必须包含 `Good` `Bad`
- 示例:使用 `### Example:` 分组,`#### Good:` 展示推荐做法,`#### Bad:` 展示不推荐做法
这样可以保证规则文档在人工阅读和自动化解析两种场景下都保持一致性。