# EditorConfig —— 统一换行/缩进/编码,减少无谓的格式 diff # 说明:只覆盖**不会改变运行行为**的项;不改缩进宽度以外的东西。 # 注意:本项目有少量「精确换行/缩进」的源码断言(见 tests/source-text-ratchet-test.js), # 改格式可能打红测试 ⇒ 批量格式化前请先跑门禁确认。 root = true [*] charset = utf-8 end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true indent_style = space indent_size = 2 [*.md] # Markdown 行尾两个空格是「换行」语义(部分渲染器需要)⇒ 不裁剪 trim_trailing_whitespace = false [*.{json,yml,yaml,toml}] indent_size = 2