mirror of
https://github.com/uutils/coreutils
synced 2024-12-04 02:19:54 +00:00
maint/dev ~ update EditorConfig
This commit is contained in:
parent
fb4b523353
commit
1711ea0f5b
1 changed files with 28 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
|||
# EditorConfig (is awesome): http://EditorConfig.org
|
||||
# EditorConfig (is awesome!; ref: http://EditorConfig.org; v2022.02.11 [rivy])
|
||||
|
||||
# * top-most EditorConfig file
|
||||
root = true
|
||||
|
@ -13,27 +13,49 @@ insert_final_newline = true
|
|||
max_line_length = 100
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[[Mm]akefile{,.*}, *.{mk,[Mm][Kk]}]
|
||||
[{[Mm]akefile{,.*},*.{mak,mk,[Mm][Aa][Kk],[Mm][Kk]},[Gg][Nn][Uu]makefile}]
|
||||
# makefiles ~ TAB-style indentation
|
||||
indent_style = tab
|
||||
|
||||
[*.bash]
|
||||
# `bash` shell scripts
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
# * ref: <https://github.com/foxundermoon/vs-shell-format/blob/bc56a8e367b04bbf7d9947b767dc82516a6155b7/src/shFormat.ts>
|
||||
# shell_variant = bash ## allow `shellcheck` to decide via script hash-bang/sha-bang line
|
||||
switch_case_indent = true
|
||||
|
||||
[*.{bat,cmd,[Bb][Aa][Tt],[Cc][Mm][Dd]}]
|
||||
# BAT/CMD ~ DOS/Win requires BAT/CMD files to have CRLF EOLNs
|
||||
end_of_line = crlf
|
||||
|
||||
[*.{cjs,cjx,cts,ctx,js,jsx,mjs,mts,mtx,ts,tsx,json,jsonc}]
|
||||
# js/ts/json ~ Prettier/XO-style == TAB indention + SPACE alignment
|
||||
indent_size = 2
|
||||
indent_style = tab
|
||||
|
||||
[*.go]
|
||||
# go ~ TAB-style indentation (SPACE-style alignment); ref: <https://blog.golang.org/gofmt>@@<https://archive.is/wip/9B6FC>
|
||||
indent_style = tab
|
||||
|
||||
[*.{cjs,js,json,mjs,ts}]
|
||||
# js/ts
|
||||
indent_size = 2
|
||||
|
||||
[*.{markdown,md,mkd,[Mm][Dd],[Mm][Kk][Dd],[Mm][Dd][Oo][Ww][Nn],[Mm][Kk][Dd][Oo][Ww][Nn],[Mm][Aa][Rr][Kk][Dd][Oo][Ww][Nn]}]
|
||||
# markdown
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
|
||||
[*.sh]
|
||||
# POSIX shell scripts
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
# * ref: <https://github.com/foxundermoon/vs-shell-format/blob/bc56a8e367b04bbf7d9947b767dc82516a6155b7/src/shFormat.ts>
|
||||
# shell_variant = posix ## allow `shellcheck` to decide via script hash-bang/sha-bang line
|
||||
switch_case_indent = true
|
||||
|
||||
[*.{sln,vc{,x}proj{,.*},[Ss][Ln][Nn],[Vv][Cc]{,[Xx]}[Pp][Rr][Oo][Jj]{,.*}}]
|
||||
# MSVC sln/vcproj/vcxproj files, when used, will persistantly revert to CRLF EOLNs and eat final EOLs
|
||||
end_of_line = crlf
|
||||
insert_final_newline = false
|
||||
|
||||
[*.{yaml,yml,[Yy][Mm][Ll],[Yy][Aa][Mm][Ll]}]
|
||||
# YAML
|
||||
indent_size = 2
|
||||
|
|
Loading…
Reference in a new issue