@@ -33,7 +33,8 @@ indent_size = 4
3333[* .cs ]
3434# misc
3535dotnet_sort_system_directives_first = true
36- max_line_length = 180
36+ # Note: CSharpier enforces a print width of 100 by default, so this is mainly for editor guidance
37+ max_line_length = 100
3738
3839# indentation and white space
3940indent_size = 4
@@ -46,6 +47,14 @@ csharp_indent_braces = fals
4647csharp_indent_case_contents = true
4748csharp_indent_labels = one_less_than_current
4849csharp_indent_switch_labels = true
50+
51+ # namespace declarations (C# 10+)
52+ csharp_style_namespace_declarations = file_scoped : warning
53+
54+ # using directives
55+ csharp_using_directive_placement = outside_namespace : warning
56+
57+ # spacing
4958csharp_space_after_cast = false
5059csharp_space_after_colon_in_inheritance_clause = true
5160csharp_space_after_comma = true
@@ -83,13 +92,28 @@ csharp_style_expression_bodied_operators = fals
8392csharp_style_expression_bodied_properties = true : none
8493csharp_style_expression_bodied_indexers = true : none
8594csharp_style_expression_bodied_accessors = true : none
95+ csharp_style_expression_bodied_local_functions = false : none
96+ csharp_style_expression_bodied_lambdas = true : suggestion
8697
8798# Suggest more modern language features when available
8899csharp_style_pattern_matching_over_is_with_cast_check = true : suggestion
89100csharp_style_pattern_matching_over_as_with_null_check = true : suggestion
90101csharp_style_inlined_variable_declaration = true : suggestion
91102csharp_style_throw_expression = true : suggestion
92103csharp_style_conditional_delegate_call = true : suggestion
104+ csharp_style_prefer_switch_expression = true : suggestion
105+ csharp_style_prefer_not_pattern = true : suggestion
106+ csharp_style_prefer_pattern_matching = true : suggestion
107+ csharp_style_prefer_null_check_over_type_check = true : suggestion
108+
109+ # target-typed new (C# 9+)
110+ csharp_style_implicit_object_creation_when_type_is_apparent = true : suggestion
111+
112+ # primary constructors (C# 12+) - not used in this codebase
113+ csharp_style_prefer_primary_constructors = false : none
114+
115+ # collection expressions (C# 12+) - not used in this codebase
116+ dotnet_style_prefer_collection_expression = false : none
93117
94118# newline & brace settings
95119csharp_new_line_before_open_brace = all
@@ -118,6 +142,15 @@ dotnet_style_null_propagation = true
118142dotnet_style_object_initializer = true : suggestion
119143dotnet_style_predefined_type_for_locals_parameters_members = true : suggestion
120144dotnet_style_predefined_type_for_member_access = true : suggestion
145+ dotnet_style_prefer_auto_properties = true : suggestion
146+ dotnet_style_prefer_compound_assignment = true : suggestion
147+ dotnet_style_prefer_conditional_expression_over_assignment = true : suggestion
148+ dotnet_style_prefer_conditional_expression_over_return = true : suggestion
149+ dotnet_style_prefer_inferred_anonymous_type_member_names = true : suggestion
150+ dotnet_style_prefer_inferred_tuple_names = true : suggestion
151+ dotnet_style_prefer_is_null_check_over_reference_equality_method = true : suggestion
152+ dotnet_style_prefer_simplified_boolean_expressions = true : suggestion
153+ dotnet_style_prefer_simplified_interpolation = true : suggestion
121154
122155# custom resharper settings
123156# https://www.jetbrains.com/help/resharper/EditorConfig_Index.html
0 commit comments