Skip to content

Menu

ESLint Config Generator

Generate ESLint flat or legacy configs with TypeScript, React and Prettier.

Runs entirely in your browserDevOpsFree, no sign-up
Loading tool

01What is ESLint Config Generator?

Setting up ESLint used to mean copying an .eslintrc from your last project and hoping the plugin names still matched. Since ESLint 9 the default is the flat config, a single eslint.config.mjs that exports an array of config objects. The ESLint docs describe it as the replacement for .eslintrc, and ESLint 10 drops the old format completely. This generator writes a starting flat config from four checkboxes: TypeScript, React, Next.js and Prettier. Every flat config it produces has the same base. It imports defineConfig from eslint/config, starts with js.configs.recommended from @eslint/js, and adds browser and Node globals through the globals package. That way window or process does not trip the no-undef rule. Ticking TypeScript adds ...tseslint.configs.recommended from the typescript-eslint package. Ticking React adds eslint-plugin-react's flat recommended and jsx-runtime configs, with the React version set to detect. Next.js changes the picture. With it ticked, the tool imports eslint-config-next/core-web-vitals, plus eslint-config-next/typescript when TypeScript is on. Those configs already bundle the React, React Hooks and Next rules, so the separate React plugin and typescript-eslint entries are left out. Prettier adds eslint-config-prettier/flat near the end of the array, after the presets, so it can switch off formatting rules that would fight with Prettier. An empty rules block closes the array for your own settings. Under the config you get a matching npm install command. When React or Next.js is ticked, it pins eslint@9 and @eslint/js@9, because eslint-plugin-react only declares peer support up to ESLint 9. A plain JavaScript or TypeScript setup installs the current eslint. A quick example. With the defaults, TypeScript and Prettier, the install line is npm install --save-dev eslint @eslint/js globals typescript-eslint typescript eslint-config-prettier. The Legacy .eslintrc (ESLint 8) tab writes a .eslintrc.json with root, extends, an optional TypeScript parser and empty rules. Use it only for a project that cannot upgrade yet. Limits to know: in flat mode the React box does nothing once Next.js is ticked. There are no Vue, Svelte, Node-only or type-aware presets. The legacy React output also leaves out the react version setting, so the plugin warns until you add it. Everything is generated in your browser.

JavaScript and TypeScript developers starting a project, or migrating one off .eslintrc, who want a short flat config and the exact packages to install. The tool runs entirely in your browser, so your data never leaves your device.

02How to use ESLint Config Generator

  1. Keep Flat config (ESLint 9/10) selected, or switch to Legacy .eslintrc (ESLint 8) for an older project.
  2. Tick TypeScript, React, Next.js and Prettier to match your stack. TypeScript and Prettier start ticked.
  3. Click the copy icon and save the text as eslint.config.mjs (or .eslintrc.json) in the project root.
  4. Run the command shown under Install command.
  5. Add your own settings to the empty rules block, then run npx eslint . to check that it loads.

03Worked examples

Input: Flat config, TypeScript + Prettier (the defaults)
Result: export default defineConfig([ js.configs.recommended, { languageOptions: { globals: { ...globals.browser, ...globals.node } } }, ...tseslint.configs.recommended, prettier, { rules: { … } }, ]); npm install --save-dev eslint @eslint/js globals typescript-eslint typescript eslint-config-prettier
Import lines left out and the rules block shortened.
Input: Flat config, React only
Result: react.configs.flat.recommended, react.configs.flat["jsx-runtime"], { settings: { react: { version: "detect" } } }, npm install --save-dev eslint@9 @eslint/js@9 globals eslint-plugin-react
Only the React entries of the array are shown. Ticking React pins ESLint 9.
Input: Flat config, TypeScript + Next.js
Result: ...nextVitals, ...nextTs, npm install --save-dev eslint@9 @eslint/js@9 globals eslint-config-next typescript
Only the Next entries are shown. typescript-eslint is not installed separately here.
Input: Flat config, nothing ticked
Result: export default defineConfig([ js.configs.recommended, { languageOptions: { globals: { ...globals.browser, ...globals.node } } }, { rules: { … } }, ]); npm install --save-dev eslint @eslint/js globals
Import lines left out and the rules block shortened.
Input: Legacy .eslintrc, TypeScript + Prettier
Result: { "root": true, "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"], "parser": "@typescript-eslint/parser", "rules": {} } npm install --save-dev eslint@8 @typescript-eslint/parser @typescript-eslint/eslint-plugin typescript eslint-config-prettier
The JSON is shown on one line here. The tool prints it indented.
Input: Legacy .eslintrc, React + Next.js + Prettier
Result: "extends": ["eslint:recommended", "plugin:react/recommended", "next/core-web-vitals", "prettier"] npm install --save-dev eslint@8 eslint-plugin-react eslint-config-next@15 eslint-config-prettier
Only the extends array is shown. The legacy tab pins eslint-config-next@15.

04Common use cases

  • Adding ESLint to a fresh TypeScript library without digging through an old repo for a config to copy
  • Moving a Next.js app from .eslintrc to eslint.config.mjs now that the flat format is the default
  • Checking which packages to install for a React project, including the eslint@9 pin it needs
  • Adding eslint-config-prettier to an existing setup and seeing where it belongs in the array
  • Producing a .eslintrc.json for a legacy project that is still pinned to ESLint 8
  • Giving a junior developer a minimal, readable config they can extend rule by rule

05Tips

  • Keep the Prettier entry after the other presets. Flat config applies objects in order, so eslint-config-prettier can only turn off rules that earlier entries switched on.
  • The typescript-eslint recommended preset does not use type information, so it stays fast. Its recommendedTypeChecked variant catches more bugs but needs parserOptions.projectService.
  • If you only target Node or only the browser, delete the other half of the globals line. Then an accidental document in server code still gets flagged by no-undef.
  • On the legacy tab with React ticked, add settings.react.version set to detect yourself. The generated file does not include it.

06Related concepts

ESLint flat config, defineConfig, typescript-eslint, eslint-config-prettier, eslint-config-next.

Frequently Asked Questions

What is ESLint Config Generator?

ESLint Config Generator is a free, browser-based developer tool on AIDToolStack. Generate ESLint flat or legacy configs with TypeScript, React and Prettier. It requires no installation or sign-up and works entirely in your browser.

Is ESLint Config Generator free to use?

Yes. No sign-up, no fees and no usage cap.

Does ESLint Config Generator store my data?

No. It runs in your browser; nothing is uploaded.

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…

What changed in AI dev tools, once a month

Renames, shutdowns, pricing changes and new MCP setups, each with a source.

Subscribe