What is EditorConfig?
EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs. The EditorConfig project consists of a file format for defining coding styles and a collection of text editor plugins that enable editors to read the file format and adhere to defined styles. EditorConfig files are easily readable and they work nicely with version control systems. (Excerpt from official documentation)
.editorconfigfile in the root directory of the project
Enable Editor Config Support
Add coding rules
Refer to the official documentation.
root = true
end_of_line = crlf
insert_final_newline = true
indent_style = space
indent_size = 4
charset = utf-8-bom
trim_trailing_whitespace = true
dotnet_sort_system_directives_first = true
- Check the
Organize Imports On Formatto sort