ESLint Plugin Sentry

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

An ESLint plugin for enforcing Sentry.io best practices. Version 2.10.0 is the latest stable release, with low release cadence and minimal maintenance. It provides custom ESLint rules to help developers avoid common Sentry SDK pitfalls, such as missing error boundaries or incorrect usage. Unlike other ESLint plugins, it is narrowly scoped to Sentry-specific patterns. Requires ESLint as a peer dependency. Known for limited documentation and few rules.

error Cannot find module 'eslint-plugin-sentry'
cause Missing plugin installation or incorrect import path.
fix
Run 'npm install eslint-plugin-sentry --save-dev' and ensure .eslintrc file uses 'sentry' as plugin name.
error Rule 'sentry/rule-name' not found
cause Plugin version may not include the rule, or rule name is misspelled.
fix
List available rules via 'eslint --rulesdir node_modules/eslint-plugin-sentry/rules' or check documentation.
gotcha Plugin only works with ESLint 7+ (not tested with 8/9).
fix Use ESLint 7.x or check compatibility with newer versions.
breaking No built-in rules are provided in the default installation; rules must be manually configured.
fix Refer to documentation to enable specific rules; plugin may be empty.
deprecated Package is not actively maintained; last release 2019.
fix Consider using eslint-plugin-sentry-sdk or write custom rules.
npm install eslint-plugin-sentry
yarn add eslint-plugin-sentry
pnpm add eslint-plugin-sentry

This shows a minimal ESLint configuration with sentry plugin rules enabled.

// .eslintrc.json
{
  "plugins": ["sentry"],
  "rules": {
    "sentry/no-event-handler-errors": "error",
    "sentry/no-empty-logger": "warn"
  }
}