@@ -3,6 +3,7 @@ root = true
3
3
4
4
[* ]
5
5
charset = utf-8
6
+ insert_final_newline = true
6
7
7
8
# C# files
8
9
[* .cs ]
@@ -15,8 +16,8 @@ indent_style = space
15
16
tab_width = 4
16
17
17
18
# New line preferences
18
- end_of_line = crlf
19
- insert_final_newline = true
19
+ trim_trailing_whitespace = true
20
+
20
21
21
22
# ### .NET Coding Conventions ####
22
23
@@ -37,7 +38,7 @@ dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
37
38
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
38
39
39
40
# Modifier preferences
40
- dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
41
+ dotnet_style_require_accessibility_modifiers = for_non_interface_members:warning
41
42
42
43
# Expression-level preferences
43
44
csharp_style_deconstructed_variable_declaration = true :suggestion
@@ -65,9 +66,9 @@ dotnet_code_quality_unused_parameters = all:suggestion
65
66
# ### C# Coding Conventions ####
66
67
67
68
# var preferences
68
- csharp_style_var_elsewhere = false :silent
69
- csharp_style_var_for_built_in_types = false :silent
70
- csharp_style_var_when_type_is_apparent = false :silent
69
+ csharp_style_var_elsewhere = true :silent
70
+ csharp_style_var_for_built_in_types = true :silent
71
+ csharp_style_var_when_type_is_apparent = true :silent
71
72
72
73
# Expression-bodied members
73
74
csharp_style_expression_bodied_accessors = true :silent
@@ -87,7 +88,7 @@ csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
87
88
csharp_style_conditional_delegate_call = true :suggestion
88
89
89
90
# Modifier preferences
90
- csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async
91
+ csharp_preferred_modifier_order = public, private, protected, internal, static, extern, new, virtual, abstract, sealed, override, readonly, unsafe, volatile, async
91
92
92
93
# Code-block preferences
93
94
csharp_prefer_braces = true :silent
@@ -100,6 +101,12 @@ csharp_style_prefer_range_operator = true:suggestion
100
101
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
101
102
csharp_style_unused_value_expression_statement_preference = discard_variable:silent
102
103
104
+ # C# 10
105
+ csharp_style_namespace_declarations = file_scoped:error
106
+ csharp_style_prefer_primary_constructors = true
107
+ dotnet_diagnostic.IDE0290.severity = error
108
+
109
+
103
110
# ### C# Formatting Rules ####
104
111
105
112
# New line preferences
@@ -146,3 +153,9 @@ csharp_space_between_square_brackets = false
146
153
# Wrapping preferences
147
154
csharp_preserve_single_line_blocks = true
148
155
csharp_preserve_single_line_statements = true
156
+
157
+
158
+ [* .csproj ]
159
+ indent_size = 2
160
+ indent_style = space
161
+ tab_width = 2
0 commit comments