diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..498821c --- /dev/null +++ b/.editorconfig @@ -0,0 +1,45 @@ +root = true + +# All files +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +# C# specific settings +[*.cs] +# Code style rules +dotnet_member_insertion_location = with_other_members_of_the_same_kind +dotnet_property_generation_behavior = prefer_throwing_properties + +# Formatting rules +csharp_new_line_before_open_brace = all +csharp_new_line_before_else = true +csharp_new_line_before_catch = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_object_initializers = true +csharp_new_line_before_members_in_anonymous_types = true + +# Python files +[*.py] +indent_size = 4 + +# YAML files +[*.{yml,yaml}] +indent_size = 2 + +# JavaScript/TypeScript files +[*.{js,ts,tsx,jsx}] +indent_size = 2 + +# JSON files +[*.json] +indent_size = 2 + +# Markdown files +[*.md] +trim_trailing_whitespace = false +EOF < /dev/null