1
- # Version: 2 .1.0 (Using https://semver.org/)
2
- # Updated: 2021-03-03
1
+ # Version: 4 .1.1 (Using https://semver.org/)
2
+ # Updated: 2022-05-23
3
3
# See https://github.com/RehanSaeed/EditorConfig/releases for release notes.
4
4
# See https://github.com/RehanSaeed/EditorConfig for updates to this file.
5
5
# See http://EditorConfig.org for more information about .editorconfig files.
@@ -49,11 +49,11 @@ indent_size = 2
49
49
indent_size = 2
50
50
51
51
# Markdown Files
52
- [* .md ]
52
+ [* .{md,mdx} ]
53
53
trim_trailing_whitespace = false
54
54
55
55
# Web Files
56
- [* .{htm,html,js,jsm,ts,tsx,css,sass,scss,less,svg,vue} ]
56
+ [* .{htm,html,js,jsm,ts,tsx,cjs,cts,ctsx,mjs,mts,mtsx, css,sass,scss,less,pcss ,svg,vue} ]
57
57
indent_size = 2
58
58
59
59
# Batch Files
@@ -75,7 +75,7 @@ indent_style = tab
75
75
76
76
[* .{cs,csx,cake,vb,vbx} ]
77
77
# Default Severity for all .NET Code Style rules below
78
- dotnet_analyzer_diagnostic.category-style. severity = warning
78
+ dotnet_analyzer_diagnostic.severity = warning
79
79
80
80
# #########################################
81
81
# Language Rules
@@ -122,20 +122,21 @@ dotnet_style_coalesce_expression = true:warning
122
122
dotnet_style_null_propagation = true :warning
123
123
dotnet_style_prefer_is_null_check_over_reference_equality_method = true :warning
124
124
# File header preferences
125
- file_header_template = Copyright (c) Six Labors.\nLicensed under the Apache License, Version 2 .0 .
125
+ file_header_template = Copyright (c) Six Labors.\nLicensed under the Six Labors Split License .
126
126
# SA1636: File header copyright text should match
127
127
# Justification: .editorconfig supports file headers. If this is changed to a value other than "none", a stylecop.json file will need to added to the project.
128
128
# dotnet_diagnostic.SA1636.severity = none
129
129
130
130
# Undocumented
131
- dotnet_style_operator_placement_when_wrapping = end_of_line
131
+ dotnet_style_operator_placement_when_wrapping = end_of_line:warning
132
+ csharp_style_prefer_null_check_over_type_check = true :warning
132
133
133
134
# C# Style Rules
134
135
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/language-rules#c-style-rules
135
136
[* .{cs,csx,cake} ]
136
137
# 'var' preferences
137
- csharp_style_var_for_built_in_types = never
138
- csharp_style_var_when_type_is_apparent = true :warning
138
+ csharp_style_var_for_built_in_types = false : warning
139
+ csharp_style_var_when_type_is_apparent = false :warning
139
140
csharp_style_var_elsewhere = false :warning
140
141
# Expression-bodied members
141
142
csharp_style_expression_bodied_methods = true :warning
@@ -200,12 +201,15 @@ dotnet_diagnostic.IDE0059.severity = suggestion
200
201
# Organize using directives
201
202
dotnet_sort_system_directives_first = true
202
203
dotnet_separate_import_directive_groups = false
204
+ # Dotnet namespace options
205
+ dotnet_style_namespace_match_folder = true :suggestion
206
+ dotnet_diagnostic.IDE0130.severity = suggestion
203
207
204
208
# C# formatting rules
205
209
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/formatting-rules#c-formatting-rules
206
210
[* .{cs,csx,cake} ]
207
211
# Newline options
208
- # https://docs.microsoft.com/visualstudio/ide/editorconfig- formatting-conventions #new-line-options
212
+ # https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ formatting-rules #new-line-options
209
213
csharp_new_line_before_open_brace = all
210
214
csharp_new_line_before_else = true
211
215
csharp_new_line_before_catch = true
@@ -214,15 +218,15 @@ csharp_new_line_before_members_in_object_initializers = true
214
218
csharp_new_line_before_members_in_anonymous_types = true
215
219
csharp_new_line_between_query_expression_clauses = true
216
220
# Indentation options
217
- # https://docs.microsoft.com/visualstudio/ide/editorconfig- formatting-conventions #indentation-options
221
+ # https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ formatting-rules #indentation-options
218
222
csharp_indent_case_contents = true
219
223
csharp_indent_switch_labels = true
220
224
csharp_indent_labels = no_change
221
225
csharp_indent_block_contents = true
222
226
csharp_indent_braces = false
223
227
csharp_indent_case_contents_when_block = false
224
228
# Spacing options
225
- # https://docs.microsoft.com/visualstudio/ide/editorconfig- formatting-conventions #spacing-options
229
+ # https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ formatting-rules #spacing-options
226
230
csharp_space_after_cast = false
227
231
csharp_space_after_keywords_in_control_flow_statements = true
228
232
csharp_space_between_parentheses = false
@@ -246,9 +250,12 @@ csharp_space_before_open_square_brackets = false
246
250
csharp_space_between_empty_square_brackets = false
247
251
csharp_space_between_square_brackets = false
248
252
# Wrap options
249
- # https://docs.microsoft.com/visualstudio/ide/editorconfig- formatting-conventions #wrap-options
253
+ # https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ formatting-rules #wrap-options
250
254
csharp_preserve_single_line_statements = false
251
255
csharp_preserve_single_line_blocks = true
256
+ # Namespace options
257
+ # https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/formatting-rules#namespace-options
258
+ csharp_style_namespace_declarations = file_scoped:warning
252
259
253
260
# #########################################
254
261
# .NET Naming Rules
0 commit comments