Repository navigation
Replace ESLint with oxlint and graphql-inspector - #12359
Merged
Merged
Conversation
- Add .oxlintrc.json (migrated from the ESLint config); eslint-plugin-i18next runs as an oxlint jsPlugin - Validate .graphql documents with graphql-inspector (deprecated-field warnings, max depth 10) via `yarn lint:graphql` - Remove ESLint, its plugins/configs, and eslint.config.mjs - Remove dangling `#import` comments from .graphql files (unused by codegen, and they broke the graphql-tools loader and VSCode) - Update the static analysis workflow and lint-staged accordingly Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Test casts over optional chains now use `| undefined` with `?.` - Drop unused variables/catch bindings - Stop reading refs during render (useValidatableForm, FormPresenter, MaximumEventSignupsInput); scrollToItem now resolves the ref when called, which also fixes it being a no-op on the first render - Replace set-state-in-effect with derived state or render-time state adjustment (DateTimeInput, FileInputWithPreview, TicketPurchaseForm, MaximumEventSignupsInput, OpenLayersMap) - Remove the unused, impure return value from toggleRunDetailsVisibility - Avoid constructing JSX inside try/catch in FreeTextItemDisplay Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Cover DateTimeInput, MaximumEventSignupsInput, FileInputWithPreview and OpenLayersMap, including syncing state from props and the stale-preview and latest-onChange cases. Verified against the pre-refactor components and with mutations of the new code. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
Code Coverage Report: Only Changed Files listed
Minimum allowed coverage is |
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.
Summary
Replaces ESLint with oxlint for JS/TS, and with graphql-inspector for
.graphqlfiles. This supersedes the failed ESLint 10 Renovate PR (#11492)..oxlintrc.json, generated by@oxlint/migratefrom the old ESLint config and then trimmed.eslint-plugin-i18nextruns as an oxlintjsPlugin(801 warnings, vs 797 under ESLint).eslint.config.mjs,eslint, and 20+ ESLint plugins/configs are removed..graphql, so@graphql-eslintis replaced bygraphql-inspector validate(yarn lint:graphql: deprecated-field warnings,--maxDepth 10).#importcomments removed from 63.graphqlfiles. Codegen ignores them, but they broke the graphql-tools loader that graphql-inspector uses (and VSCode).eslintjob (Reviewdog) is now alintjob runningoxlint --format=githubandyarn lint:graphql. lint-staged runsoxlint --fix.refs,set-state-in-effect,immutability,error-boundaries) andno-unsafe-optional-chaining/no-unused-vars. Notably,scrollToItemin the form presenter read a ref during render, so it was a no-op until something re-rendered; it now resolves the ref when called.DateTimeInput,MaximumEventSignupsInput,FileInputWithPreview,OpenLayersMap), verified against the pre-refactor code and by mutating the new code.Things to know
eslinttolint. If branch protection requireseslint, it needs updating before merge.strict-id-in-typesonschema.graphqland the per-field depth exemptions have no graphql-inspector equivalent. Max depth is now 10 (Inspector counts depth differently;Reports/queries.graphqlfails at 8 and 9).no-undefandreact/require-render-returnare nursery-only in oxlint; theimport/resolversettings aren't carried over;eslint-config-prettieris gone with ESLint (oxlint has no formatting rules).TicketPurchaseForm(auto-selecting the only available product) was also refactored but isn't covered by new tests.Test plan
yarn oxlint app/javascript test/javascript: 0 errors (warnings only)yarn lint:graphql: exits 0yarn ts:checkyarn vitest run: 1592 passed, 1 skipped (pre-existing)lintjob passesCloses #11492
🤖 Generated with Claude Code