Commit 5eb7843
chore: Replace prettier with oxfmt (#5880)
* chore(core): Migrate from ESLint to oxlint
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>
* chore(core): Add sdk/no-focused-tests and sdk/no-skipped-tests rules
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: Pin es-iterator-helpers to ^1.2.1 for sample app ESLint compat
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>
* chore: Migrate sample apps and perf tests from ESLint to oxlint
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>
* chore: Clean up remaining ESLint references across the repo
- 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>
* fix: Add oxlint to root devDependencies for workspace resolution
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>
* fix: Pin minimatch for @typescript-eslint/typescript-estree to ^9.0.7
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>
* ci: Retrigger checks
* chore: Replace prettier with oxfmt
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>
* style(core): Apply oxfmt formatting and import sorting
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>
* Merge main into antonis/oxlint
* chore(core): Enable type-aware linting with oxlint-tsgolint
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>
* chore: Remove stale express/path-to-regexp resolution
express@4.19.2 is no longer in the dependency tree.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(core): Restore __DEV__ guard for native auto-initialization
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>
* Restore rule
* fix(core): Suppress tsgolint tsconfig diagnostics for oxlint type-aware 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>
* chore(core): Add typescript/unified-signatures rule to oxlint config
This rule was available in oxlint but missed during the ESLint migration.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* style(core): Use consistent oxlint disable comment format
Use `typescript-eslint(rule-name)` format to match the rest of the codebase.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore(core): Remove unnecessary no-unsafe-member-access disable from 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>
* fix(core): Restore utils.ts disable and fix lint script to reject all 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>
* fix(core): Move oxlint-disable above sorted imports in default.ts
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>
* fix(core): Migrate remaining eslint-disable comments and fix glob pattern
- 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>
* style(core): Reformat touchevents.tsx with oxfmt
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent fdf2e8a commit 5eb7843
File tree
210 files changed
+1263
-546
lines changed- .vscode
- packages/core
- plugin/src
- src/js
- feedback
- integrations
- playground
- profiling
- replay
- tools
- vendor/metro
- tracing
- integrations
- transports
- utils
- test
- expo-plugin
- feedback
- integrations
- mocks
- playground
- profiling
- replay
- tools
- tracing
- integrations
- stallTracking
- transports
- utils
- performance-tests
- TestAppPlain
- TestAppSentry
- samples
- expo
- react-native-macos
- react-native
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
210 files changed
+1263
-546
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | | - | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | | - | |
43 | | - | |
| 42 | + | |
| 43 | + | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
108 | 109 | | |
109 | 110 | | |
110 | | - | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
4 | 8 | | |
5 | 9 | | |
6 | 10 | | |
7 | 11 | | |
8 | | - | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
0 commit comments