ESLint Config Generator
Generate ESLint configuration files visually.
Copy the config to eslint.config.js (flat) or .eslintrc.json (legacy).
What is ESLint?
ESLint is a static code analysis tool for JavaScript and TypeScript. It scans your source files, identifies problematic patterns, enforces style consistency, and catches many bugs before they reach production. Because it is configurable, teams can tailor the exact set of rules that fits their codebase and workflow.
The generator supports two configuration formats. Flat config is the modern ESLint 9 format written in JavaScript and exported with export default; it groups options under languageOptions, plugins, and rules. Legacy config is the traditional .eslintrc structure that uses env, extends, and parserOptions.
You can start from one of five presets: airbnb, standard, prettier, google, or custom (minimal). Whatever preset you pick, the generated config also extends eslint:recommended, the curated set of core rules that catch common mistakes.
The page also exposes environment and framework toggles. Node, Browser, and ES2021 control globals and the ECMAScript version, while TypeScript, React, and Vue add the relevant parser, plugins, and extends entries. Rule checkboxes and inputs control semicolons, quote style, trailing commas, indentation, and maximum line length. Everything is generated in your browser and copied to your clipboard.
Key Concepts
- Flat config — the ESLint 9
eslint.config.jsformat. - Legacy config — the traditional
.eslintrcstructure withenvandextends. - Preset — airbnb, standard, prettier, google, or custom (minimal).
- Environments and globals — Node, Browser, and ES2021 toggles.
- Framework plugins — TypeScript, React, and Vue support.
- Rules — the style and correctness rules written into the output.
How to Use
- Choose a preset — Select airbnb, standard, prettier, google, or custom (minimal).
- Choose a format — Pick Flat (
eslint.config.js) or Legacy (.eslintrc). - Toggle environments and frameworks — Enable Node, Browser, ES2021, TypeScript, React, and/or Vue.
- Adjust rules — Set semicolons, quote style, trailing commas, indent width, and maximum line length.
- Copy the config — Copy the generated output into
eslint.config.jsor.eslintrc.json.
Generated Rules Reference
| Rule | Generated value | When |
|---|---|---|
| semi | always / never | “Require semicolons” checked (never for standard). |
| quotes | single / double | Quotes checked. |
| comma-dangle | always-multiline | Trailing commas checked. |
| indent | 2 or 4 | Always. |
| no-trailing-spaces | error | Always. |
| eol-last | always | Always. |
| max-len | 120 (default) | Omitted entirely when the value is 0. |
| no-console | warn / off | warn for airbnb, off for all others. |
| no-debugger | warn | Always. |
| no-var | error | Always. |
| prefer-const | error | Always. |
Preset Reference
| Preset | Extends (legacy) | Notes |
|---|---|---|
| Airbnb | airbnb-base, eslint:recommended | Sets no-console to warn. |
| Standard | standard, eslint:recommended | Sets semi to never. |
| Prettier | prettier, eslint:recommended | Pairs with Prettier formatting. |
| google, eslint:recommended | Follows the Google style guide. | |
| Custom (minimal) | eslint:recommended | No additional style preset. |
Worked Examples
- TypeScript enabled — adds the
@typescript-eslintplugin, turns off the baseno-unused-vars, sets@typescript-eslint/no-unused-varsto error, and appends TypeScript file globs. - React enabled — adds the
reactplugin and setssettings.react.versiontodetect. - Vue enabled (legacy) — extends
plugin:vue/vue3-recommendedand adds thevueplugin. - Standard preset — writes
semi: ["never"]instead ofalways. - Maximum line length set to 0 — the
max-lenrule is omitted from the output entirely. - Node and Browser enabled — declares read-only
window,document, andconsoleglobals plusprocess,__dirname,module, andrequire. - ES2021 disabled —
ecmaVersionbecomes 2020 instead of 2021.
Tips and Common Mistakes
- Match the version — flat config requires ESLint 9 or later; use legacy config for ESLint 8 and below.
- Line up with your formatter — choose the Prettier preset if you format with Prettier to avoid rule conflicts.
- eslint:recommended is always included — it is added alongside whichever preset you select.
- Zero disables the line-length rule — setting max line length to 0 omits
max-lenentirely. - TypeScript replaces no-unused-vars — enabling TypeScript disables the base rule in favor of the TypeScript-aware version.
- Install the plugins yourself — the generator writes configuration only and does not add packages to your project.
Common Use Cases
An ESLint config generator removes the guesswork from setting up linting. Here are the situations where it saves the most time.
- New project setup — create a working configuration in seconds.
- v8 to v9 migration — translate a legacy config into the flat format.
- Team style enforcement — standardize rules across a codebase.
- Framework enablement — add TypeScript, React, or Vue linting.
- CI consistency — commit a known-good config used by every contributor.
- Baseline experimentation — preview how presets change the rules.
Frequently Asked Questions
Which preset should I choose?
Choose Prettier if you format with Prettier, Airbnb for large teams, Standard for a minimal opinionated set, or Google to follow the Google style guide. Custom (minimal) adds no style preset.
What is the difference between flat and legacy config?
Flat config is the ESLint 9 JavaScript format using export default, while legacy config uses env and extends in a .eslintrc file for ESLint 8 and below.
Is my configuration stored on a server?
No. All generation happens in your browser, so nothing is transmitted, stored, or logged.
Does the generator install plugins?
No. It writes configuration only; install @typescript-eslint, eslint-plugin-react, or eslint-plugin-vue yourself before linting.
What does eslint:recommended do?
It enables a curated set of core rules that catch common errors, and it is added to every preset in the generated output.
How is no-console configured?
It is set to warn for the airbnb preset and off for all other presets.
Can I remove the max-line-length rule?
Yes. Set the max line length to 0 and the max-len rule is omitted from the generated config entirely.
Why does enabling TypeScript change no-unused-vars?
The base rule is turned off and replaced with @typescript-eslint/no-unused-vars, which understands TypeScript syntax such as type-only imports.
Related Tools
JS Beautifier
Format and beautify JavaScript
JSON Formatter
Format and validate JSON
Regex Tester
Test regular expressions live
Commit Generator
Generate conventional commits
.gitignore Generator
Generate .gitignore files
License Generator
Generate open source licenses