Sentry ESLint Config

raw JSON →
2.10.0 verified Sat Apr 25 auth: no javascript

Sentry's official ESLint shareable config for use in Sentry projects. Current stable version: 2.10.0. It extends base rules and includes configurations for React and import/export plugins via 'sentry/app'. Designed for internal Sentry development, it enforces Sentry-specific code style and best practices. The package follows semantic versioning but releases are tied to Sentry's monorepo. Use with ESLint >=8. It is not intended for external projects.

error ESLint: Failed to load config 'sentry/app' to extend in .eslintrc.json
cause eslint-config-sentry is not installed or not in node_modules.
fix
Install the package: npm install --save-dev eslint-config-sentry
error ESLint: Cannot find module 'eslint-config-sentry/app' from /path/to/project
cause The config is imported but the package is missing or version mismatch.
fix
Verify installation: npm ls eslint-config-sentry. Ensure ESLint >=8.
breaking v2.x requires ESLint >=8; ESLint 7 is not supported.
fix Upgrade ESLint to version 8 or later: npm install eslint@8 --save-dev
deprecated The 'sentry' base config (without '/app') is deprecated in favor of 'sentry/app'.
fix Use 'sentry/app' instead of 'sentry' in your extends array.
gotcha This config enforces strict import ordering and no default exports. May conflict with other presets.
fix Override rules like 'import/order' or 'import/prefer-default-export' in your own rule set.
npm install eslint-config-sentry-app
yarn add eslint-config-sentry-app
pnpm add eslint-config-sentry-app

Configure ESLint to use Sentry's base rules for app projects, including React and import plugin rules.

// .eslintrc.json
{
  "extends": ["sentry/app"],
  "rules": {
    // override rules as needed
  }
}