chore: replace ESLint with oxlint#2641
Open
joyenjoyer wants to merge 4 commits into
Open
Conversation
joyenjoyer
marked this pull request as ready for review
July 15, 2026 13:44
joyenjoyer
force-pushed
the
instui-5035-oxlint-migration
branch
from
July 15, 2026 14:18
435bcbb to
65cacf4
Compare
|
Visual regression report✅ No changes.
Baselines come from the |
joyenjoyer
force-pushed
the
instui-5035-oxlint-migration
branch
from
July 15, 2026 14:36
65cacf4 to
b1a8614
Compare
…older Move lint.ts from lib/test/ into lib/commands/, alongside the other yargs command modules (bump.ts, server.ts, etc.) it is registered with in commands/index.ts. The test/ directory is a leftover name from when ui-scripts absorbed the separate ui-test package.
Add .oxlintrc.json (workspace root and regression-test), porting the ESLint ruleset to oxlint and covering gaps with two custom rules and a jsPlugins bridge: - react-js/* (jsPlugins bridge to eslint-plugin-react): covers no-deprecated, prop-types, no-typos, require-default-props, forbid-foreign-prop-types, missing from oxlint's native react plugin. - instructure/no-relative-imports (custom): blocks relative imports that reach into another package's src, bypassing that package's public API. - notice/notice (custom): requires the MIT license header at the top of source files. - vitest/valid-expect (override, ui-truncate-text only): disabled because oxlint's vitest plugin does not recognize the chai-style assertions used in those tests. Nothing consumes oxlint yet. ESLint still runs via lint-staged, ui-scripts lint, and regression-test's lint script.
Wire oxlint into lint-staged, ui-scripts lint, and regression-test's lint script, replacing ESLint everywhere it ran. Remove ESLint's config files, its now-superseded custom plugin, and every dependency with no remaining consumer: eslint, @eslint/js, @vitest/eslint-plugin, eslint-config-prettier, eslint-import-resolver-node, eslint-module-utils, eslint-plugin-compat, eslint-plugin-jsx-a11y, eslint-plugin-notice, globals, and typescript-eslint. Keep eslint-plugin-react and read-package-up: both are still runtime dependencies of oxlint's jsPlugins bridge and custom rules, respectively.
Two disable comments reference rule names that do not match oxlint's actual rule IDs, so they silently stopped suppressing anything: - packages/__docs__/globals.ts: @instructure/no-relative-imports -> instructure/no-relative-imports. oxlint's custom rule has no @ scope prefix. - packages/ui-i18n/src/textDirectionContextConsumer.tsx: react/forbid-foreign-prop-types -> react-js/forbid-foreign-prop-types. The bridged eslint-plugin-react is aliased react-js. Delete 6 jsx_a11y/role-has-required-aria-props disable comments in TreeBrowser's TreeCollection (v1 and v2): - oxlint's rule does not require aria-selected for the treeitem role at all, unlike e.g. checkbox, which requires aria-checked, so there was nothing for these comments to suppress. oxlint accepts both jsx-a11y/* and jsx_a11y/* spellings for disable comments, so the unrelated jsx-a11y/* comments in Checkbox, FileDrop, Img, NumberInput, and RadioInput needed no change. Also trims a trailing space in one ColorPreset test title, an unrelated vitest/valid-title auto-fix.
joyenjoyer
force-pushed
the
instui-5035-oxlint-migration
branch
from
July 16, 2026 08:58
b1a8614 to
1429aaf
Compare
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
.oxlintrc.json(root +regression-test) porting the existing ESLint ruleset to oxlint's native plugins, its alphajsPluginsbridge for 5eslint-plugin-reactrules oxlint lacks natively, and two custom rules (no-relative-imports,notice) reimplemented for oxlint's JS-plugin APIlint-staged,ui-scripts lint, andregression-test's lint script; remove ESLint's config files, its superseded custom plugin, and 11 now-unused dependencies.eslint-plugin-reactandread-package-upare kept, since both are still runtime deps of oxlint'sjsPluginsbridge and custom rules.eslint-disablecomments whose rule names didn't match oxlint's actual rule IDs and had silently stopped suppressing anything; delete 6 more that are genuinely dead under oxlint'srole-has-required-aria-propsimplementationui-scripts'lint.tsout of a legacylib/test/folder intolib/commands/, alongside the other command modulesTest Plan
tsc -b,vitest, and a full-repo oxlint dry run all confirmed clean (only 5 pre-existing, unrelatedno-undeferrors remain inui-icons's.cjsconfigs, unchanged from before this PR).Fixes INSTUI-5035
🤖 Generated with Claude Code