瀏覽代碼

Update .editorconfig

From https://github.com/danielchalmers/JournalApp/blob/main/.editorconfig
Daniel Chalmers 1 年之前
父節點
當前提交
5e00cbc4c2
共有 1 個文件被更改,包括 18 次插入17 次删除
  1. 18 17
      .editorconfig

+ 18 - 17
.editorconfig

@@ -1,19 +1,20 @@
 # Remove the line below if you want to inherit .editorconfig settings from higher directories
 root = true
 
-# C# files
-[*.cs]
+[*]
+indent_style = space
 
-#### Core EditorConfig Options ####
+[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj,props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct,json}]
+indent_size = 2
+insert_final_newline = true
+trim_trailing_whitespace = true
 
-# Indentation and spacing
+# Code files
+[*.{cs,csx,vb,vbx}]
 indent_size = 4
-indent_style = space
-tab_width = 4
-
-# New line preferences
 end_of_line = crlf
-insert_final_newline = false
+insert_final_newline = true
+trim_trailing_whitespace = true
 
 #### .NET Coding Conventions ####
 
@@ -50,13 +51,13 @@ dotnet_style_null_propagation = true
 dotnet_style_object_initializer = true:silent
 dotnet_style_operator_placement_when_wrapping = beginning_of_line
 dotnet_style_prefer_auto_properties = true:suggestion
-dotnet_style_prefer_collection_expression = true
+dotnet_style_prefer_collection_expression = when_types_loosely_match
 dotnet_style_prefer_compound_assignment = true
 dotnet_style_prefer_conditional_expression_over_assignment = true
 dotnet_style_prefer_conditional_expression_over_return = true
 dotnet_style_prefer_foreach_explicit_cast_in_source = when_strongly_typed
-dotnet_style_prefer_inferred_anonymous_type_member_names = true:silent
-dotnet_style_prefer_inferred_tuple_names = true:silent
+dotnet_style_prefer_inferred_anonymous_type_member_names = false
+dotnet_style_prefer_inferred_tuple_names = false
 dotnet_style_prefer_is_null_check_over_reference_equality_method = true
 dotnet_style_prefer_simplified_boolean_expressions = true
 dotnet_style_prefer_simplified_interpolation = true
@@ -71,8 +72,8 @@ dotnet_code_quality_unused_parameters = non_public:warning
 dotnet_remove_unnecessary_suppression_exclusions = none
 
 # New line preferences
-dotnet_style_allow_multiple_blank_lines_experimental = false
-dotnet_style_allow_statement_immediately_after_block_experimental = false
+dotnet_style_allow_multiple_blank_lines_experimental = false:suggestion
+dotnet_style_allow_statement_immediately_after_block_experimental = false:suggestion
 
 #### C# Coding Conventions ####
 
@@ -111,9 +112,9 @@ csharp_style_prefer_readonly_struct_member = true
 # Code-block preferences
 csharp_prefer_braces = when_multiline:warning
 csharp_prefer_simple_using_statement = true:silent
-csharp_style_namespace_declarations = file_scoped
+csharp_style_namespace_declarations = file_scoped:error
 csharp_style_prefer_method_group_conversion = true
-csharp_style_prefer_primary_constructors = true
+csharp_style_prefer_primary_constructors = false
 csharp_style_prefer_top_level_statements = true
 
 # Expression-level preferences
@@ -138,7 +139,7 @@ csharp_using_directive_placement = outside_namespace:error
 csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true
 csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true
 csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true
-csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false
+csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false:suggestion
 csharp_style_allow_embedded_statements_on_same_line_experimental = false:warning
 
 #### C# Formatting Rules ####