DEV Community

Cover image for What's your default .editorconfig?
Stephen Walsh
Stephen Walsh

Posted on

What's your default .editorconfig?

I've been using EditorConfig to bring consistency to the way that I write my code. I also find it's been helpful to standardise the way teams I work on deliver with a similar style. It takes a little while to find settings that work for everyone, but I'm wanting to learn from others what their default configurations are and why you chose them.


If you're wondering what EditorConfig is this is taken straight from their website.

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.


What I Use

I've been using RehanSaeed's EditorConfig project on GitHub, which is pretty great. I have forked it and made some minor customisations that work for me.

Extensive code style settings for C# and VB.NET have been defined that require the latest C# features to be used. All C# related code styles are consistent with StyleCop's default styles, with the exception of the file header definition, which has been changed to a more modern format. All .NET naming conventions are consistent with the .NET Framework Design Guideline's Naming Guidelines.

Would love to see what others have as a default. Please share your versions or repo links in the comments.


Further Reading

Top comments (0)