{"id":19517,"library":"eslint-config-fbjs","title":"eslint-config-fbjs","description":"eslint-config-fbjs is an ESLint shareable config that mirrors Facebook's internal linting rules. Current stable version: 4.0.0. Released infrequently, this package provides a base configuration for JavaScript and React projects, with strict and non-strict variants. It requires peer dependencies: eslint 8.x, hermes-eslint, and plugins for babel, ft-flow, jsx-a11y, and react. Unlike many other configs, it purposely omits Facebook-specific custom rules and project-specific overrides, making it a lightweight starting point. Key differentiator: direct alignment with Facebook's open-source linting standards.","status":"active","version":"4.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/facebook/fbjs","tags":["javascript"],"install":[{"cmd":"npm install eslint-config-fbjs","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-config-fbjs","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-config-fbjs","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency for ESLint","package":"eslint","optional":false},{"reason":"peer dependency for Hermes parser","package":"hermes-eslint","optional":false},{"reason":"peer dependency for Babel support","package":"eslint-plugin-babel","optional":false},{"reason":"peer dependency for Flow type checking","package":"eslint-plugin-ft-flow","optional":false},{"reason":"peer dependency for accessibility","package":"eslint-plugin-jsx-a11y","optional":false},{"reason":"peer dependency for React rules","package":"eslint-plugin-react","optional":false}],"imports":[{"note":"Use the shorthand 'fbjs' in extends array","wrong":"extends: ['eslint-config-fbjs']","symbol":"eslint-config-fbjs","correct":"extends: ['fbjs']"},{"note":"Strict variant turns all warnings into errors","wrong":"extends: ['fbjs'] with overrides","symbol":"eslint-config-fbjs/strict","correct":"extends: ['fbjs/strict']"},{"note":"Shorthand plugin names are standard in ESLint config","wrong":"plugins: ['eslint-plugin-babel']","symbol":"Plugin: babel","correct":"plugins: ['babel']"}],"quickstart":{"code":"// Install dev dependencies\nnpm install --save-dev eslint-config-fbjs eslint-plugin-babel eslint-plugin-ft-flow eslint-plugin-jsx-a11y eslint-plugin-react eslint hermes-eslint\n\n// Create .eslintrc.json\n{\n  \"extends\": \"fbjs\",\n  \"plugins\": [\"babel\", \"ft-flow\", \"jsx-a11y\", \"react\"],\n  \"rules\": {\n    \"react/jsx-uses-vars\": \"error\"\n  }\n}\n\n// Lint a file\nnpx eslint src/**/*.js","lang":"javascript","description":"Install peer dependencies and configure ESLint with the fbjs config using the extends field."},"warnings":[{"fix":"Update ESLint to >=6.0.0 and run npm install --save-dev eslint@^6","message":"Version 2.x dropped support for ESLint <6. Upgrade ESLint if using older versions.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Use extends: 'fbjs/strict' instead of custom rules overrides","message":"The 'strict' config is now built-in; manual overrides to turn warnings to errors are unnecessary.","severity":"deprecated","affected_versions":">=3.0.0"},{"fix":"Run npm install --save-dev hermes-eslint@>=0.8.0","message":"Peer dependency hermes-eslint added in v4.0.0. Failing to install it causes eslint to fail.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Add custom rules via plugins or overrides in your .eslintrc","message":"Internal custom rules are not present in this config. Do not expect Facebook-specific rules to work.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use eslint-plugin-ft-flow instead of deprecated eslint-plugin-flowtype","message":"This config uses eslint-plugin-ft-flow for Flow type linting; it does not support eslint-plugin-flowtype.","severity":"gotcha","affected_versions":">=4.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 --save-dev eslint-plugin-babel","cause":"Missing peer dependency","error":"Error: Failed to load plugin 'babel' declared in 'fbjs': Cannot find module 'eslint-plugin-babel'"},{"fix":"npm install --save-dev eslint-config-fbjs","cause":"Missing eslint-config-fbjs module","error":"Error: Failed to load config 'fbjs' to extend from."},{"fix":"Upgrade to eslint-config-fbjs@>=3.0.0","cause":"Outdated package version (<3.0.0) that does not export 'fbjs/strict'","error":"ESLint couldn't find the config \"fbjs/strict\". Check that the name of the config is correct."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}