From 1711ea0f5bb56298e2f55a82da30a34563caf815 Mon Sep 17 00:00:00 2001 From: Roy Ivy III Date: Sun, 6 Feb 2022 13:21:13 -0600 Subject: [PATCH] maint/dev ~ update EditorConfig --- .editorconfig | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/.editorconfig b/.editorconfig index d93fa7c0e..53ccc4f9a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -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: +# 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: @@ 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: +# 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