.eslintrc

What is a .eslintrc file?

Legacy ESLint config — code style and quality rules for JavaScript/TypeScript. Replaced by `eslint.config.js` (flat config) in ESLint 9.

Safe format
Type Code
By Nicholas C. Zakas (ESLint)
MIME application/json

Drop any file to identify it

No upload. No signup. No sending your file halfway across the internet.
We tell you what it is, right here in your browser.

What is it

ESLint is the dominant linter for JavaScript and TypeScript. .eslintrc was its original config file: extends a base preset (airbnb, standard, recommended), declares custom rules, configures plugins (`@typescript-eslint`, `eslint-plugin-react`), and sets parser options (target ES version, JSX support).

Format variants existed for taste — .eslintrc, .eslintrc.json, .eslintrc.js, .eslintrc.yml. ESLint reads any of them. The bare .eslintrc (no extension) holds JSON-formatted content and follows the dotfile-only naming convention popular in Node-land circa 2015. Newer projects tend to use .eslintrc.json (explicit format) or .eslintrc.js (when you need JavaScript expressions in the config).

ESLint 9 (April 2024) deprecated this format in favour of `eslint.config.js` — the new "flat config" — which simplifies inheritance, makes parsing rules clearer, and ditches some legacy quirks. Legacy .eslintrc still works in ESLint 9 with the `ESLINT_USE_FLAT_CONFIG=false` env var, but ESLint 10 will likely drop it entirely. Migration guide at eslint.org/docs/latest/use/configure/migration-guide.

Technical details
Full Name
.eslintrc
MIME Type
application/json
Developer
Nicholas C. Zakas (ESLint)
Magic Bytes
N/A
Safety
.eslintrc is a known, safe format.
What opens it
Any text editor
FREE All
VS Code
FREE All

* ESLint extension provides validation

FAQ
Should I migrate to flat config (eslint.config.js)?
Yes, eventually. ESLint 9 still supports the legacy .eslintrc format but ESLint 10 will likely drop it. New projects should start with eslint.config.js. Existing projects can migrate when convenient — there's a `@eslint/migrate-config` codemod that handles the bulk of the work.
What's the difference between .eslintrc and .eslintrc.json?
Functionally identical — both hold JSON content, both are read by ESLint with equal priority. The .eslintrc form is older convention; .eslintrc.json is more explicit and gets you JSON syntax highlighting in editors that don't recognise the bare form.
Related formats