Skip to content

fix: update template #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 26, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,46 +1,25 @@
doublestar: true
yaml_files:
- "**/*.yaml"
- "**/*.yml"
- ".yamlfmt"
- "!**/vendor/**"
- "!**/node_modules/**"
yaml_options:
# 文档末尾是否需要一个空行
end_of_document: true
# 配置文档分隔符

document_start: false
exclude:
- "**/vendor/**"
- "**/node_modules/**"
- "repo_scaffold/templates/**"
formatter:
type: basic
# 控制换行符保留 - 设为 false 可能减少不必要的空行
retain_line_breaks: false
# 只保留单个换行符,移除多余的空行
retain_line_breaks_single: true
# 注释前的空格数
pad_line_comments: 2
# 去除行尾空白字符
trim_trailing_whitespace: true
# 行长度限制

line_length: 100
# 缩进大小

indentation: 2
# 是否保留引号

preserve_quotes: true
# 对齐方式

alignment:
# 是否启用键值对齐
enable: true
# 键和冒号之间的最小间隔

key_value: 1
# 对齐后冒号和值之间的空格数

colon_value: 1
# 数组格式化

array:
# 嵌套数组是否应该与父级对齐
indent_nested: true
# 数组项与前导符号 - 之间的空格数

item_spacing: 1
# 是否移除文档注释

strip_comments: false
# 是否保留文件开头的注释

preserve_header: true