🔧 chore(markdown): add prettier config and usage

This commit is contained in:
csh 2026-01-21 10:20:19 +08:00
parent 2045dd45c0
commit 8dc8924cbe
4 changed files with 17 additions and 3 deletions

4
.prettierrc.json Normal file
View File

@ -0,0 +1,4 @@
{
"proseWrap": "preserve",
"embeddedLanguageFormatting": "off"
}

View File

@ -18,8 +18,8 @@
## 格式化工具
- 优先使用仓库已固定的工具配置
- 若存在 Prettier 配置,使用项目脚本或 `npx prettier -w <files...>`
- 优先使用 Prettier仓库已固定配置/脚本)
- 若存在项目脚本,优先使用 `npm run format:md`;否则可用 `npx prettier -w <files...>`
- 不引入新的 Markdown 格式化工具
## 关联规则

10
package.json Normal file
View File

@ -0,0 +1,10 @@
{
"name": "playbook",
"private": true,
"devDependencies": {
"prettier": "3.2.5"
},
"scripts": {
"format:md": "prettier -w \"**/*.md\""
}
}

View File

@ -18,7 +18,7 @@
### 工具
- 优先使用仓库既有的格式化工具(如 Prettier
- 优先使用 Prettier(仓库已固定配置/脚本
- 不引入新的 Markdown 格式化依赖
### 行内代码