From 5ffccec72c3cb6ddb1dab331ef757090bf50fbd1 Mon Sep 17 00:00:00 2001 From: Andrii Chebukin Date: Sun, 24 Sep 2023 18:05:32 +0400 Subject: [PATCH] Make .editorconfig more safe --- .editorconfig | 84 +++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 74 insertions(+), 10 deletions(-) diff --git a/.editorconfig b/.editorconfig index eb69575af3c..a7906cf2e3c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,13 +1,77 @@ -# EditorConfig is awesome: -http://EditorConfig.org - -# top-most EditorConfig file root = true +############################### +# Core EditorConfig Options # +############################### +# All files +[*] # Do not apply to all files not to break something +guidelines = 80 dashed, 100 +# Either crlf | lf, default is system-dependent (when not specified at all) +# end_of_line=crlf +# Remove whitespace at the end of any line + +# Code files +[*.{cs,csx,fs,fsi,fsx}] +trim_trailing_whitespace = true +insert_final_newline = true +indent_style = space # default=space +indent_size = 4 # default=4 +charset = utf-8 + +# Project files and app specific XML files +[*.{csproj,fsproj,shproj,projitems,props,xaml}] +trim_trailing_whitespace = true +insert_final_newline = true +indent_style = space +indent_size = 2 + +# XML configuration files +[{app.config,nuget.config,packages.config,web.config}] +trim_trailing_whitespace = true +insert_final_newline = true +indent_style = space +indent_size = 2 + +# XML files +[*.xml] +trim_trailing_whitespace = false # do not trim as it affects CData +insert_final_newline = true +indent_style = space +indent_size = 2 + +# JSON and YAML files +[*.{json,yml,yaml}] +trim_trailing_whitespace = true +insert_final_newline = true +indent_style = space +indent_size = 2 + +# Proto files +[*.proto] +trim_trailing_whitespace = true +insert_final_newline = true +indent_style = space +indent_size = 4 + +############################### +# F# Coding Conventions # +############################### +# filetypes that need to be formatted by Fantomas: +[*.{fs,fsx}] + +# files to be ignored for Fantomas may go into this file, if present: +# .fantomasignore + +# indentation size, default=space +# indent_style = space + +# indentation size, default=4 +# indent_size = 4 + +# line length before it gets broken down into multiple lines +# default 120 +# max_line_length=120 + +# Either crlf | lf, default is system-dependent (when not specified at all) +# end_of_line=crlf -[*] -insert_final_newline = true -indent_style = space -indent_size = 4 -[*.fsproj] -indent_size = 2