Skip to content

Commit 8dc9eff

Browse files
pkaminskiTwoTenPvP
authored andcommitted
docs: add .editorconfig. (#246)
* docs: add .editorconfig.
1 parent 6889c12 commit 8dc9eff

File tree

1 file changed

+92
-0
lines changed

1 file changed

+92
-0
lines changed

.editorconfig

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
indent_style = space
6+
indent_size = 4
7+
insert_final_newline = true
8+
9+
[*.cs]
10+
# Set default charset
11+
charset = utf-8
12+
13+
# Rider is HORRIBLE at doing this. MonoDevelop does an ok job. VS Unknown
14+
trim_trailing_whitespace = true
15+
16+
# Long lines are fine in many cases. It's not the 90s
17+
max_line_length = off
18+
19+
# Sort using directives with System.* appearing first.
20+
dotnet_sort_system_directives_first = true
21+
22+
# Avoid "this." if not necessary.
23+
dotnet_style_qualification_for_field = false:suggestion
24+
dotnet_style_qualification_for_property = false:suggestion
25+
dotnet_style_qualification_for_method = false:suggestion
26+
dotnet_style_qualification_for_event = false:suggestion
27+
28+
# Use language keywords instead of framework type names for type references
29+
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
30+
dotnet_style_predefined_type_for_member_access = true:suggestion
31+
32+
# Suggest more modern language features when available
33+
dotnet_style_object_initializer = true:suggestion
34+
dotnet_style_collection_initializer = true:suggestion
35+
dotnet_style_coalesce_expression = false:suggestion
36+
dotnet_style_null_propagation = false:suggestion
37+
dotnet_style_explicit_tuple_names = true:suggestion
38+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
39+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
40+
csharp_style_inlined_variable_declaration = true:suggestion
41+
csharp_style_throw_expression = false:suggestion
42+
csharp_style_conditional_delegate_call = false:suggestion
43+
44+
# Indentation preferences
45+
csharp_indent_block_contents = true
46+
csharp_indent_braces = false
47+
csharp_indent_case_contents = true
48+
csharp_indent_case_contents_when_block = true
49+
csharp_indent_switch_labels = true
50+
csharp_indent_labels = flush_left
51+
52+
# Death to vars
53+
csharp_style_var_for_built_in_types = false:suggestion
54+
csharp_style_var_when_type_is_apparent = false:suggestion
55+
csharp_style_var_elsewhere = false:suggestion
56+
57+
# Prefer method-like constructs to have a block body
58+
csharp_style_expression_bodied_methods = false:none
59+
csharp_style_expression_bodied_constructors = false:none
60+
csharp_style_expression_bodied_operators = false:none
61+
62+
# Prefer property-like constructs to have an expression-body
63+
csharp_style_expression_bodied_properties = true:none
64+
csharp_style_expression_bodied_indexers = false:none
65+
csharp_style_expression_bodied_accessors = false:none
66+
67+
# Newline settings
68+
csharp_new_line_before_open_brace = all
69+
csharp_new_line_before_else = true
70+
csharp_new_line_before_catch = true
71+
csharp_new_line_before_finally = true
72+
csharp_new_line_before_members_in_object_initializers = true
73+
csharp_new_line_before_members_in_anonymous_types = true
74+
csharp_new_line_between_query_expression_clauses = true
75+
76+
# Spacing
77+
csharp_space_after_cast = false
78+
csharp_space_before_colon_in_inheritance_clause = true
79+
csharp_space_after_colon_in_inheritance_clause = true
80+
csharp_space_after_keywords_in_control_flow_statements = true
81+
csharp_space_around_binary_operators = before_and_after
82+
csharp_space_between_method_call_empty_parameter_list_parentheses = false
83+
csharp_space_between_method_call_name_and_opening_parenthesis = false
84+
csharp_space_between_method_call_parameter_list_parentheses = false
85+
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
86+
csharp_space_between_method_declaration_parameter_list_parentheses = false
87+
csharp_space_between_parentheses = false
88+
89+
# Blocks are allowed
90+
csharp_prefer_braces = true:suggestion
91+
csharp_preserve_single_line_blocks = true
92+
csharp_preserve_single_line_statements = false

0 commit comments

Comments
 (0)