|
1 | 1 | root = true |
2 | 2 |
|
3 | 3 | # To learn more about .editorconfig see https://aka.ms/editorconfigdocs |
4 | | -############################### |
5 | | -# Core EditorConfig Options # |
6 | | -############################### |
7 | | - |
8 | | -# All files |
9 | 4 | [*] |
10 | | -indent_style = space |
11 | 5 | charset = utf-8 |
| 6 | +indent_style = space |
12 | 7 | trim_trailing_whitespace = true |
13 | 8 | insert_final_newline = true |
14 | 9 | spelling_exclusion_path = .\exclusion.dic |
15 | 10 |
|
16 | | -# Microsoft .NET properties |
17 | | -csharp_new_line_before_members_in_object_initializers = false |
18 | | -csharp_preferred_modifier_order = public, private, protected, internal, file, new, static, abstract, virtual, sealed, readonly, override, extern, unsafe, volatile, async, required:suggestion |
19 | | -csharp_style_prefer_utf8_string_literals = true:suggestion |
20 | | -csharp_style_var_elsewhere = true:suggestion |
21 | | -csharp_style_var_for_built_in_types = true:suggestion |
22 | | -csharp_style_var_when_type_is_apparent = true:suggestion |
23 | | -dotnet_naming_rule.unity_serialized_field_rule.import_to_resharper = True |
24 | | -dotnet_naming_rule.unity_serialized_field_rule.resharper_description = Unity serialized field |
25 | | -dotnet_naming_rule.unity_serialized_field_rule.resharper_guid = 5f0fdb63-c892-4d2c-9324-15c80b22a7ef |
26 | | -dotnet_naming_rule.unity_serialized_field_rule.severity = warning |
27 | | -dotnet_naming_rule.unity_serialized_field_rule.style = lower_camel_case_style |
28 | | -dotnet_naming_rule.unity_serialized_field_rule.symbols = unity_serialized_field_symbols |
29 | | -dotnet_naming_style.lower_camel_case_style.capitalization = camel_case |
30 | | -dotnet_naming_symbols.unity_serialized_field_symbols.applicable_accessibilities = * |
31 | | -dotnet_naming_symbols.unity_serialized_field_symbols.applicable_kinds = |
32 | | -dotnet_naming_symbols.unity_serialized_field_symbols.resharper_applicable_kinds = unity_serialised_field |
33 | | -dotnet_naming_symbols.unity_serialized_field_symbols.resharper_required_modifiers = instance |
34 | | -dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:none |
35 | | -dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:none |
36 | | -dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:none |
37 | | -dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion |
38 | | -dotnet_style_predefined_type_for_member_access = true:suggestion |
39 | | -dotnet_style_qualification_for_event = false:suggestion |
40 | | -dotnet_style_qualification_for_field = false:suggestion |
41 | | -dotnet_style_qualification_for_method = false:suggestion |
42 | | -dotnet_style_qualification_for_property = false:suggestion |
43 | | -dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion |
44 | | - |
45 | | -# ReSharper properties |
46 | | -resharper_autodetect_indent_settings = true |
47 | | -resharper_formatter_off_tag = @formatter:off |
48 | | -resharper_formatter_on_tag = @formatter:on |
49 | | -resharper_formatter_tags_enabled = true |
50 | | -resharper_new_line_before_while = true |
51 | | -resharper_place_attribute_on_same_line = false |
52 | | -resharper_show_autodetect_configure_formatting_tip = false |
53 | | -resharper_use_indent_from_vs = false |
54 | | - |
55 | | -# ReSharper inspection severities |
56 | | -resharper_arrange_redundant_parentheses_highlighting = hint |
57 | | -resharper_arrange_this_qualifier_highlighting = hint |
58 | | -resharper_arrange_type_member_modifiers_highlighting = hint |
59 | | -resharper_arrange_type_modifiers_highlighting = hint |
60 | | -resharper_built_in_type_reference_style_for_member_access_highlighting = hint |
61 | | -resharper_built_in_type_reference_style_highlighting = hint |
62 | | -resharper_redundant_base_qualifier_highlighting = warning |
63 | | -resharper_suggest_var_or_type_built_in_types_highlighting = hint |
64 | | -resharper_suggest_var_or_type_elsewhere_highlighting = hint |
65 | | -resharper_suggest_var_or_type_simple_types_highlighting = hint |
66 | | -resharper_web_config_module_not_resolved_highlighting = warning |
67 | | -resharper_web_config_type_not_resolved_highlighting = warning |
68 | | -resharper_web_config_wrong_module_highlighting = warning |
69 | | - |
70 | | -# Code files |
71 | | -[*.{cs,csx,vb,vbx,css,scss}] |
72 | | -indent_size = 4 |
73 | | - |
74 | | -[*.{xml,config,*proj,nuspec,props,resx,targets,yml,tasks}] |
75 | | -indent_size = 2 |
76 | | - |
77 | | -# Xml config files |
78 | | -[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}] |
79 | | -indent_size = 2 |
| 11 | +[*.csproj] |
| 12 | +charset = utf-8 |
| 13 | +insert_final_newline = true |
80 | 14 |
|
81 | | -[*.json] |
| 15 | +[*.{xml,config,csproj,nuspec,props,resx,targets,yml,tasks,json}] |
82 | 16 | indent_size = 2 |
83 | 17 |
|
84 | | -[*.{ps1,psm1}] |
85 | | -indent_size = 4 |
86 | | - |
87 | 18 | [*.sh] |
88 | | -indent_size = 4 |
89 | 19 | end_of_line = lf |
90 | 20 |
|
91 | | -############################### |
92 | | -# .NET Coding Conventions # |
93 | | -############################### |
94 | | -[*.{cs,vb}] |
95 | | -# Organize usings |
96 | | -dotnet_sort_system_directives_first = false |
97 | | -# this. preferences |
98 | | -dotnet_style_qualification_for_field = false:silent |
99 | | -dotnet_style_qualification_for_property = false:silent |
100 | | -dotnet_style_qualification_for_method = false:silent |
101 | | -dotnet_style_qualification_for_event = false:silent |
102 | | -# Language keywords vs BCL types preferences |
103 | | -dotnet_style_predefined_type_for_locals_parameters_members = true:silent |
104 | | -dotnet_style_predefined_type_for_member_access = true:silent |
105 | | -# Parentheses preferences |
106 | | -dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent |
107 | | -dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent |
108 | | -dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent |
109 | | -dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent |
110 | | -# Modifier preferences |
111 | | -dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent |
112 | | -dotnet_style_readonly_field = true:suggestion |
113 | | -# Expression-level preferences |
114 | | -dotnet_style_object_initializer = true:suggestion |
115 | | -dotnet_style_collection_initializer = true:suggestion |
116 | | -dotnet_style_explicit_tuple_names = true:suggestion |
117 | | -dotnet_style_null_propagation = true:suggestion |
118 | | -dotnet_style_coalesce_expression = true:suggestion |
119 | | -dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion |
120 | | -dotnet_style_prefer_inferred_tuple_names = true:suggestion |
121 | | -dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion |
122 | | -dotnet_style_prefer_auto_properties = true:silent |
123 | | -dotnet_style_prefer_conditional_expression_over_assignment = true:silent |
124 | | -dotnet_style_prefer_conditional_expression_over_return = true:silent |
125 | | -############################### |
126 | | -# Naming Conventions # |
127 | | -############################### |
128 | | -# Style Definitions |
129 | | -dotnet_naming_style.pascal_case_style.capitalization = pascal_case |
130 | | -# Use PascalCase for constant fields |
131 | | -dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion |
132 | | -dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields |
133 | | -dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style |
134 | | -dotnet_naming_symbols.constant_fields.applicable_kinds = field |
135 | | -dotnet_naming_symbols.constant_fields.applicable_accessibilities = * |
136 | | -dotnet_naming_symbols.constant_fields.required_modifiers = const |
137 | | -dotnet_style_operator_placement_when_wrapping = beginning_of_line |
138 | | -tab_width = 4 |
139 | | -end_of_line = crlf |
140 | | -dotnet_style_prefer_collection_expression = when_types_exactly_match:suggestion |
141 | | -dotnet_style_prefer_simplified_boolean_expressions = true:suggestion |
142 | | -dotnet_style_prefer_compound_assignment = true:suggestion |
143 | | -dotnet_style_prefer_simplified_interpolation = true:suggestion |
144 | | -dotnet_style_namespace_match_folder = false:suggestion |
145 | | -dotnet_style_allow_multiple_blank_lines_experimental = true:silent |
146 | | -dotnet_style_allow_statement_immediately_after_block_experimental = true:silent |
147 | | -dotnet_code_quality_unused_parameters = all:suggestion |
148 | | -############################### |
149 | | -# C# Coding Conventions # |
150 | | -############################### |
151 | | -[*.cs] |
152 | | -# var preferences |
153 | | -csharp_style_var_for_built_in_types = true:silent |
154 | | -csharp_style_var_when_type_is_apparent = true:silent |
155 | | -csharp_style_var_elsewhere = true:silent |
156 | | -csharp_prefer_static_local_function = true:silent |
157 | | -# Expression-bodied members |
158 | | -csharp_style_expression_bodied_methods = false:silent |
159 | | -csharp_style_expression_bodied_constructors = false:silent |
160 | | -csharp_style_expression_bodied_operators = false:silent |
161 | | -csharp_style_expression_bodied_properties = true:silent |
162 | | -csharp_style_expression_bodied_indexers = true:silent |
163 | | -csharp_style_expression_bodied_accessors = true:silent |
164 | | -# Pattern matching preferences |
165 | | -csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion |
166 | | -csharp_style_pattern_matching_over_as_with_null_check = true:suggestion |
167 | | -# Null-checking preferences |
168 | | -csharp_style_throw_expression = true:suggestion |
169 | | -csharp_style_conditional_delegate_call = true:suggestion |
170 | | -# Modifier preferences |
171 | | -csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion |
172 | | -# Expression-level preferences |
173 | | -csharp_prefer_braces = true:silent |
174 | | -csharp_style_deconstructed_variable_declaration = true:suggestion |
175 | | -csharp_prefer_simple_default_expression = true:suggestion |
176 | | -csharp_style_pattern_local_over_anonymous_function = true:suggestion |
177 | | -csharp_style_inlined_variable_declaration = true:suggestion |
178 | | -############################### |
179 | | -# C# Formatting Rules # |
180 | | -############################### |
181 | | -# New line preferences |
182 | | -csharp_new_line_before_open_brace = all |
183 | | -csharp_new_line_before_else = true |
184 | | -csharp_new_line_before_catch = true |
185 | | -csharp_new_line_before_finally = true |
186 | | -csharp_new_line_before_members_in_object_initializers = true |
187 | | -csharp_new_line_before_members_in_anonymous_types = true |
188 | | -csharp_new_line_between_query_expression_clauses = true |
189 | | -# Indentation preferences |
190 | | -csharp_indent_case_contents = true |
191 | | -csharp_indent_switch_labels = true |
192 | | -csharp_indent_labels = one_less_than_current |
193 | | -# Space preferences |
194 | | -csharp_space_after_cast = false |
195 | | -csharp_space_after_keywords_in_control_flow_statements = true |
196 | | -csharp_space_between_method_call_parameter_list_parentheses = false |
197 | | -csharp_space_between_method_declaration_parameter_list_parentheses = false |
198 | | -csharp_space_between_parentheses = false |
199 | | -csharp_space_before_colon_in_inheritance_clause = true |
200 | | -csharp_space_after_colon_in_inheritance_clause = true |
201 | | -csharp_space_around_binary_operators = before_and_after |
202 | | -csharp_space_between_method_declaration_empty_parameter_list_parentheses = false |
203 | | -csharp_space_between_method_call_name_and_opening_parenthesis = false |
204 | | -csharp_space_between_method_call_empty_parameter_list_parentheses = false |
205 | | -# Wrapping preferences |
206 | | -csharp_preserve_single_line_statements = true |
207 | | -csharp_preserve_single_line_blocks = true |
208 | | -############################### |
209 | | -# VB Coding Conventions # |
210 | | -############################### |
211 | | -[*.vb] |
212 | | -# Modifier preferences |
213 | | -visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:suggestion |
214 | | -[*.cs] |
215 | 21 | # Add file header |
216 | 22 | file_header_template = Licensed to the .NET Foundation under one or more agreements.\nThe .NET Foundation licenses this file to you under the Apache 2.0 License\nSee the LICENSE file in the project root for more information.\nMaintainer: Argo Zhang([email protected]) Website: https://www.blazor.zone |
217 | | -csharp_style_namespace_declarations = file_scoped:silent |
218 | | -csharp_style_expression_bodied_local_functions = false:silent |
219 | | -csharp_using_directive_placement = outside_namespace:silent |
220 | | -csharp_prefer_simple_using_statement = true:suggestion |
221 | | -csharp_style_prefer_method_group_conversion = true:silent |
222 | | -csharp_style_prefer_top_level_statements = true:silent |
223 | | -csharp_style_prefer_primary_constructors = true:suggestion |
224 | | -csharp_style_expression_bodied_lambdas = true:silent |
225 | | -csharp_style_prefer_null_check_over_type_check = true:suggestion |
226 | | -csharp_style_prefer_local_over_anonymous_function = true:suggestion |
227 | | -csharp_style_prefer_index_operator = true:suggestion |
228 | | -csharp_style_prefer_range_operator = true:suggestion |
229 | | -csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion |
230 | | -csharp_style_prefer_utf8_string_literals = true:suggestion |
231 | | -csharp_style_prefer_tuple_swap = true:suggestion |
232 | | -csharp_style_unused_value_expression_statement_preference = discard_variable:silent |
233 | | -csharp_style_unused_value_assignment_preference = discard_variable:suggestion |
234 | | -csharp_style_prefer_readonly_struct_member = true:suggestion |
235 | | -csharp_style_prefer_readonly_struct = true:suggestion |
236 | | -csharp_style_allow_embedded_statements_on_same_line_experimental = true:silent |
237 | | -csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true:silent |
238 | | -csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:silent |
239 | | -csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true:silent |
240 | | -csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true:silent |
241 | | -csharp_style_prefer_switch_expression = true:suggestion |
242 | | -csharp_style_prefer_pattern_matching = true:silent |
243 | | -csharp_style_prefer_not_pattern = true:suggestion |
244 | | -csharp_style_prefer_extended_property_pattern = true:suggestion |
245 | | -csharp_prefer_static_anonymous_function = true:suggestion |
246 | | -csharp_prefer_system_threading_lock = true:suggestion |
0 commit comments