Conversation
Replace ESLint with oxlint for ~430x faster linting (30s → 70ms). Follows the same pattern as sentry-javascript#19134. Changes: - Add .oxlintrc.json with rule parity to the previous ESLint config - Use jsPlugins for @sentry-internal/eslint-plugin-sdk custom rules - Migrate all eslint-disable comments to oxlint-disable format - Remove unused disable directives (rules already off in config) - Remove ESLint dependencies and config files - Clean up ESLint-related yarn resolutions Known gaps (same as sentry-javascript): - No import sorting (simple-import-sort has no oxlint equivalent) - No naming-convention, member-ordering, explicit-member-accessibility - sdk/no-regexp-constructor disabled (inline disable not supported for jsPlugin rules) Closes #5615 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Removing ESLint from packages/core changed the dependency resolution tree, causing the expo sample to resolve es-iterator-helpers@1.0.19 which has a known incompatibility with eslint-plugin-react. Pinning to ^1.2.1 resolves the issue. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove ESLint from all sample apps (react-native, react-native-macos, expo) and performance test apps (TestAppPlain, TestAppSentry). Replace with lightweight oxlint configs for samples that had lint scripts. Also clean up root package.json: - Remove es-iterator-helpers resolution (no longer needed) - Remove eslint-plugin-ft-flow resolution - Remove @typescript-eslint/typescript-estree minimatch resolutions This fully removes ESLint from the repository. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Update dependabot.yml: replace typescript-eslint group with oxlint - Update VS Code extensions: replace vscode-eslint with oxlint extension - Update update-javascript.sh: remove @sentry-internal/eslint-config-sdk - Remove stale eslint-disable comments from sample apps - Update comments referencing ESLint in SDK source files - Downgrade react-hooks/exhaustive-deps to warn in sample configs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sample apps reference `npx oxlint` but oxlint was only installed in packages/core. With yarn PnP, the binary isn't available to sibling workspaces. Adding it to root devDependencies makes it available to all workspaces. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Removing direct @typescript-eslint v8 dependencies caused the transitive @typescript-eslint/typescript-estree@6.21.0 (from eslint-plugin-sdk) to resolve minimatch@9.0.3 which has known ReDoS vulnerabilities. Pin to ^9.0.7 to resolve. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…s to error The big-data.test.ts file contained only a skipped test with no running assertions. Removing it and promoting sdk/no-skipped-tests back to error since there are no more intentional test.skip usages. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace prettier with oxfmt (the Oxc formatter) across the entire repository. oxfmt has 100% prettier compatibility for JS/TS and adds built-in import sorting, recovering the simple-import-sort functionality lost in the ESLint → oxlint migration. - Add .oxfmtrc.json with same settings as .prettierrc.json + import sorting - Replace prettier with oxfmt in all package.json devDependencies - Update lint/fix scripts in packages/core and samples - Remove .prettierrc.json and .prettierignore - Update VS Code extensions recommendation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Auto-formatted all SDK source, test, script, and plugin files with oxfmt. Changes are primarily import reordering (grouping type imports, separating external from internal) and minor formatting normalization (arrow function parens consistent with arrowParens: "avoid"). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog.
🤖 This preview updates automatically when you update the PR. |
Contributor
Now that TypeScript is upgraded to 5.9.3, enable type-aware linting via oxlint --type-aware + oxlint-tsgolint. This enforces rules like no-floating-promises, unbound-method, and no-unsafe-member-access that require type information. - Add oxlint-tsgolint devDependency - Add tsconfig.lint.json for tsgolint (avoids alwaysStrict compat issue with @sentry-internal/typescript tsconfig) - Enable --type-aware and --deny-warnings in lint scripts - Disable await-thenable (not in original ESLint config, false positives on mocks) - Add oxlint-disable comments for intentional violations Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
express@4.19.2 is no longer in the dependency tree. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Resolve merge conflicts, apply oxfmt formatting to new/changed files. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
10 tasks
The merge with main lost the !__DEV__ condition in the __SENTRY_OPTIONS__ check, which would have changed behavior in dev builds by skipping native auto-initialization. Restore the guard and update tests to match main's version that properly tests dev vs release build behavior. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…re linting The `@sentry-internal/typescript/tsconfig.json` sets `alwaysStrict: false` which tsgolint rejects. Use the env var workaround from sentry-javascript. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This rule was available in oxlint but missed during the ESLint migration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use `typescript-eslint(rule-name)` format to match the rest of the codebase. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Resolves conflict in package.json: keeps oxfmt commands with the OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS env var. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…plugin/utils.ts The file-level oxlint-disable for no-unsafe-member-access was a leftover that's no longer needed — the file has no actual violations with type-aware linting enabled. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
# Conflicts: # packages/core/android/libs/replay-stubs.jar
… errors - Restore oxlint-disable for no-unsafe-member-access in plugin/utils.ts (tsgolint false positive: types `fs` as `error` with SUPPRESS_DIAGNOSTICS) - Fix lint:oxlint grep pattern from [01] to 0 so it no longer silently accepts 1 genuine lint error Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
# Conflicts: # packages/core/android/libs/replay-stubs.jar # packages/core/package.json
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Import sorting displaced the file-level oxlint-disable comment from line 1 to line 3. Move it back to the top so it applies to the entire file. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tern - Convert 3 stale eslint-disable comments for no-unnecessary-type-assertion to oxlint-disable format (touchevents.tsx, nativelinkederrors.ts) - Fix override glob "*.tsx" → "**/*.tsx" for consistency with other overrides Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
# Conflicts: # packages/core/src/js/touchevents.tsx
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
# Conflicts: # .vscode/extensions.json # package.json # packages/core/package.json # packages/core/src/js/RNSentryReplayMaskNativeComponent.ts # packages/core/src/js/RNSentryReplayUnmaskNativeComponent.ts # packages/core/src/js/feedback/FeedbackWidgetManager.tsx # packages/core/src/js/integrations/default.ts # packages/core/src/js/sdk.tsx # packages/core/src/js/tools/sentryMetroSerializer.ts # packages/core/src/js/tools/utils.ts # packages/core/src/js/tools/vendor/metro/utils.ts # packages/core/src/js/touchevents.tsx # packages/core/src/js/tracing/reactnativetracing.ts # packages/core/test/tools/sentryMetroSerializer.test.ts # packages/core/test/wrap.mocked.test.tsx # samples/expo/package.json # yarn.lock
# Conflicts: # package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

📢 Type of change
📜 Description
Replace prettier with oxfmt (the Oxc formatter) across the entire repository. oxfmt has 100% prettier compatibility for JS/TS and adds built-in import sorting, recovering the
simple-import-sortfunctionality lost in the oxlint migration (#5867).What changed
.oxfmtrc.jsonwith the same formatting options as.prettierrc.json+ import sorting configpackage.jsondevDependencies and lint/fix scripts.prettierrc.jsonand.prettierignoreFormatting changes
The bulk of the diff is import reordering — grouping type imports before value imports, separating external from internal, and adding blank lines between groups. A few minor formatting normalizations (arrow function parens consistent with
arrowParens: "avoid", whitespace fixes) are also included.Import sorting config
Performance
Status
oxfmt is in beta (v0.42.0) but has 1.7M weekly npm downloads and passes 100% of prettier's JS/TS conformance tests. sentry-javascript already migrated (#19200). Also adopted by Vue.js, Turborepo, and Hugging Face.
💡 Motivation and Context
simple-import-sortfunctionality lost in oxlint migration (chore: Migrate from ESLint to oxlint #5867)Closes #5878
💚 How did you test it?
yarn lintpasses (all 4 lerna projects)oxfmt --checkreports zero formatting issuesoxlint --type-awarereports zero errors📝 Checklist
sendDefaultPIIis enabled🔮 Next steps