{"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,"search_vec":"'2.26.0':88 '27.1.3':78 '7.31.10':83 '8':73 'across':11 'base':20 'box':69 'built':54 'cadenc':43 'code':58 'config':3,21,93 'configur':8 'depend':71 'differenti':51 'eslint':2,7,26,31,72,75,80,85,90,92 'eslint-config':91 'eslint-plugin-import':25,84 'eslint-plugin-jest':74 'eslint-plugin-react':30,79 'extend':18 'frontend':14 'import':28,87 'includ':60 'intermitt':45 'intern':49 'javascript':89 'jest':35,65,77 'monorepo':42 'need':50 'part':39 'peer':70 'plugin':27,32,76,81,86 'plus':34 'preset':61 'project':16 'purpos':53 'purpose-built':52 'react':5,15,33,63,82 'releas':37 'rule':23,36 'sentri':1,12,48,56,94 'share':6 'style':59 'tie':46 'use':10 'v2.10.0':9","created_at":"2026-04-25T11:18:34.187121+00:00","updated_at":"2026-04-25T11:18:34.187121+00:00","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,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/getsentry/eslint-config-sentry","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/eslint-config-sentry-react","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}