EDITORCONFIG EXPLAINER · RUNS IN YOUR BROWSER · NOTHING UPLOADED

Why isn't my .editorconfig section applied?

Paste your .editorconfig files and a list of file paths. For every file you get each setting and the section and line that set it, with the values it overrode, resolved the way an EditorConfig core resolves them. The tool flags sections that match none of your files (with a glob that would), a root = true that does nothing, misspelled keys, invalid values, and the values that different editors read differently, such as indent_size = 4 # four.

Nothing you paste leaves this browser tab. The engine passes all 198 runnable tests of the official EditorConfig core-tests suite and was compared with two shipping cores on 23,000 random cases (see the README); your editor's own plugin is the final word.

1. Your .editorconfig files

Paste your top-level .editorconfig. For more files, start each with a line ==> path/to/.editorconfig <== (what head prints for several files, so head -n 1000 $(git ls-files '*.editorconfig') gives you the whole lot).

2. The files to check

From git ls-files, or typed by hand. Without paths you still get the checks that need none.

Why does one file get these settings?

The .editorconfig files read for this path, top down, and which sections match.

From a terminal

The same engine runs over a whole repository, with no install and no network: it reads every .editorconfig and the file list from git itself.

node ventures/editorconfig-explainer/cli/check.mjs            # report
node ventures/editorconfig-explainer/cli/check.mjs --why path # the steps for one file
node ventures/editorconfig-explainer/cli/check.mjs --strict   # exit 1 on a high finding (CI)

Clone the source, then run it from inside your own repository with the path to cli/check.mjs. Node 18 or later.

Questions

Why does [*.{md}] in .editorconfig not match my Markdown files?

Because braces with a single item and no comma are not a list. EditorConfig reads {md} as the literal text {md}, braces included, so [*.{md}] only matches a file named like notes.{md}. Write [*.md], or list two or more alternatives such as [*.{md,mdx}].

Can I put a comment after a value in .editorconfig?

No. Since version 0.15 of the EditorConfig specification, a # or ; after a value is part of the value, so indent_size = 4 # four sets indent_size to the text 4 # four, which editors ignore. Some older cores still strip the comment, so the same file behaves differently in different editors. Put comments on their own line.

Where does root = true go?

At the top of the file, before the first [section]. There it stops editors from reading .editorconfig files in parent folders. Inside a section it is an ordinary key: it is reported for matching files and does not stop the search.

Why does [src/*.js] not match files in src/components?

Two reasons. A single * stops at a folder separator, so src/*.js only matches files directly inside src. And a section name containing a slash is anchored to the folder of its .editorconfig file. Use [src/**.js] or [src/**/*.js] for every .js file below src, and a name without a slash, like [*.js], to match at any depth.

Which .editorconfig wins when there are several?

Editors read every .editorconfig from the file's own folder up to the nearest one with root = true, then apply them from the top down, so a nearer file overrides one further up. Within a file, a later section overrides an earlier one for the same key. The tool shows, for every file, which line won and which values it overrode.

Is anything I paste uploaded?

No. The checker runs entirely in this browser tab. There are no accounts, cookies or analytics vendors, and the command-line version makes no network calls.