Skip to content

migrate lint stack to Oxlint + Oxfmt#19179

Merged
ornicar merged 3 commits intolichess-org:masterfrom
Simek:migrate-ui-lint-stack
Jan 21, 2026
Merged

migrate lint stack to Oxlint + Oxfmt#19179
ornicar merged 3 commits intolichess-org:masterfrom
Simek:migrate-ui-lint-stack

Conversation

@Simek
Copy link
Copy Markdown
Contributor

@Simek Simek commented Jan 21, 2026

Why

Oxlint + Oxfmt are Rust-based replacement for ESLint + Prettier. They rely on multithreading and offer a significant performance gains, with no local cache needed. They also have support for multiple editors and IDEs via plugins/extensions, so migration for maintainer should also be a smooth process.

How

Migrate lint stact to Oxlint + Oxfmt while trying to retain previous scripts, code organization and ruleset, aiming at 1:1 conversion for now.

To prevent new warnings/errors to pop I had to disable few enabled by default rules, but it might be worth to revisit, and try to fix them in near future. There are definitely more rules which can be enabled to address some potential issues and code styling, the list of all supported ones can be found at https://oxc.rs/docs/guide/usage/linter/rules.html.

Additionally, I would recommend enabling import grouping and sorting (https://oxc.rs/docs/guide/usage/formatter/sorting.html) by the formatter.

Unfortunately, there is one rule which is not currently supported by the toolset, nor have an alternative, and it is no-restricted-syntax rule. Please let me know if this is a blocker for the migration - for now I have left the inline comments associated with that rule, where it was enabled manually. Already enabled noUncheckedSideEffectImports (https://www.typescriptlang.org/tsconfig/#noUncheckedSideEffectImports) TypeScript config option should prevent some issues, but definitely not all of them, which were previously covered by ESLint.

Besides the migration, this changeset includes few formatting changes and warning fixes:

  • duplicate imports (looks like the rule was not working correctly in previous setup)
  • duplicate commas in arrays (2 cases)
  • unneeded self-assignment (1 case)
  • non-null assertion with optional chaining (1 case)

Any feedback or suggestions are appreciated!

Preview

Screenshot 2026-01-21 at 13 26 39 Screenshot 2026-01-21 at 13 27 13

@Simek Simek marked this pull request as ready for review January 21, 2026 13:21
@ornicar ornicar merged commit 501a0e4 into lichess-org:master Jan 21, 2026
6 checks passed
@Simek Simek deleted the migrate-ui-lint-stack branch January 21, 2026 17:11
ornicar added a commit that referenced this pull request Jan 22, 2026
Sign up for free to 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.

2 participants