ESLint Config Recommended
raw JSON → 4.1.0 verified Sat Apr 25 auth: no javascript maintenance
A pluggable ESLint configuration pack for ES.Next (ES2015+), Node.js, and React Native. Version 4.1.0 supports ESLint 6.x. Provides pre-defined configs (esnext, node, react-native) with optional style-guide variants. Unlike many single-purpose configs, this package combines multiple environments and can be extended/overridden per rule. Allows granular installation of individual configs (eslint-config-esnext, eslint-config-node, eslint-config-react-native). Last release appears stale; check for newer versions or consider modern alternatives like eslint-config-airbnb or eslint-config-standard.
Common errors
error Configuration for rule "no-unused-vars" is invalid ↓
cause The rule options may be incompatible with your config version.
fix
Check rule options in the official ESLint documentation and adjust accordingly.
error Cannot find module 'eslint-config-recommended' ↓
cause Package not installed or not in node_modules.
fix
Run npm install --save-dev eslint-config-recommended.
Warnings
deprecated ESLint v6 is end-of-life; config may not support newer ESLint versions. ↓
fix Consider migrating to a actively maintained config like eslint-config-airbnb or eslint-config-standard.
gotcha Config files must use 'recommended/' prefix in extends array; otherwise ESLint looks for separate packages. ↓
fix Use extends: ['recommended/esnext'] instead of extends: ['esnext'].
gotcha Configs are opinionated and enable many rules; may conflict with your codebase. ↓
fix Override specific rules in your .eslintrc to disable or adjust.
Install
npm install eslint-config-recommended yarn add eslint-config-recommended pnpm add eslint-config-recommended Imports
- eslint-config-recommended wrong
import config from 'eslint-config-recommended'correctIn .eslintrc.*: extends: ['recommended/esnext'] or require('eslint-config-recommended') - recommended/esnext wrong
extends: ['esnext']correctextends: ['recommended/esnext'] - recommended/react-native wrong
extends: ['react-native']correctextends: ['recommended/react-native']
Quickstart
// .eslintrc.json
{
"extends": ["recommended/esnext", "recommended/esnext/style-guide"],
"rules": {
"no-console": "off"
}
}
// install
npm install --save-dev eslint-config-recommended eslint