chore: add .editorconfig for consistent coding styles

This commit is contained in:
曾文锋0668000834 2026-04-07 14:17:01 +08:00
parent f9c70ba52a
commit a12354a6ab

35
.editorconfig Normal file
View file

@ -0,0 +1,35 @@
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
# Default settings for all files
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
# Go files
[*.go]
indent_style = tab
indent_size = 4
# JSON, YAML, and Markdown files
[*.{json,yml,yaml,md}]
indent_style = space
indent_size = 2
# JavaScript/TypeScript files
[*.{js,ts,tsx}]
indent_style = space
indent_size = 2
# Shell scripts
[*.sh]
indent_style = space
indent_size = 2
# Makefile
[Makefile]
indent_style = tab