1
0
mirror of https://github.com/uutils/coreutils synced 2024-07-09 04:06:02 +00:00
coreutils/.editorconfig

63 lines
2.0 KiB
INI
Raw Normal View History

2022-02-06 19:21:13 +00:00
# EditorConfig (is awesome!; ref: http://EditorConfig.org; v2022.02.11 [rivy])
# * top-most EditorConfig file
root = true
[*]
2021-05-27 22:47:26 +00:00
# default ~ utf-8, unix-style newlines with a newline ending every file, 4 space indentation
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
2021-05-27 22:47:26 +00:00
max_line_length = 100
trim_trailing_whitespace = true
2022-02-06 19:21:13 +00:00
[{[Mm]akefile{,.*},*.{mak,mk,[Mm][Aa][Kk],[Mm][Kk]},[Gg][Nn][Uu]makefile}]
2021-05-27 22:47:26 +00:00
# makefiles ~ TAB-style indentation
indent_style = tab
2022-02-06 19:21:13 +00:00
[*.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]}]
2021-05-27 22:47:26 +00:00
# BAT/CMD ~ DOS/Win requires BAT/CMD files to have CRLF EOLNs
end_of_line = crlf
2022-02-06 19:21:13 +00:00
[*.{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
2021-05-27 22:47:26 +00:00
[*.go]
# go ~ TAB-style indentation (SPACE-style alignment); ref: <https://blog.golang.org/gofmt>@@<https://archive.is/wip/9B6FC>
indent_style = tab
2021-05-27 22:47:26 +00:00
[*.{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
2021-05-27 22:47:26 +00:00
indent_style = space
2022-02-06 19:21:13 +00:00
[*.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
2021-05-27 22:47:26 +00:00
[*.{yaml,yml,[Yy][Mm][Ll],[Yy][Aa][Mm][Ll]}]
# YAML
indent_size = 2
indent_style = space