Questions tagged [editorconfig]

EditorConfig helps developers define and maintain consistent coding styles between different 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.

EditorConfig helps developers define and maintain consistent coding styles between different 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.

297 questions
101
votes
5 answers

EditorConfig vs. ESLint vs. Prettier: Is it worthwhile to use them all?

I am trying to set up some tools to help maintain consistency in a codebase used by multiple developers. Is it necessary to use EditorConfig, ESLint and Prettier all together? As far as I understand, EditorConfig is used to set coding styles/rules,…
PBandJ
  • 2,537
  • 3
  • 21
  • 31
64
votes
4 answers

EditorConfig for VS Code not working

I use VS Code as editor. We have a .editorconfig file with format configs within. We all use in our editors the extenion EditorConfig to format our HTML and CSS general. I have installed the extension EditorConfig for VS Code from here:…
webta.st.ic
  • 4,781
  • 6
  • 48
  • 98
52
votes
5 answers

Possible to ignore/exclude file/folder from .editorconfig?

Is it possible to ignore/exclude file/folder from .editorconfig? Reason: I have a /vendor folder with third party files. I don't want the folder to inherit any of my .editorconfig configs. I found the EditorConfig-Properties page and seems like…
iDev247
  • 1,761
  • 3
  • 16
  • 36
49
votes
4 answers

How to export all my Intellij code styles to a .editorconfig file?

I'm trying to have a standard code style for my project, and I have found http://editorconfig.org/, that is a standard for that. I like it very much, and Intellij supports it (we use Intellij). But I have read a lot and I haven´t found how I can…
edwise
  • 869
  • 2
  • 9
  • 18
37
votes
2 answers

EditorConfig: How to autofix all files in a project

Given I have an .editorconfig file that dictates consistent indent, line endings, trailing whitespace, etc. # http://editorconfig.org root = true [*] indent_style = space indent_size = 2 end_of_line = lf charset = utf-8 trim_trailing_whitespace =…
Jesper Rønn-Jensen
  • 106,591
  • 44
  • 118
  • 155
32
votes
5 answers

EditorConfig for Visual Studio Code

My project has .editorconfig file with: [*.{js}] charset = utf-8 indent_style = space indent_size = 4 I thought this will force my Visual Studio Code to use indent style space with four spaces. I installed the EditorConfig for Visual Studio Code…
croraf
  • 4,332
  • 2
  • 31
  • 50
31
votes
2 answers

EditorConfig control File-scoped namespace declaration

I'm using C# 10 new feature File-scoped namespace declaration. I have old code like this namespace SampleCode { public class MyClass { } } I'm moving this code to namespace SampleCode; public class MyClass { } But I have a bunch of…
JuChom
  • 5,717
  • 5
  • 45
  • 78
29
votes
3 answers

How to apply .editorconfig to an existing project in IntelliJ IDEA

I have created a .editorconfig file as shown below for IntelliJ IDEA. # editorconfig.org root = true [*] charset = utf-8 insert_final_newline = true trim_trailing_whitespace = true end_of_line = lf indent_style = space indent_size =…
dhana lakshmi
  • 847
  • 1
  • 12
  • 29
28
votes
4 answers

'Format code' and 'sort using' on save in Visual Studio 2022

I and my team spent the last few months defining rules about C# code formatting and style for our project, so we ended up with an .editorconfig file. Moreover, we all installed the extension Productivity Power Tools, in order to format the code when…
25
votes
1 answer

Formatting rule to have blank line between class member declarations

Micrsoft provides bunch of coding settings for EditorConfig .NET coding convention settings for EditorConfig But cannot find the way to create a rule, which will suggest developer to add empty line between class members declaration. // "Bad"…
Basin
  • 887
  • 1
  • 14
  • 28
24
votes
2 answers

How to import an EditorConfig file into Visual Studio for all solutions?

How do I import code conventions (code formatting settings) from an EditorConfig file into Visual Studio? I would like to have one .editorconfig file for all solutions and not one per project.
Dmitry
  • 549
  • 1
  • 5
  • 16
23
votes
3 answers

Confused over ruleset files vs. EditorConfig files

Our organisation uses a ruleset file containing our organisation's StyleCop.Analyzers settings. This lives in source control, and all projects in all solutions in our organisation reference this file. If I edit the ruleset (via project properties →…
22
votes
1 answer

VS2019 .editorconfig is not respected

We're struggling to set a team-standard indent style for javascript/typescript and from all indications, the settings in .editorconfig are not overriding user preferences as indicated at the bottom of VS when we open the solution For testing…
Mr. T
  • 3,892
  • 3
  • 29
  • 48
22
votes
2 answers

Export Visual Studio's 'Code Style settings' as .editorconfig

Our team works with Visual Studio 2017 Professional. I've been trying to unify the Code Style across the team and apparently the industry standard right now is to use .editorconfig files. Even Visual Studio in it's settings windows suggests to use…
21
votes
1 answer

EditorConfig in Android Studio

There is an option in Android studio to enable EditorConfig support( defaultsettings->codingstyle dialog),but not sure how it works.Could you please let me know how to integrate .editorconfig file in the Andriod Studio project?
Chandra
  • 515
  • 6
  • 19
1
2 3
19 20