chore: Replace prettier with oxfmt - #5880

Merged
antonis merged 40 commits into
mainfrom
antonis/oxfmt
Mar 30, 2026
Merged

chore: Replace prettier with oxfmt#5880
antonis merged 40 commits into
mainfrom
antonis/oxfmt

Conversation

@antonis

@antonisantonis commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 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-sort functionality lost in the oxlint migration (#5867).

What changed

  • Added .oxfmtrc.json with the same formatting options as .prettierrc.json + import sorting config
  • Replaced prettier with oxfmt in all package.json devDependencies and lint/fix scripts
  • Removed .prettierrc.json and .prettierignore
  • Updated VS Code extensions recommendation
  • Auto-formatted all SDK files (~198 files, primarily import reordering)

Formatting 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

"sortImports": {
"groups": [
"type-import",
["value-builtin", "value-external"],
["type-internal", "value-internal"],
["type-parent", "type-sibling", "type-index"],
["value-parent", "value-sibling", "value-index"],
"unknown"
]
}

Performance

MetricprettieroxfmtSpeedup
Format check (285 files)~3s~70ms~40x

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

  • Recovers simple-import-sort functionality lost in oxlint migration (chore: Migrate from ESLint to oxlint #5867)
  • sentry-javascript already migrated to oxfmt (#19200)
  • ~40x faster formatting
  • Completes the Oxc toolchain adoption (oxlint for linting, oxfmt for formatting)

Closes#5878

💚 How did you test it?

  • yarn lint passes (all 4 lerna projects)
  • oxfmt --check reports zero formatting issues
  • oxlint --type-aware reports zero errors
  • Build and tests pass

📝 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

  • Monitor oxfmt for stable release (currently beta)

antonisand others added 12 commits March 23, 2026 15:30
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>
@github-actions

github-actionsBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

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: Replace prettier with oxfmt by antonis in #5880
  • chore(deps): bump brace-expansion to ^5.0.5 by antonis in #5920
  • chore(deps): bump path-to-regexp to ^8.4.0 by antonis in #5919
  • chore: Migrate from ESLint to oxlint by antonis in #5867
  • chore(deps): bump yaml to ^2.8.3 by antonis in #5921
  • chore(deps): bump activesupport to >= 7.2.3.1 by antonis in #5922
  • fix(ci): Update validate-pr action to remove draft enforcement by stephanie-anderson in #5923
  • chore(deps): bump actions/checkout from 4 to 6 by dependabot in #5916
  • chore(deps): bump getsentry/craft from 2.25.0 to 2.25.2 by dependabot in #5918
  • chore(deps): bump getsentry/craft/.github/workflows/changelog-preview.yml from 2.25.0 to 2.25.2 by dependabot in #5914
  • chore(deps): bump github/codeql-action from 4.34.1 to 4.35.1 by dependabot in #5917
  • chore(deps): bump dorny/paths-filter from 3.0.2 to 4.0.1 by dependabot in #5915
  • fix: Prevent script injection vulnerability in platform-check action by fix-it-felix-sentry in #5913
  • chore(ios): Upgrade clang-format from v20 to v22 by antonis in #5905
  • chore: Add PR validation workflow by stephanie-anderson in #5906
  • chore(deps): bump brace-expansion from 1.1.12 to 1.1.13 by dependabot in #5909
  • chore(deps): bump picomatch to fix ReDoS and method injection by antonis in #5900
  • chore(deps): update Android SDK to v8.37.1 by github-actions in #5884
  • fix(build): Update expo-handler sentry-android version in update script by antonis in #5904
  • fix(ios): synchronize RNSentryTimeToDisplay across main and bridge th… by huextrat in #5887
  • chore(deps): bump node-forge from 1.3.2 to 1.4.0 by dependabot in #5903
  • chore(deps): update Sentry Android Gradle Plugin to v6.3.0 by github-actions in #5902
  • chore(deps): bump handlebars from 4.7.8 to 4.7.9 by dependabot in #5901

🤖 This preview updates automatically when you update the PR.

@github-actions

github-actionsBot commented Mar 25, 2026

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

Generated by 🚫 dangerJS against faf0c6b

@antonisantonis linked an issue Mar 25, 2026 that may be closed by this pull request
antonisand others added 6 commits March 26, 2026 12:00
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>
@antonis
antonis marked this pull request as ready for review March 26, 2026 15:58
@antonisantonis mentioned this pull request Mar 26, 2026
10 tasks
antonisand others added 5 commits March 26, 2026 17:12
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>
antonisand others added 4 commits March 27, 2026 12:33
…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>

@lucas-zimermanlucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

antonisand others added 7 commits March 30, 2026 09:41
…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

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment thread.oxfmtrc.json
antonisand others added 4 commits March 30, 2026 10:25
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>
Base automatically changed from antonis/oxlint to mainMarch 30, 2026 13:57
# 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
@antonis
antonis merged commit 5eb7843 into mainMar 30, 2026
41 of 49 checks passed
@antonis
antonis deleted the antonis/oxfmt branch March 30, 2026 14:31
Sign up for freeto 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.

chore: Evaluate oxfmt as a prettier replacement

2 participants

@antonis@lucas-zimerman
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

chore: Replace prettier with oxfmt - #5880

Merged
antonis merged 40 commits into
mainfrom
antonis/oxfmt
Mar 30, 2026
Merged

chore: Replace prettier with oxfmt#5880
antonis merged 40 commits into
mainfrom
antonis/oxfmt

Conversation

@antonis

@antonisantonis commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 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-sort functionality lost in the oxlint migration (#5867).

What changed

  • Added .oxfmtrc.json with the same formatting options as .prettierrc.json + import sorting config
  • Replaced prettier with oxfmt in all package.json devDependencies and lint/fix scripts
  • Removed .prettierrc.json and .prettierignore
  • Updated VS Code extensions recommendation
  • Auto-formatted all SDK files (~198 files, primarily import reordering)

Formatting 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

"sortImports": {
"groups": [
"type-import",
["value-builtin", "value-external"],
["type-internal", "value-internal"],
["type-parent", "type-sibling", "type-index"],
["value-parent", "value-sibling", "value-index"],
"unknown"
]
}

Performance

MetricprettieroxfmtSpeedup
Format check (285 files)~3s~70ms~40x

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

  • Recovers simple-import-sort functionality lost in oxlint migration (chore: Migrate from ESLint to oxlint #5867)
  • sentry-javascript already migrated to oxfmt (#19200)
  • ~40x faster formatting
  • Completes the Oxc toolchain adoption (oxlint for linting, oxfmt for formatting)

Closes#5878

💚 How did you test it?

  • yarn lint passes (all 4 lerna projects)
  • oxfmt --check reports zero formatting issues
  • oxlint --type-aware reports zero errors
  • Build and tests pass

📝 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

  • Monitor oxfmt for stable release (currently beta)

antonisand others added 12 commits March 23, 2026 15:30
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>
@github-actions

github-actionsBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

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: Replace prettier with oxfmt by antonis in #5880
  • chore(deps): bump brace-expansion to ^5.0.5 by antonis in #5920
  • chore(deps): bump path-to-regexp to ^8.4.0 by antonis in #5919
  • chore: Migrate from ESLint to oxlint by antonis in #5867
  • chore(deps): bump yaml to ^2.8.3 by antonis in #5921
  • chore(deps): bump activesupport to >= 7.2.3.1 by antonis in #5922
  • fix(ci): Update validate-pr action to remove draft enforcement by stephanie-anderson in #5923
  • chore(deps): bump actions/checkout from 4 to 6 by dependabot in #5916
  • chore(deps): bump getsentry/craft from 2.25.0 to 2.25.2 by dependabot in #5918
  • chore(deps): bump getsentry/craft/.github/workflows/changelog-preview.yml from 2.25.0 to 2.25.2 by dependabot in #5914
  • chore(deps): bump github/codeql-action from 4.34.1 to 4.35.1 by dependabot in #5917
  • chore(deps): bump dorny/paths-filter from 3.0.2 to 4.0.1 by dependabot in #5915
  • fix: Prevent script injection vulnerability in platform-check action by fix-it-felix-sentry in #5913
  • chore(ios): Upgrade clang-format from v20 to v22 by antonis in #5905
  • chore: Add PR validation workflow by stephanie-anderson in #5906
  • chore(deps): bump brace-expansion from 1.1.12 to 1.1.13 by dependabot in #5909
  • chore(deps): bump picomatch to fix ReDoS and method injection by antonis in #5900
  • chore(deps): update Android SDK to v8.37.1 by github-actions in #5884
  • fix(build): Update expo-handler sentry-android version in update script by antonis in #5904
  • fix(ios): synchronize RNSentryTimeToDisplay across main and bridge th… by huextrat in #5887
  • chore(deps): bump node-forge from 1.3.2 to 1.4.0 by dependabot in #5903
  • chore(deps): update Sentry Android Gradle Plugin to v6.3.0 by github-actions in #5902
  • chore(deps): bump handlebars from 4.7.8 to 4.7.9 by dependabot in #5901

🤖 This preview updates automatically when you update the PR.

@github-actions

github-actionsBot commented Mar 25, 2026

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

Generated by 🚫 dangerJS against faf0c6b

@antonisantonis linked an issue Mar 25, 2026 that may be closed by this pull request
antonisand others added 6 commits March 26, 2026 12:00
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>
@antonis
antonis marked this pull request as ready for review March 26, 2026 15:58
@antonisantonis mentioned this pull request Mar 26, 2026
10 tasks
antonisand others added 5 commits March 26, 2026 17:12
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>
antonisand others added 4 commits March 27, 2026 12:33
…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>

@lucas-zimermanlucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

antonisand others added 7 commits March 30, 2026 09:41
…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

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment thread.oxfmtrc.json
antonisand others added 4 commits March 30, 2026 10:25
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>
Base automatically changed from antonis/oxlint to mainMarch 30, 2026 13:57
# 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
@antonis
antonis merged commit 5eb7843 into mainMar 30, 2026
41 of 49 checks passed
@antonis
antonis deleted the antonis/oxfmt branch March 30, 2026 14:31
Sign up for freeto 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.

chore: Evaluate oxfmt as a prettier replacement

2 participants

@antonis@lucas-zimerman
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

chore: Replace prettier with oxfmt - #5880

Merged
antonis merged 40 commits into
mainfrom
antonis/oxfmt
Mar 30, 2026
Merged

chore: Replace prettier with oxfmt#5880
antonis merged 40 commits into
mainfrom
antonis/oxfmt

Conversation

@antonis

@antonisantonis commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 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-sort functionality lost in the oxlint migration (#5867).

What changed

  • Added .oxfmtrc.json with the same formatting options as .prettierrc.json + import sorting config
  • Replaced prettier with oxfmt in all package.json devDependencies and lint/fix scripts
  • Removed .prettierrc.json and .prettierignore
  • Updated VS Code extensions recommendation
  • Auto-formatted all SDK files (~198 files, primarily import reordering)

Formatting 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

"sortImports": {
"groups": [
"type-import",
["value-builtin", "value-external"],
["type-internal", "value-internal"],
["type-parent", "type-sibling", "type-index"],
["value-parent", "value-sibling", "value-index"],
"unknown"
]
}

Performance

MetricprettieroxfmtSpeedup
Format check (285 files)~3s~70ms~40x

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

  • Recovers simple-import-sort functionality lost in oxlint migration (chore: Migrate from ESLint to oxlint #5867)
  • sentry-javascript already migrated to oxfmt (#19200)
  • ~40x faster formatting
  • Completes the Oxc toolchain adoption (oxlint for linting, oxfmt for formatting)

Closes#5878

💚 How did you test it?

  • yarn lint passes (all 4 lerna projects)
  • oxfmt --check reports zero formatting issues
  • oxlint --type-aware reports zero errors
  • Build and tests pass

📝 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

  • Monitor oxfmt for stable release (currently beta)

antonisand others added 12 commits March 23, 2026 15:30
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>
@github-actions

github-actionsBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

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: Replace prettier with oxfmt by antonis in #5880
  • chore(deps): bump brace-expansion to ^5.0.5 by antonis in #5920
  • chore(deps): bump path-to-regexp to ^8.4.0 by antonis in #5919
  • chore: Migrate from ESLint to oxlint by antonis in #5867
  • chore(deps): bump yaml to ^2.8.3 by antonis in #5921
  • chore(deps): bump activesupport to >= 7.2.3.1 by antonis in #5922
  • fix(ci): Update validate-pr action to remove draft enforcement by stephanie-anderson in #5923
  • chore(deps): bump actions/checkout from 4 to 6 by dependabot in #5916
  • chore(deps): bump getsentry/craft from 2.25.0 to 2.25.2 by dependabot in #5918
  • chore(deps): bump getsentry/craft/.github/workflows/changelog-preview.yml from 2.25.0 to 2.25.2 by dependabot in #5914
  • chore(deps): bump github/codeql-action from 4.34.1 to 4.35.1 by dependabot in #5917
  • chore(deps): bump dorny/paths-filter from 3.0.2 to 4.0.1 by dependabot in #5915
  • fix: Prevent script injection vulnerability in platform-check action by fix-it-felix-sentry in #5913
  • chore(ios): Upgrade clang-format from v20 to v22 by antonis in #5905
  • chore: Add PR validation workflow by stephanie-anderson in #5906
  • chore(deps): bump brace-expansion from 1.1.12 to 1.1.13 by dependabot in #5909
  • chore(deps): bump picomatch to fix ReDoS and method injection by antonis in #5900
  • chore(deps): update Android SDK to v8.37.1 by github-actions in #5884
  • fix(build): Update expo-handler sentry-android version in update script by antonis in #5904
  • fix(ios): synchronize RNSentryTimeToDisplay across main and bridge th… by huextrat in #5887
  • chore(deps): bump node-forge from 1.3.2 to 1.4.0 by dependabot in #5903
  • chore(deps): update Sentry Android Gradle Plugin to v6.3.0 by github-actions in #5902
  • chore(deps): bump handlebars from 4.7.8 to 4.7.9 by dependabot in #5901

🤖 This preview updates automatically when you update the PR.

@github-actions

github-actionsBot commented Mar 25, 2026

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

Generated by 🚫 dangerJS against faf0c6b

@antonisantonis linked an issue Mar 25, 2026 that may be closed by this pull request
antonisand others added 6 commits March 26, 2026 12:00
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>
@antonis
antonis marked this pull request as ready for review March 26, 2026 15:58
@antonisantonis mentioned this pull request Mar 26, 2026
10 tasks
antonisand others added 5 commits March 26, 2026 17:12
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>
antonisand others added 4 commits March 27, 2026 12:33
…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>

@lucas-zimermanlucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

antonisand others added 7 commits March 30, 2026 09:41
…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

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment thread.oxfmtrc.json
antonisand others added 4 commits March 30, 2026 10:25
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>
Base automatically changed from antonis/oxlint to mainMarch 30, 2026 13:57
# 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
@antonis
antonis merged commit 5eb7843 into mainMar 30, 2026
41 of 49 checks passed
@antonis
antonis deleted the antonis/oxfmt branch March 30, 2026 14:31
Sign up for freeto 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.

chore: Evaluate oxfmt as a prettier replacement

2 participants

@antonis@lucas-zimerman
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

chore: Replace prettier with oxfmt - #5880

Merged
antonis merged 40 commits into
mainfrom
antonis/oxfmt
Mar 30, 2026
Merged

chore: Replace prettier with oxfmt#5880
antonis merged 40 commits into
mainfrom
antonis/oxfmt

Conversation

@antonis

@antonisantonis commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 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-sort functionality lost in the oxlint migration (#5867).

What changed

  • Added .oxfmtrc.json with the same formatting options as .prettierrc.json + import sorting config
  • Replaced prettier with oxfmt in all package.json devDependencies and lint/fix scripts
  • Removed .prettierrc.json and .prettierignore
  • Updated VS Code extensions recommendation
  • Auto-formatted all SDK files (~198 files, primarily import reordering)

Formatting 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

"sortImports": {
"groups": [
"type-import",
["value-builtin", "value-external"],
["type-internal", "value-internal"],
["type-parent", "type-sibling", "type-index"],
["value-parent", "value-sibling", "value-index"],
"unknown"
]
}

Performance

MetricprettieroxfmtSpeedup
Format check (285 files)~3s~70ms~40x

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

  • Recovers simple-import-sort functionality lost in oxlint migration (chore: Migrate from ESLint to oxlint #5867)
  • sentry-javascript already migrated to oxfmt (#19200)
  • ~40x faster formatting
  • Completes the Oxc toolchain adoption (oxlint for linting, oxfmt for formatting)

Closes#5878

💚 How did you test it?

  • yarn lint passes (all 4 lerna projects)
  • oxfmt --check reports zero formatting issues
  • oxlint --type-aware reports zero errors
  • Build and tests pass

📝 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

  • Monitor oxfmt for stable release (currently beta)

antonisand others added 12 commits March 23, 2026 15:30
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>
@github-actions

github-actionsBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

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: Replace prettier with oxfmt by antonis in #5880
  • chore(deps): bump brace-expansion to ^5.0.5 by antonis in #5920
  • chore(deps): bump path-to-regexp to ^8.4.0 by antonis in #5919
  • chore: Migrate from ESLint to oxlint by antonis in #5867
  • chore(deps): bump yaml to ^2.8.3 by antonis in #5921
  • chore(deps): bump activesupport to >= 7.2.3.1 by antonis in #5922
  • fix(ci): Update validate-pr action to remove draft enforcement by stephanie-anderson in #5923
  • chore(deps): bump actions/checkout from 4 to 6 by dependabot in #5916
  • chore(deps): bump getsentry/craft from 2.25.0 to 2.25.2 by dependabot in #5918
  • chore(deps): bump getsentry/craft/.github/workflows/changelog-preview.yml from 2.25.0 to 2.25.2 by dependabot in #5914
  • chore(deps): bump github/codeql-action from 4.34.1 to 4.35.1 by dependabot in #5917
  • chore(deps): bump dorny/paths-filter from 3.0.2 to 4.0.1 by dependabot in #5915
  • fix: Prevent script injection vulnerability in platform-check action by fix-it-felix-sentry in #5913
  • chore(ios): Upgrade clang-format from v20 to v22 by antonis in #5905
  • chore: Add PR validation workflow by stephanie-anderson in #5906
  • chore(deps): bump brace-expansion from 1.1.12 to 1.1.13 by dependabot in #5909
  • chore(deps): bump picomatch to fix ReDoS and method injection by antonis in #5900
  • chore(deps): update Android SDK to v8.37.1 by github-actions in #5884
  • fix(build): Update expo-handler sentry-android version in update script by antonis in #5904
  • fix(ios): synchronize RNSentryTimeToDisplay across main and bridge th… by huextrat in #5887
  • chore(deps): bump node-forge from 1.3.2 to 1.4.0 by dependabot in #5903
  • chore(deps): update Sentry Android Gradle Plugin to v6.3.0 by github-actions in #5902
  • chore(deps): bump handlebars from 4.7.8 to 4.7.9 by dependabot in #5901

🤖 This preview updates automatically when you update the PR.

@github-actions

github-actionsBot commented Mar 25, 2026

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

Generated by 🚫 dangerJS against faf0c6b

@antonisantonis linked an issue Mar 25, 2026 that may be closed by this pull request
antonisand others added 6 commits March 26, 2026 12:00
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>
@antonis
antonis marked this pull request as ready for review March 26, 2026 15:58
@antonisantonis mentioned this pull request Mar 26, 2026
10 tasks
antonisand others added 5 commits March 26, 2026 17:12
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>
antonisand others added 4 commits March 27, 2026 12:33
…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>

@lucas-zimermanlucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

antonisand others added 7 commits March 30, 2026 09:41
…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

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment thread.oxfmtrc.json
antonisand others added 4 commits March 30, 2026 10:25
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>
Base automatically changed from antonis/oxlint to mainMarch 30, 2026 13:57
# 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
@antonis
antonis merged commit 5eb7843 into mainMar 30, 2026
41 of 49 checks passed
@antonis
antonis deleted the antonis/oxfmt branch March 30, 2026 14:31
Sign up for freeto 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.

chore: Evaluate oxfmt as a prettier replacement

2 participants

@antonis@lucas-zimerman
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

chore: Replace prettier with oxfmt - #5880

Merged
antonis merged 40 commits into
mainfrom
antonis/oxfmt
Mar 30, 2026
Merged

chore: Replace prettier with oxfmt#5880
antonis merged 40 commits into
mainfrom
antonis/oxfmt

Conversation

@antonis

@antonisantonis commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 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-sort functionality lost in the oxlint migration (#5867).

What changed

  • Added .oxfmtrc.json with the same formatting options as .prettierrc.json + import sorting config
  • Replaced prettier with oxfmt in all package.json devDependencies and lint/fix scripts
  • Removed .prettierrc.json and .prettierignore
  • Updated VS Code extensions recommendation
  • Auto-formatted all SDK files (~198 files, primarily import reordering)

Formatting 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

"sortImports": {
"groups": [
"type-import",
["value-builtin", "value-external"],
["type-internal", "value-internal"],
["type-parent", "type-sibling", "type-index"],
["value-parent", "value-sibling", "value-index"],
"unknown"
]
}

Performance

MetricprettieroxfmtSpeedup
Format check (285 files)~3s~70ms~40x

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

  • Recovers simple-import-sort functionality lost in oxlint migration (chore: Migrate from ESLint to oxlint #5867)
  • sentry-javascript already migrated to oxfmt (#19200)
  • ~40x faster formatting
  • Completes the Oxc toolchain adoption (oxlint for linting, oxfmt for formatting)

Closes#5878

💚 How did you test it?

  • yarn lint passes (all 4 lerna projects)
  • oxfmt --check reports zero formatting issues
  • oxlint --type-aware reports zero errors
  • Build and tests pass

📝 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

  • Monitor oxfmt for stable release (currently beta)

antonisand others added 12 commits March 23, 2026 15:30
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>
@github-actions

github-actionsBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

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: Replace prettier with oxfmt by antonis in #5880
  • chore(deps): bump brace-expansion to ^5.0.5 by antonis in #5920
  • chore(deps): bump path-to-regexp to ^8.4.0 by antonis in #5919
  • chore: Migrate from ESLint to oxlint by antonis in #5867
  • chore(deps): bump yaml to ^2.8.3 by antonis in #5921
  • chore(deps): bump activesupport to >= 7.2.3.1 by antonis in #5922
  • fix(ci): Update validate-pr action to remove draft enforcement by stephanie-anderson in #5923
  • chore(deps): bump actions/checkout from 4 to 6 by dependabot in #5916
  • chore(deps): bump getsentry/craft from 2.25.0 to 2.25.2 by dependabot in #5918
  • chore(deps): bump getsentry/craft/.github/workflows/changelog-preview.yml from 2.25.0 to 2.25.2 by dependabot in #5914
  • chore(deps): bump github/codeql-action from 4.34.1 to 4.35.1 by dependabot in #5917
  • chore(deps): bump dorny/paths-filter from 3.0.2 to 4.0.1 by dependabot in #5915
  • fix: Prevent script injection vulnerability in platform-check action by fix-it-felix-sentry in #5913
  • chore(ios): Upgrade clang-format from v20 to v22 by antonis in #5905
  • chore: Add PR validation workflow by stephanie-anderson in #5906
  • chore(deps): bump brace-expansion from 1.1.12 to 1.1.13 by dependabot in #5909
  • chore(deps): bump picomatch to fix ReDoS and method injection by antonis in #5900
  • chore(deps): update Android SDK to v8.37.1 by github-actions in #5884
  • fix(build): Update expo-handler sentry-android version in update script by antonis in #5904
  • fix(ios): synchronize RNSentryTimeToDisplay across main and bridge th… by huextrat in #5887
  • chore(deps): bump node-forge from 1.3.2 to 1.4.0 by dependabot in #5903
  • chore(deps): update Sentry Android Gradle Plugin to v6.3.0 by github-actions in #5902
  • chore(deps): bump handlebars from 4.7.8 to 4.7.9 by dependabot in #5901

🤖 This preview updates automatically when you update the PR.

@github-actions

github-actionsBot commented Mar 25, 2026

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

Generated by 🚫 dangerJS against faf0c6b

@antonisantonis linked an issue Mar 25, 2026 that may be closed by this pull request
antonisand others added 6 commits March 26, 2026 12:00
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>
@antonis
antonis marked this pull request as ready for review March 26, 2026 15:58
@antonisantonis mentioned this pull request Mar 26, 2026
10 tasks
antonisand others added 5 commits March 26, 2026 17:12
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>
antonisand others added 4 commits March 27, 2026 12:33
…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>

@lucas-zimermanlucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

antonisand others added 7 commits March 30, 2026 09:41
…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

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment thread.oxfmtrc.json
antonisand others added 4 commits March 30, 2026 10:25
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>
Base automatically changed from antonis/oxlint to mainMarch 30, 2026 13:57
# 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
@antonis
antonis merged commit 5eb7843 into mainMar 30, 2026
41 of 49 checks passed
@antonis
antonis deleted the antonis/oxfmt branch March 30, 2026 14:31
Sign up for freeto 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.

chore: Evaluate oxfmt as a prettier replacement

2 participants

@antonis@lucas-zimerman
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

chore: Replace prettier with oxfmt - #5880

Merged
antonis merged 40 commits into
mainfrom
antonis/oxfmt
Mar 30, 2026
Merged

chore: Replace prettier with oxfmt#5880
antonis merged 40 commits into
mainfrom
antonis/oxfmt

Conversation

@antonis

@antonisantonis commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 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-sort functionality lost in the oxlint migration (#5867).

What changed

  • Added .oxfmtrc.json with the same formatting options as .prettierrc.json + import sorting config
  • Replaced prettier with oxfmt in all package.json devDependencies and lint/fix scripts
  • Removed .prettierrc.json and .prettierignore
  • Updated VS Code extensions recommendation
  • Auto-formatted all SDK files (~198 files, primarily import reordering)

Formatting 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

"sortImports": {
"groups": [
"type-import",
["value-builtin", "value-external"],
["type-internal", "value-internal"],
["type-parent", "type-sibling", "type-index"],
["value-parent", "value-sibling", "value-index"],
"unknown"
]
}

Performance

MetricprettieroxfmtSpeedup
Format check (285 files)~3s~70ms~40x

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

  • Recovers simple-import-sort functionality lost in oxlint migration (chore: Migrate from ESLint to oxlint #5867)
  • sentry-javascript already migrated to oxfmt (#19200)
  • ~40x faster formatting
  • Completes the Oxc toolchain adoption (oxlint for linting, oxfmt for formatting)

Closes#5878

💚 How did you test it?

  • yarn lint passes (all 4 lerna projects)
  • oxfmt --check reports zero formatting issues
  • oxlint --type-aware reports zero errors
  • Build and tests pass

📝 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

  • Monitor oxfmt for stable release (currently beta)

antonisand others added 12 commits March 23, 2026 15:30
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>
@github-actions

github-actionsBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

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: Replace prettier with oxfmt by antonis in #5880
  • chore(deps): bump brace-expansion to ^5.0.5 by antonis in #5920
  • chore(deps): bump path-to-regexp to ^8.4.0 by antonis in #5919
  • chore: Migrate from ESLint to oxlint by antonis in #5867
  • chore(deps): bump yaml to ^2.8.3 by antonis in #5921
  • chore(deps): bump activesupport to >= 7.2.3.1 by antonis in #5922
  • fix(ci): Update validate-pr action to remove draft enforcement by stephanie-anderson in #5923
  • chore(deps): bump actions/checkout from 4 to 6 by dependabot in #5916
  • chore(deps): bump getsentry/craft from 2.25.0 to 2.25.2 by dependabot in #5918
  • chore(deps): bump getsentry/craft/.github/workflows/changelog-preview.yml from 2.25.0 to 2.25.2 by dependabot in #5914
  • chore(deps): bump github/codeql-action from 4.34.1 to 4.35.1 by dependabot in #5917
  • chore(deps): bump dorny/paths-filter from 3.0.2 to 4.0.1 by dependabot in #5915
  • fix: Prevent script injection vulnerability in platform-check action by fix-it-felix-sentry in #5913
  • chore(ios): Upgrade clang-format from v20 to v22 by antonis in #5905
  • chore: Add PR validation workflow by stephanie-anderson in #5906
  • chore(deps): bump brace-expansion from 1.1.12 to 1.1.13 by dependabot in #5909
  • chore(deps): bump picomatch to fix ReDoS and method injection by antonis in #5900
  • chore(deps): update Android SDK to v8.37.1 by github-actions in #5884
  • fix(build): Update expo-handler sentry-android version in update script by antonis in #5904
  • fix(ios): synchronize RNSentryTimeToDisplay across main and bridge th… by huextrat in #5887
  • chore(deps): bump node-forge from 1.3.2 to 1.4.0 by dependabot in #5903
  • chore(deps): update Sentry Android Gradle Plugin to v6.3.0 by github-actions in #5902
  • chore(deps): bump handlebars from 4.7.8 to 4.7.9 by dependabot in #5901

🤖 This preview updates automatically when you update the PR.

@github-actions

github-actionsBot commented Mar 25, 2026

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

Generated by 🚫 dangerJS against faf0c6b

@antonisantonis linked an issue Mar 25, 2026 that may be closed by this pull request
antonisand others added 6 commits March 26, 2026 12:00
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>
@antonis
antonis marked this pull request as ready for review March 26, 2026 15:58
@antonisantonis mentioned this pull request Mar 26, 2026
10 tasks
antonisand others added 5 commits March 26, 2026 17:12
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>
antonisand others added 4 commits March 27, 2026 12:33
…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>

@lucas-zimermanlucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

antonisand others added 7 commits March 30, 2026 09:41
…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

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment thread.oxfmtrc.json
antonisand others added 4 commits March 30, 2026 10:25
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>
Base automatically changed from antonis/oxlint to mainMarch 30, 2026 13:57
# 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
@antonis
antonis merged commit 5eb7843 into mainMar 30, 2026
41 of 49 checks passed
@antonis
antonis deleted the antonis/oxfmt branch March 30, 2026 14:31
Sign up for freeto 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.

chore: Evaluate oxfmt as a prettier replacement

2 participants

@antonis@lucas-zimerman
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

chore: Replace prettier with oxfmt - #5880

Merged
antonis merged 40 commits into
mainfrom
antonis/oxfmt
Mar 30, 2026
Merged

chore: Replace prettier with oxfmt#5880
antonis merged 40 commits into
mainfrom
antonis/oxfmt

Conversation

@antonis

@antonisantonis commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 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-sort functionality lost in the oxlint migration (#5867).

What changed

  • Added .oxfmtrc.json with the same formatting options as .prettierrc.json + import sorting config
  • Replaced prettier with oxfmt in all package.json devDependencies and lint/fix scripts
  • Removed .prettierrc.json and .prettierignore
  • Updated VS Code extensions recommendation
  • Auto-formatted all SDK files (~198 files, primarily import reordering)

Formatting 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

"sortImports": {
"groups": [
"type-import",
["value-builtin", "value-external"],
["type-internal", "value-internal"],
["type-parent", "type-sibling", "type-index"],
["value-parent", "value-sibling", "value-index"],
"unknown"
]
}

Performance

MetricprettieroxfmtSpeedup
Format check (285 files)~3s~70ms~40x

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

  • Recovers simple-import-sort functionality lost in oxlint migration (chore: Migrate from ESLint to oxlint #5867)
  • sentry-javascript already migrated to oxfmt (#19200)
  • ~40x faster formatting
  • Completes the Oxc toolchain adoption (oxlint for linting, oxfmt for formatting)

Closes#5878

💚 How did you test it?

  • yarn lint passes (all 4 lerna projects)
  • oxfmt --check reports zero formatting issues
  • oxlint --type-aware reports zero errors
  • Build and tests pass

📝 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

  • Monitor oxfmt for stable release (currently beta)

antonisand others added 12 commits March 23, 2026 15:30
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>
@github-actions

github-actionsBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

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: Replace prettier with oxfmt by antonis in #5880
  • chore(deps): bump brace-expansion to ^5.0.5 by antonis in #5920
  • chore(deps): bump path-to-regexp to ^8.4.0 by antonis in #5919
  • chore: Migrate from ESLint to oxlint by antonis in #5867
  • chore(deps): bump yaml to ^2.8.3 by antonis in #5921
  • chore(deps): bump activesupport to >= 7.2.3.1 by antonis in #5922
  • fix(ci): Update validate-pr action to remove draft enforcement by stephanie-anderson in #5923
  • chore(deps): bump actions/checkout from 4 to 6 by dependabot in #5916
  • chore(deps): bump getsentry/craft from 2.25.0 to 2.25.2 by dependabot in #5918
  • chore(deps): bump getsentry/craft/.github/workflows/changelog-preview.yml from 2.25.0 to 2.25.2 by dependabot in #5914
  • chore(deps): bump github/codeql-action from 4.34.1 to 4.35.1 by dependabot in #5917
  • chore(deps): bump dorny/paths-filter from 3.0.2 to 4.0.1 by dependabot in #5915
  • fix: Prevent script injection vulnerability in platform-check action by fix-it-felix-sentry in #5913
  • chore(ios): Upgrade clang-format from v20 to v22 by antonis in #5905
  • chore: Add PR validation workflow by stephanie-anderson in #5906
  • chore(deps): bump brace-expansion from 1.1.12 to 1.1.13 by dependabot in #5909
  • chore(deps): bump picomatch to fix ReDoS and method injection by antonis in #5900
  • chore(deps): update Android SDK to v8.37.1 by github-actions in #5884
  • fix(build): Update expo-handler sentry-android version in update script by antonis in #5904
  • fix(ios): synchronize RNSentryTimeToDisplay across main and bridge th… by huextrat in #5887
  • chore(deps): bump node-forge from 1.3.2 to 1.4.0 by dependabot in #5903
  • chore(deps): update Sentry Android Gradle Plugin to v6.3.0 by github-actions in #5902
  • chore(deps): bump handlebars from 4.7.8 to 4.7.9 by dependabot in #5901

🤖 This preview updates automatically when you update the PR.

@github-actions

github-actionsBot commented Mar 25, 2026

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

Generated by 🚫 dangerJS against faf0c6b

@antonisantonis linked an issue Mar 25, 2026 that may be closed by this pull request
antonisand others added 6 commits March 26, 2026 12:00
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>
@antonis
antonis marked this pull request as ready for review March 26, 2026 15:58
@antonisantonis mentioned this pull request Mar 26, 2026
10 tasks
antonisand others added 5 commits March 26, 2026 17:12
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>
antonisand others added 4 commits March 27, 2026 12:33
…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>

@lucas-zimermanlucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

antonisand others added 7 commits March 30, 2026 09:41
…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

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment thread.oxfmtrc.json
antonisand others added 4 commits March 30, 2026 10:25
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>
Base automatically changed from antonis/oxlint to mainMarch 30, 2026 13:57
# 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
@antonis
antonis merged commit 5eb7843 into mainMar 30, 2026
41 of 49 checks passed
@antonis
antonis deleted the antonis/oxfmt branch March 30, 2026 14:31
Sign up for freeto 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.

chore: Evaluate oxfmt as a prettier replacement

2 participants

@antonis@lucas-zimerman
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

chore: Replace prettier with oxfmt - #5880

Merged
antonis merged 40 commits into
mainfrom
antonis/oxfmt
Mar 30, 2026
Merged

chore: Replace prettier with oxfmt#5880
antonis merged 40 commits into
mainfrom
antonis/oxfmt

Conversation

@antonis

@antonisantonis commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 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-sort functionality lost in the oxlint migration (#5867).

What changed

  • Added .oxfmtrc.json with the same formatting options as .prettierrc.json + import sorting config
  • Replaced prettier with oxfmt in all package.json devDependencies and lint/fix scripts
  • Removed .prettierrc.json and .prettierignore
  • Updated VS Code extensions recommendation
  • Auto-formatted all SDK files (~198 files, primarily import reordering)

Formatting 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

"sortImports": {
"groups": [
"type-import",
["value-builtin", "value-external"],
["type-internal", "value-internal"],
["type-parent", "type-sibling", "type-index"],
["value-parent", "value-sibling", "value-index"],
"unknown"
]
}

Performance

MetricprettieroxfmtSpeedup
Format check (285 files)~3s~70ms~40x

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

  • Recovers simple-import-sort functionality lost in oxlint migration (chore: Migrate from ESLint to oxlint #5867)
  • sentry-javascript already migrated to oxfmt (#19200)
  • ~40x faster formatting
  • Completes the Oxc toolchain adoption (oxlint for linting, oxfmt for formatting)

Closes#5878

💚 How did you test it?

  • yarn lint passes (all 4 lerna projects)
  • oxfmt --check reports zero formatting issues
  • oxlint --type-aware reports zero errors
  • Build and tests pass

📝 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

  • Monitor oxfmt for stable release (currently beta)

antonisand others added 12 commits March 23, 2026 15:30
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>
@github-actions

github-actionsBot commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

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: Replace prettier with oxfmt by antonis in #5880
  • chore(deps): bump brace-expansion to ^5.0.5 by antonis in #5920
  • chore(deps): bump path-to-regexp to ^8.4.0 by antonis in #5919
  • chore: Migrate from ESLint to oxlint by antonis in #5867
  • chore(deps): bump yaml to ^2.8.3 by antonis in #5921
  • chore(deps): bump activesupport to >= 7.2.3.1 by antonis in #5922
  • fix(ci): Update validate-pr action to remove draft enforcement by stephanie-anderson in #5923
  • chore(deps): bump actions/checkout from 4 to 6 by dependabot in #5916
  • chore(deps): bump getsentry/craft from 2.25.0 to 2.25.2 by dependabot in #5918
  • chore(deps): bump getsentry/craft/.github/workflows/changelog-preview.yml from 2.25.0 to 2.25.2 by dependabot in #5914
  • chore(deps): bump github/codeql-action from 4.34.1 to 4.35.1 by dependabot in #5917
  • chore(deps): bump dorny/paths-filter from 3.0.2 to 4.0.1 by dependabot in #5915
  • fix: Prevent script injection vulnerability in platform-check action by fix-it-felix-sentry in #5913
  • chore(ios): Upgrade clang-format from v20 to v22 by antonis in #5905
  • chore: Add PR validation workflow by stephanie-anderson in #5906
  • chore(deps): bump brace-expansion from 1.1.12 to 1.1.13 by dependabot in #5909
  • chore(deps): bump picomatch to fix ReDoS and method injection by antonis in #5900
  • chore(deps): update Android SDK to v8.37.1 by github-actions in #5884
  • fix(build): Update expo-handler sentry-android version in update script by antonis in #5904
  • fix(ios): synchronize RNSentryTimeToDisplay across main and bridge th… by huextrat in #5887
  • chore(deps): bump node-forge from 1.3.2 to 1.4.0 by dependabot in #5903
  • chore(deps): update Sentry Android Gradle Plugin to v6.3.0 by github-actions in #5902
  • chore(deps): bump handlebars from 4.7.8 to 4.7.9 by dependabot in #5901

🤖 This preview updates automatically when you update the PR.

@github-actions

github-actionsBot commented Mar 25, 2026

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

Generated by 🚫 dangerJS against faf0c6b

@antonisantonis linked an issue Mar 25, 2026 that may be closed by this pull request
antonisand others added 6 commits March 26, 2026 12:00
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>
@antonis
antonis marked this pull request as ready for review March 26, 2026 15:58
@antonisantonis mentioned this pull request Mar 26, 2026
10 tasks
antonisand others added 5 commits March 26, 2026 17:12
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>
antonisand others added 4 commits March 27, 2026 12:33
…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>

@lucas-zimermanlucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

antonisand others added 7 commits March 30, 2026 09:41
…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

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment thread.oxfmtrc.json
antonisand others added 4 commits March 30, 2026 10:25
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>
Base automatically changed from antonis/oxlint to mainMarch 30, 2026 13:57
# 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
@antonis
antonis merged commit 5eb7843 into mainMar 30, 2026
41 of 49 checks passed
@antonis
antonis deleted the antonis/oxfmt branch March 30, 2026 14:31
Sign up for freeto 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.

chore: Evaluate oxfmt as a prettier replacement

2 participants

@antonis@lucas-zimerman