Skip to content

Commit b5dac85

Browse files
committed
Added Editor Config
1 parent 4fb1cbc commit b5dac85

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

.editorconfig

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# http://EditorConfig.org
2+
# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference
3+
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
end_of_line = crlf
9+
indent_size = 2
10+
indent_style = space
11+
insert_final_newline = true
12+
trim_trailing_whitespace = true
13+
14+
[*.md]
15+
indent_size = 4
16+
trim_trailing_whitespace = false
17+
18+
19+
# Dotnet code style settings:
20+
[*.{cs, vb}]
21+
indent_size = 4
22+
23+
# Avoid "this." and "Me." if not necessary
24+
dotnet_style_qualification_for_field = false:suggestion
25+
dotnet_style_qualification_for_property = false:suggestion
26+
dotnet_style_qualification_for_method = false:suggestion
27+
dotnet_style_qualification_for_event = false:suggestion
28+
29+
# Use language keywords instead of framework type names for type references
30+
dotnet_style_predefined_type_for_locals_parameters_members = true:error
31+
dotnet_style_predefined_type_for_member_access = false:error
32+
33+
# Suggest more modern language features when available
34+
dotnet_style_object_initializer = true:suggestion
35+
dotnet_style_collection_initializer = true:suggestion
36+
dotnet_style_coalesce_expression = true:suggestion
37+
dotnet_style_null_propagation = true:suggestion
38+
dotnet_style_explicit_tuple_names = true:suggestion
39+
40+
# CSharp code style settings:
41+
[*.cs]
42+
# K&R styling
43+
csharp_new_line_before_open_brace = none:error
44+
45+
# Prefer "var" everywhere
46+
csharp_style_var_for_built_in_types = false:error
47+
csharp_style_var_when_type_is_apparent = true:suggestion
48+
csharp_style_var_elsewhere = true:suggestion
49+
50+
# Prefer method-like constructs to have a block body
51+
csharp_style_expression_bodied_methods = true:none
52+
csharp_style_expression_bodied_constructors = true:none
53+
csharp_style_expression_bodied_operators = true:none
54+
55+
# Prefer property-like constructs to have an expression-body
56+
csharp_style_expression_bodied_properties = true:none
57+
csharp_style_expression_bodied_indexers = true:none
58+
csharp_style_expression_bodied_accessors = true:none
59+
60+
# Suggest more modern language features when available
61+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
62+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
63+
csharp_style_inlined_variable_declaration = true:suggestion
64+
csharp_style_throw_expression = true:suggestion
65+
csharp_style_conditional_delegate_call = true:suggestion

0 commit comments

Comments
 (0)