{"id":19583,"library":"eslint-config-sentry-react","title":"Sentry ESLint Config for React","description":"Shared ESLint configuration (v2.10.0) used across Sentry's frontend (React) projects. It extends a base config with rules for eslint-plugin-import and eslint-plugin-react, plus Jest rules. Released as part of a monorepo; cadence is intermittent, tied to Sentry internal needs. Differentiators: purpose-built for Sentry's code style; includes presets for React and Jest out of the box. Peer dependencies: eslint >=8, eslint-plugin-jest ^27.1.3, eslint-plugin-react ^7.31.10, eslint-plugin-import ^2.26.0.","status":"active","version":"2.10.0","language":"javascript","source_language":"en","source_url":"https://github.com/getsentry/eslint-config-sentry","tags":["javascript","eslint","eslint-config","sentry"],"install":[{"cmd":"npm install eslint-config-sentry-react","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-config-sentry-react","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-config-sentry-react","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency: core linting engine","package":"eslint","optional":false},{"reason":"peer dependency: Jest rules","package":"eslint-plugin-jest","optional":false},{"reason":"peer dependency: React rules","package":"eslint-plugin-react","optional":false},{"reason":"peer dependency: import rules","package":"eslint-plugin-import","optional":false}],"imports":[{"note":"Use 'sentry' (short name) in .eslintrc; 'eslint-config-sentry' works but 'sentry' is idiomatic.","wrong":"extends: ['eslint-config-sentry']","symbol":"sentry","correct":"extends: ['sentry'] in .eslintrc"},{"note":"Includes React and import plugin rules; 'sentry/base' also exists but is rarely used alone.","wrong":"extends: ['sentry-app']","symbol":"sentry/app","correct":"extends: ['sentry/app'] in .eslintrc"},{"note":"Adds Jest rules; combine with 'sentry/app' for full setup.","wrong":"extends: ['sentry-jest']","symbol":"sentry/jest","correct":"extends: ['sentry/jest'] in .eslintrc"}],"quickstart":{"code":"npm install -D eslint-config-sentry-react eslint@8 eslint-plugin-jest@^27.1.3 eslint-plugin-react@^7.31.10 eslint-plugin-import@^2.26.0\n# .eslintrc.json\n{\n  \"extends\": [\"sentry/app\", \"sentry/jest\"],\n  \"rules\": {}\n}","lang":"javascript","description":"Install package with peer deps and configure .eslintrc to use Sentry React and Jest presets."},"warnings":[{"fix":"Upgrade eslint to v8 or later.","message":"v2 requires eslint >=8; v1 used eslint <8.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Pin eslint-plugin-jest to ^27.1.3 or update peer range.","message":"eslint-plugin-jest v27.1.3 is specific; newer plugin versions may conflict.","severity":"deprecated","affected_versions":">=2.0.0"},{"fix":"Edit node_modules/eslint-config-sentry-react/react.js or override via settings.react.version in .eslintrc.","message":"The 'react.js' file stores a hardcoded React version; if you upgrade React, update that file manually.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure ESLint is configured to handle ESM configs (e.g., use .eslintrc.cjs or set type:\"module\" in package.json).","message":"Configuration outputs are ESM, but many ESLint configs are CJS; might cause loading issues in older ESLint.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Set extends to 'sentry/app' instead of 'sentry'.","message":"Extending 'sentry' alone does not include React rules; use 'sentry/app' for React projects.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Ensure all peer deps are installed: npm install -D eslint-config-sentry-react eslint@8 eslint-plugin-jest@^27.1.3 eslint-plugin-react@^7.31.10 eslint-plugin-import@^2.26.0","cause":"Missing peer dependencies or npm can't resolve the config.","error":"Error: eslint-config-sentry-react not found"},{"fix":"Override the rule in your .eslintrc: 'react/prop-types': 'off' or adjust accordingly.","cause":"The config sets a rule that conflicts with your project's settings.","error":"Configuration for rule 'react/prop-types' is invalid"},{"fix":"Install eslint-plugin-jest@^27.1.3.","cause":"eslint-plugin-jest not installed.","error":"Failed to load plugin 'jest' declared in 'sentry/jest'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}