eslint-config-auto

raw JSON →
0.9.0 verified Sat Apr 25 auth: no javascript

Automatically configure ESLint based on project dependencies. Version 0.9.0. Analyzes your package.json dependencies and selects appropriate Airbnb ESLint config and plugins (Babel, React, TypeScript, etc.) dynamically. Reduces manual ESLint config management. Notable for auto-detecting plugins like eslint-plugin-react, eslint-plugin-jsx-a11y, and more. Released under MIT license. Lower maintenance as of recent versions.

error Error: Failed to load plugin 'xxx' declared in 'eslint-config-auto': Cannot find module 'eslint-plugin-xxx'
cause Required plugin not installed; eslint-config-auto expects all plugins to be present in node_modules.
fix
Run the npm install command printed in the eslint output (e.g., npm install eslint-plugin-react --save-dev)
error Parsing error: Babel not found
cause Babel is required for certain syntax (JSX, Flow) but not installed or not in devDependencies.
fix
Add 'babel' to devDependencies or set settings.babel=true in .eslintrc
breaking Auto-detected plugins are not installed automatically; run the command printed on first lint.
fix Copy and paste the npm install output printed when you first run ESLint after adding eslint-config-auto.
gotcha If you customize rules, they may conflict with auto-detected plugin rules on future updates.
fix Add your custom rules after the 'auto' extends, or disable specific rules in overrides.
gotcha Babel parser is only set if babel is in devDependencies or settings.babel=true; otherwise default parser used.
fix Add babel to devDependencies or set 'babel':true in settings if using transpiled code (e.g., create-react-app).
deprecated eslint-plugin-compat is only loaded if settings.compat = true; otherwise ignored.
fix Explicitly set settings.compat = true in .eslintrc to enable compat checks.
npm install eslint-config-auto
yarn add eslint-config-auto
pnpm add eslint-config-auto

Shows install, config file setup, and typical ESLint usage with auto-detection of plugins.

// 1. Install
npm install eslint-config-auto --save-dev

// 2. Create .eslintrc.json
{
  "extends": ["auto"],
  "settings": {
    "react": { "version": "detect" },
    "compat": { "targets": ["> 1%", "last 2 versions", "not dead"] }
  }
}

// 3. Add scripts to package.json
"scripts": {
  "lint": "eslint --ext .js,.jsx,.ts,.tsx src/",
  "lint:fix": "eslint --fix --ext .js,.jsx,.ts,.tsx src/"
}

// 4. Run first lint to get install instructions for plugins
npm run lint