Setup
When you run the CLI, it launches an interactive wizard. You’ll be asked a series of questions, for example:
bash
✔ Are you using TypeScript? … No / YesEach answer updates the final ESLint setup for your project. If you prefer to skip the questions, you can pass command-line options to configure everything in one step:
sh
$ npx create-airbnb-x-config --ts --react --use-pnpmsh
$ yarn dlx create-airbnb-x-config --ts --react --use-pnpmsh
$ pnpx create-airbnb-x-config --ts --react --use-pnpmThis example sets up ESLint with TypeScript + React rules and installs dependencies using pnpm.
Options
Here’s the full list of options you can use:
General
-v, --version→ Show the current CLI version.-h, --help→ Display help info.
Config Type
--extended→ Use extended configuration (modern, TypeScript-first, opinionated defaults).--legacy→ Use legacy configuration (1:1 Airbnb replacement in flat config).
Language
--ts, --typescript→ Setup for a TypeScript project.--js, --javascript→ Setup for a JavaScript project.
Prettier
--prettier→ Add Prettier integration (eslint-plugin-prettier,eslint-config-prettier).
Frameworks & Runtimes
--react→ Add React rules (eslint-plugin-react,eslint-plugin-react-hooks, andeslint-plugin-jsx-a11y).--remix, --react-router→ Same as--reactrules.--next→ Add Next.js rules (@next/eslint-plugin-next).--node→ Add Node.js rules (eslint-plugin-n).
Strict Rules
--strict-import-config→ Enable strict Import rules.--strict-react-config→ Enable strict React rules.--strict-typescript-config→ Enable strict TypeScript rules.
Legacy Config Variants
--legacy-base-config→ Legacy Base config.--legacy-react-config→ Legacy React config.--legacy-react-hooks-config→ Legacy React Hooks config.
Package Managers
--use-npm→ Use npm for installs.--use-yarn→ Use Yarn for installs.--use-pnpm→ Use pnpm for installs.--use-bun→ Use Bun for installs.
File & Install Options
--create-eslint-file→ Generateeslint.config.mjsautomatically.--skip-install→ Skip dependency installation (you’ll need to install them manually).
Why use Options instead of Interactive Prompts?
While the interactive mode is great for first-time setup (because it guides you step by step), the options (flags) are better when:
- Speed → You can skip all prompts and generate a config instantly with a single command.
- Consistency → Perfect for teams/projects where everyone should use the same ESLint setup without relying on different answers in prompts.
- Automation → Options can be used in scripts, CI pipelines, or project generators (like
create-*tools) to auto-generate ESLint configs. - Repeatability → If you’re setting up multiple projects, you don’t need to click through prompts each time, just reuse the same command.
- Customization → Options give you more fine-grained control (e.g., picking strict configs, skipping install, forcing a package manager) without extra steps.
TIP
Interactive mode is great for learning and trying things out. Options are great for speed, automation, and team-wide consistency.
