Home › Developer Tools › ESLint Config Generator

ESLint Config Generator

Answer a few questions about your project and get a modern flat eslint.config.js for ESLint 9, plus the exact packages to install. It covers JavaScript and TypeScript (including type-aware linting), React with Hooks and accessibility rules, Node.js, test globals and Prettier.

Last updated:

Quick start:
Language
Framework & environment
Extra rules
Ignore & options

eslint.config.js

1. Install
2. Add scripts to package.json
3. Run
    Advertisement
    Advertisement

    How to use the ESLint Config Generator

    1. Pick a quick-start preset such as React + TypeScript or Node.js, or set the options yourself.
    2. Choose the language and framework: TypeScript adds typescript-eslint, React adds the React, Hooks and optional accessibility plugins.
    3. Select the environment (browser, Node.js, test globals) and whether your files use ES modules or CommonJS.
    4. Toggle extra rules and Prettier compatibility, and list folders to ignore.
    5. Copy the config and the install command, save the file in your project root and run npx eslint ..

    Which packages does each option add?

    OptionPackageWhat it adds to the config
    Alwayseslint, @eslint/js, globalsjs.configs.recommended and environment globals
    TypeScripttypescript-eslint, typescriptParser, plugin and the recommended or strict rule set
    Reacteslint-plugin-reactreact.configs.flat.recommended and the jsx-runtime config for React 17+
    Rules of Hookseslint-plugin-react-hooksrules-of-hooks (error) and exhaustive-deps (warning)
    Accessibilityeslint-plugin-jsx-a11yChecks for alt text, labels, valid ARIA and keyboard support in JSX
    Node.js best practiceseslint-plugin-nMissing imports, unsupported Node.js features, deprecated APIs
    Prettiereslint-config-prettierTurns off rules that conflict with Prettier formatting

    Moving from .eslintrc to flat config

    • extends strings become imports. "extends": ["eslint:recommended"] becomes js.configs.recommended imported from @eslint/js.
    • env becomes languageOptions.globals. "env": { "browser": true } becomes globals: { ...globals.browser }.
    • overrides become separate objects with their own files pattern, applied in order.
    • .eslintignore becomes ignores inside the config file.
    • Rule severities are unchanged: "off", "warn", "error" (or 0, 1, 2), optionally with options in an array.

    Formatting belongs to a formatter: build a matching config with the Prettier Config Generator, and keep indentation consistent across editors with the EditorConfig Generator.

    Frequently asked questions

    What is the ESLint flat config?

    Flat config is the configuration format introduced in ESLint 8.21 and made the default in ESLint 9. Instead of .eslintrc files with extends strings, you export an array of config objects from eslint.config.js and import plugins and shared configs directly as JavaScript modules.

    Should my file be eslint.config.js or eslint.config.mjs?

    Use eslint.config.js when your package.json has "type": "module", because the file uses import and export. In a CommonJS project either name it eslint.config.mjs, which is always treated as an ES module, or choose eslint.config.cjs to use require and module.exports.

    What does defineConfig do?

    defineConfig() from eslint/config (ESLint 9.22 and newer) adds type checking and accepts nested arrays, so shared configs like tseslint.configs.recommended can be listed without the spread operator. globalIgnores() makes it explicit that the patterns apply to the whole project. Untick the option to get a plain exported array for older ESLint 9 releases.

    What is type-aware linting?

    typescript-eslint can use the TypeScript compiler's type information to power rules such as no-floating-promises and no-misused-promises. It needs a tsconfig.json and makes linting slower. The generated config enables projectService and turns type-aware rules off for plain .js files.

    How do I use ESLint together with Prettier?

    Let Prettier handle formatting and ESLint handle code quality. Tick the Prettier option to add eslint-config-prettier as the last item, which turns off every ESLint rule that could conflict with Prettier's output. Run Prettier separately or in your editor on save.

    Where did .eslintignore go?

    Flat config does not read .eslintignore. Put ignored paths in the config instead, as an object with only an ignores key or with globalIgnores(). node_modules and .git are ignored automatically.

    Is anything uploaded?

    No. The configuration is generated in your browser, and your choices are remembered only in this browser's local storage.

    Are all the tools on FreeToolCabin tested for quality and accuracy?

    Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

    Related tools

    Prettier Config GeneratorToggle Prettier options, preview formatted code live and copy your .prettierrc file.EditorConfig GeneratorBuild an .editorconfig with indent, charset, line endings and trim rules per file pattern.package.json GeneratorFill a form and get a valid, npm-ready package.json with scripts, dependencies and checks.JavaScript Syntax CheckerCheck JavaScript for syntax errors with line and column, for any ES version, script or module.QR Code GeneratorMake QR codes for links, Wi-Fi, email and more.Barcode GeneratorCreate Code 128, EAN-13, UPC-A, EAN-8, Code 39 and ITF-14 barcodes as PNG or SVG.UUID GeneratorGenerate UUID v4 and v7 / GUIDs in bulk and copy or download them.Schema Markup Generator (JSON-LD)Create JSON-LD structured data for FAQ, Product, Article and more.Htaccess & Nginx Redirect GeneratorBuild 301 redirects for .htaccess, Nginx and Netlify or Cloudflare _redirects.Fake Data GeneratorGenerate mock data as JSON, CSV or SQL.Random String GeneratorGenerate secure random strings and tokens in bulk with any length and character set.API Key GeneratorCreate secure API keys and secrets with prefixes, checksums and SHA-256 hashes for storage.MIME Type LookupFind the MIME type for any file extension, or the extensions for a MIME type, in 400+ entries.Cron Expression GeneratorBuild crontab schedules visually, read them in plain English and see the next run times.URL Slug GeneratorTurn titles into clean, SEO-friendly URL slugs: accents, stop words, separators and bulk lines.JSON Schema GeneratorTurn sample JSON into a draft 2020-12 JSON Schema with types, required fields and formats.Gitignore GeneratorBuild a .gitignore from 50+ templates for languages, frameworks, IDEs and OS, merged and deduped.License GeneratorCreate a LICENSE file for MIT, Apache, GPL, BSD, ISC, MPL or Unlicense with your name and year.ULID GeneratorGenerate sortable ULIDs and UUID v7 in bulk, monotonic option, and decode their timestamps.Htpasswd GeneratorCreate .htpasswd entries with bcrypt, APR1-MD5 or SHA-1 for Apache and Nginx basic auth.Placeholder Image GeneratorCreate placeholder images in any size, color and text as PNG, JPG, WebP, SVG or data URI.Ads.txt GeneratorCreate or validate ads.txt and app-ads.txt files: seller lines, cert IDs and variables.Docker Run to Compose ConverterConvert docker run commands to docker-compose.yml, or a compose file back to docker run.Dockerfile GeneratorGenerate a production Dockerfile and .dockerignore for Node, Python, Go or a static nginx site.HTML Boilerplate GeneratorTick the options you need and get a clean HTML5 starter template with meta, OG tags and CSS reset.JSON to Zod SchemaInfer a Zod (or Yup) schema from sample JSON with optional, nullable and z.infer types.Linux Commands Cheat SheetSearchable Linux and bash command reference with flags explained, examples and copy buttons.LLMs.txt GeneratorBuild an llms.txt file for AI crawlers: summary and link sections, import from your sitemap.Nano ID GeneratorGenerate secure Nano IDs with custom alphabet, length and count, plus a collision calculator.Nginx Config GeneratorBuild an nginx server block: static site, SPA, reverse proxy or PHP, with SSL, gzip and redirects.OpenAPI / Swagger ViewerView OpenAPI 2/3 JSON or YAML as interactive API docs with validation and an endpoint list.PKCE Code Challenge GeneratorGenerate an OAuth 2.0 PKCE code_verifier and S256 code_challenge, build auth URLs, verify pairs.README GeneratorFill in a form and get a polished README.md with badges, install, usage and license, live preview.Regex GeneratorBuild regular expressions visually from blocks or presets (email, date, phone) and test them live.Commit Message GeneratorBuild Conventional Commit messages with type, scope, body, breaking change and issue refs.Database Schema DesignerDesign tables and relationships visually, then export SQL for MySQL, PostgreSQL or SQLite.Docker Compose GeneratorBuild a docker-compose.yml with a form: services, ports, volumes, env, healthchecks and presets.Dummy File GeneratorCreate test files of an exact size in KB, MB or GB with zeros, random bytes or text.Dockerignore GeneratorBuild a .dockerignore from Node, Python, Go and Java templates, plus your own entries.Git Branch Name GeneratorTurn a ticket ID and title into a clean, valid git branch name like feature/PROJ-12-add-login.GitLab CI Config GeneratorGenerate a .gitlab-ci.yml with stages, jobs, images, cache, artifacts and rules from templates.Jinja2 Template TesterRender Jinja2 templates with YAML or JSON variables using real Jinja2, with clear error lines.JSON Schema Mock Data GeneratorGenerate realistic sample JSON from a JSON Schema: formats, patterns, $ref, seeds and counts.Kubernetes Secret GeneratorCreate Kubernetes Secret YAML from key/value pairs or .env with auto base64, or decode one.Kubernetes YAML ValidatorValidate Kubernetes manifests against the API schema of a chosen version, with error paths.Quartz Cron GeneratorBuild and explain Quartz and Spring cron expressions with seconds, ?, L, W and #, plus next fire times.README Badge GeneratorCreate Shields.io-style README badges for license, version, build and custom labels.Systemd Service File GeneratorCreate a systemd .service unit with ExecStart, user, restart policy, environment and hardening.tsconfig.json GeneratorBuild a tsconfig.json with target, module, strict checks and path aliases, each option explained.Access Log AnalyzerAnalyze Apache and Nginx access logs: top URLs, IPs, status codes, bots and traffic charts.Regex String GeneratorGenerate random test strings that match any regular expression, checked against the real regex.ASCII Table GeneratorTurn CSV or pasted cells into plain-text tables: MySQL, Markdown, Unicode box and reST styles.FFmpeg Command GeneratorPick a task and options, get the exact ffmpeg command with every flag explained.Folder Tree GeneratorTurn a local folder or an indented list into an ASCII directory tree for your README.GitHub Actions Workflow GeneratorBuild a GitHub Actions CI workflow: triggers, matrix, caching, tests, Pages or Docker deploy.Kubernetes YAML GeneratorGenerate Deployment, Service, Ingress, ConfigMap, Secret and HPA manifests with safe defaults.Markdown TOC GeneratorGenerate a linked table of contents from Markdown headings with GitHub-style anchors.OpenAPI EditorEdit OpenAPI/Swagger YAML or JSON side by side with live API docs, validation and download.OpenAPI ValidatorValidate OpenAPI 3.0/3.1 and Swagger 2.0 specs: schema errors, broken $refs, line numbers.Pivot Table MakerBuild pivot tables from CSV or Excel by drag and drop: sum, count, average, charts, export.SQL Query BuilderBuild SELECT queries visually: joins, filters, GROUP BY, ORDER BY and LIMIT, as clean SQL.Truth Table GeneratorType a logic expression and get its full truth table, minterms and canonical DNF/CNF.TypeScript PlaygroundWrite TypeScript with live type checking, see the compiled JavaScript and run it in your browser.Article Schema GeneratorCreate Article, BlogPosting or NewsArticle JSON-LD with headline, authors, dates and images.Event Schema GeneratorCreate Event JSON-LD with dates, venue or online location, tickets, organizer and performers.Google Search Query BuilderBuild advanced Google searches with site:, filetype:, intitle:, exact phrases and date operators.HowTo Schema GeneratorCreate HowTo JSON-LD with steps, tools, supplies, total time and cost, then copy it.Htaccess GeneratorBuild an Apache .htaccess file: HTTPS, www, gzip, caching, error pages, IP blocks, hotlinks.
    See all 85 Code Generators & Builders →