{"id":20002,"library":"eslint-stylistic-airbnb","title":"eslint-stylistic-airbnb","description":"ESLint shareable config that enforces the Airbnb style guide using ESLint Stylistic for formatting instead of Prettier. Current version 3.1.0 supports ESLint >=8.57 (including v9) and offers both flat config (ESM) and legacy config formats. Key differentiators: modular addon system for JavaScript, TypeScript, React, Vue, and JSX; replaces deprecated eslint-config-airbnb rules; provides ready-to-use presets with zero configuration. Active development with frequent releases. Ships TypeScript types.","status":"active","version":"3.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/Solant/eslint-stylistic-airbnb","tags":["javascript","eslint","stylistic","airbnb","config","typescript"],"install":[{"cmd":"npm install eslint-stylistic-airbnb","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-stylistic-airbnb","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-stylistic-airbnb","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency: core linter","package":"eslint","optional":false},{"reason":"peer dependency: formatting rules","package":"@stylistic/eslint-plugin","optional":false},{"reason":"peer dependency: React addon","package":"eslint-plugin-react","optional":true},{"reason":"peer dependency: Vue addon","package":"eslint-plugin-vue","optional":true},{"reason":"peer dependency: import rules","package":"eslint-plugin-import-x","optional":false}],"imports":[{"note":"Package is ESM-only. Legacy .eslintrc configs not supported in v3; use 'eslint-stylistic-airbnb/legacy' for require.","wrong":"const airbnb = require('eslint-stylistic-airbnb')","symbol":"airbnb config (default)","correct":"import airbnb from 'eslint-stylistic-airbnb'"},{"note":"Flat config names are strings under airbnb.configs; common mistake to access as property directly.","wrong":"airbnb.recommended","symbol":"flat/recommended","correct":"airbnb.configs['flat/recommended']"},{"note":"Legacy config is CommonJS; no named exports. For legacy .eslintrc with module.exports.","wrong":"import airbnbLegacy from 'eslint-stylistic-airbnb/legacy'","symbol":"legacy config","correct":"require('eslint-stylistic-airbnb/legacy')"}],"quickstart":{"code":"// eslint.config.js\nimport airbnb from 'eslint-stylistic-airbnb';\nimport globals from 'globals';\n\nexport default [\n  { ignores: ['dist'] },\n  airbnb.configs['flat/recommended'],\n  {\n    languageOptions: {\n      globals: globals.browser,\n    },\n    linterOptions: {\n      reportUnusedDisableDirectives: 'error',\n    },\n  },\n];","lang":"javascript","description":"Minimal flat config setup for JavaScript using the recommended base config."},"warnings":[{"fix":"Use airbnb.configs['flat/recommended'] instead of direct import. For legacy, use require('eslint-stylistic-airbnb/legacy').","message":"v3.0.0: Complete restructuring to modular config system. The old single config export is replaced by multiple addon configs (flat/recommended, flat/addon-typescript, etc.). The legacy path changed.","severity":"breaking","affected_versions":">=3.0.0-rc.1"},{"fix":"Upgrade ESLint to >=8.57.0.","message":"v2.0.0: Minimum ESLint version bumped to 8.57. Configs no longer compatible with ESLint <8.57.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Migrate to flat config (eslint.config.js).","message":"Legacy config (.eslintrc) is deprecated in v3.0.0+ and may be removed in future major releases.","severity":"deprecated","affected_versions":">=3.0.0"},{"fix":"Install globals as devDependency and import in your eslint.config.js.","message":"Requires globals package to be installed separately for flat config (not a direct dependency).","severity":"gotcha","affected_versions":">=3.0.0"},{"fix":"Install the relevant peer dependency when using Vue or React addons.","message":"Optional peer dependencies (eslint-plugin-react, eslint-plugin-vue) are not auto-installed. Missing them causes linting errors.","severity":"gotcha","affected_versions":">=3.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"npm install -D eslint @stylistic/eslint-plugin eslint-stylistic-airbnb globals","cause":"Package is not installed or project is using npm/yarn without installing peer deps.","error":"Error: Cannot find module 'eslint-stylistic-airbnb'"},{"fix":"Use 'eslint-stylistic-airbnb/legacy' in .eslintrc extends field.","cause":"Using require() on v3 with default export; legacy config path required.","error":"Error: Failed to load config \"airbnb\" to extend from."},{"fix":"Use airbnb.configs['flat/recommended'] as a string property access.","cause":"Accessing airbnb.configs.flat when configs is undefined (wrong import style).","error":"TypeError: Cannot read properties of undefined (reading 'flat')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}