Skip to content

chore(deps): bump eslint from 8.x to 9.x#5827

Draft
antonis wants to merge 1 commit intomainfrom
chore/bump-eslint-9
Draft

chore(deps): bump eslint from 8.x to 9.x#5827
antonis wants to merge 1 commit intomainfrom
chore/bump-eslint-9

Conversation

@antonis
Copy link
Contributor

@antonis antonis commented Mar 16, 2026

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Upgrades ESLint from v8 to v9 (latest 9.39.4) across all workspaces. This is based on the dependabot PR #5594 but done manually to handle the breaking changes properly.

Key changes:

  • ESLint: ^8.x^9.0.0 in all packages
  • @typescript-eslint/*: ^5.x/^7.x^8.0.0 (required for ESLint 9 compatibility)
  • @react-native/eslint-config: bumped to 0.84.1 (has ESLint 9-compatible sub-dependencies)
  • eslint-plugin-ft-flow: forced to ^3.0.0 via resolution (v2 uses removed ESLint 9 APIs)
  • Legacy config mode: All .eslintrc.js configs are kept as-is, using ESLINT_USE_FLAT_CONFIG=false since upstream @sentry-internal/eslint-config-sdk hasn't migrated to flat config yet
  • @typescript-eslint v8 rule changes:
    • ban-types → replaced by no-empty-object-type, no-wrapper-object-types, no-unsafe-function-type
    • no-var-requiresno-require-imports (disabled for RN code which uses dynamic requires)
    • no-unused-vars catch clause behavior changed (set caughtErrors: 'none' to match v5 behavior)
  • Auto-fixed: prefer-optional-chain violations (safe code improvements)
  • Suppressed: 3 complexity violations newly surfaced by ESLint 9's stricter counting

Why not ESLint 10?

ESLint 10.0.3 exists but is very new. Going from v8 to v10 in one jump would be two major versions. The @sentry-internal/eslint-config-sdk upstream hasn't even migrated to ESLint 9 flat config yet, so ESLint 10 (which fully removes legacy config support) would require a much bigger effort. Better to do 9 now and 10 separately later.

💡 Motivation and Context

ESLint 8 is deprecated and no longer receiving updates. ESLint 9 brings performance improvements and is required for newer plugin versions.

Fixes #5600
Ref: #5594

💚 How did you test it?

  • yarn build — passes
  • yarn test — passes
  • yarn circularDepCheck — passes
  • ESLINT_USE_FLAT_CONFIG=false lint verified for:
    • packages/core — same 7 pre-existing issues as ESLint 8 (5 no-explicit-any errors + 2 import/no-duplicates warnings)
    • samples/react-native — clean
    • samples/expo — clean
    • samples/react-native-macos — clean

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

@github-actions
Copy link
Contributor

github-actions bot commented Mar 16, 2026

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


  • chore(deps): bump eslint from 8.x to 9.x by antonis in #5827
  • fix(tracing): Fix native frames measurements dropped for idle transactions by antonis in #5813
  • feat(core): Support SENTRY_ENVIRONMENT in bare React Native builds by antonis in #5823
  • chore(deps): bump tar to ^7.5.11 by antonis in #5824
  • chore(deps): bump actions/create-github-app-token from 2.2.1 to 3.0.0 by dependabot in #5822
  • chore(deps): bump dorny/paths-filter from 3.0.2 to 4.0.1 by dependabot in #5820
  • chore(deps): bump reactivecircus/android-emulator-runner from 2.35.0 to 2.37.0 by dependabot in #5818
  • chore(deps): bump getsentry/craft/.github/workflows/changelog-preview.yml from 2.23.2 to 2.24.1 by dependabot in #5821
  • chore(deps): bump getsentry/craft from 2.23.2 to 2.24.1 by dependabot in #5819
  • chore(deps): bump undici from 6.23.0 to 6.24.1 by dependabot in #5817
  • chore(deps): bump flatted from 3.3.1 to 3.4.1 by dependabot in #5816
  • Ref: remove yarn from stub update by lucas-zimerman in #5811
  • Ref(CI): Unify stub update with android update by lucas-zimerman in #5807

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 16, 2026

Fails
🚫 Pull request is not ready for merge, please add the "ready-to-merge" label to the pull request

Generated by 🚫 dangerJS against d09f643

Upgrade ESLint from v8 to v9 across all workspaces. ESLint 9 uses flat
config by default, but we keep using legacy .eslintrc.js format via
ESLINT_USE_FLAT_CONFIG=false since upstream @sentry-internal/eslint-config-sdk
hasn't migrated yet.

Key changes:
- Bump eslint to ^9.0.0 in all packages
- Bump @typescript-eslint/* to ^8.0.0 (supports ESLint 9)
- Bump @react-native/eslint-config to 0.84.1 (ESLint 9 compatible deps)
- Replace deprecated @typescript-eslint/ban-types with new v8 rules
- Replace @typescript-eslint/no-var-requires with no-require-imports
- Set caughtErrors: 'none' for no-unused-vars (v8 changed default)
- Add ESLINT_USE_FLAT_CONFIG=false to lint/fix scripts
- Auto-fix prefer-optional-chain violations
- Force eslint-plugin-ft-flow to ^3.0.0 via resolution (ESLint 9 compat)

Ref: #5594

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@antonis antonis force-pushed the chore/bump-eslint-9 branch from ffeaf69 to d09f643 Compare March 16, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bump to ESLint 9

1 participant