Draft
Conversation
Replace ESLint with oxlint for ~430x faster linting (30s → 70ms). Follows the same pattern as sentry-javascript#19134. Changes: - Add .oxlintrc.json with rule parity to the previous ESLint config - Use jsPlugins for @sentry-internal/eslint-plugin-sdk custom rules - Migrate all eslint-disable comments to oxlint-disable format - Remove unused disable directives (rules already off in config) - Remove ESLint dependencies and config files - Clean up ESLint-related yarn resolutions Known gaps (same as sentry-javascript): - No import sorting (simple-import-sort has no oxlint equivalent) - No naming-convention, member-ordering, explicit-member-accessibility - sdk/no-regexp-constructor disabled (inline disable not supported for jsPlugin rules) Closes #5615 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog.
🤖 This preview updates automatically when you update the PR. |
Contributor
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📢 Type of change
📜 Description
Replace ESLint with oxlint for dramatically faster linting. Follows the same migration pattern as sentry-javascript#19134.
What changed
.oxlintrc.jsonwith rule parity to the previous ESLint configjsPlugins(experimental) for@sentry-internal/eslint-plugin-sdkcustom rules (no-eq-empty,no-focused-tests,no-skipped-tests,no-class-field-initializers,no-regexp-constructor)eslint-disableinline comments tooxlint-disableformateslint,@typescript-eslint/*,eslint-plugin-react,eslint-plugin-react-native,@sentry-internal/eslint-config-sdk)Performance
Known gaps (same as sentry-javascript)
These rules have no oxlint equivalent and are dropped:
simple-import-sort/imports— import ordering will need manual attention@typescript-eslint/naming-convention— PascalCase types,_prefix on private members@typescript-eslint/member-ordering— class field/method ordering@typescript-eslint/explicit-member-accessibility— public/private/protected keywords@typescript-eslint/unified-signatures— overload consolidation@typescript-eslint/typedef— type annotation enforcementjsPlugin inline disable limitation
Oxlint's experimental
jsPluginsfeature does not yet support inline disable comments (oxlint-disable-next-line) for JS plugin rules. This affects:sdk/no-regexp-constructor— disabled in config; only 2 intentional uses exist with comments explaining whysdk/no-skipped-tests— set towarninstead oferror; 1 intentionaltest.skipexistsNot an issue
eslint-plugin-react-native— was included as a plugin but no rules from it were actually enabled, so dropping it has zero impact💡 Motivation and Context
ESLINT_USE_FLAT_CONFIG=falseto avoid the flat config migration. ESLint 10 will drop legacy config support entirely.Closes #5615
💚 How did you test it?
oxlintruns clean (0 errors, 6 warnings: 5no-explicit-any+ 1no-skipped-tests— matching previous ESLint behavior)yarn buildpasseseslint-disablecomments📝 Checklist
sendDefaultPIIis enabled🔮 Next steps
sdk/no-regexp-constructoras error andsdk/no-skipped-testsas error--deny-warningsonce theno-explicit-anywarnings are resolved