Skip to content

Replace Eslint and prettier with oxfmt and oxlint - #54

Open
antedotee wants to merge 3 commits into
omegaup:mainfrom
antedotee:oxlint-oxfmt
Open

antedotee wants to merge 3 commits into
omegaup:mainfrom
antedotee:oxlint-oxfmt

Conversation

@antedotee

@antedotee antedotee commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

This pull request replaces ESLint and Prettier with Oxlint and Oxfmt and reduces linter process overhead.

Changes in this pull request:

  • The Docker image installs Node 22, Oxlint, and Oxfmt, and it removes ESLint and Prettier.
  • The linter configuration renames the eslint key to oxlint, and OxlintLinter runs once per batch over relative paths.
  • The runner skips any linter whose allowlist and denylist match zero files.
  • PHPLinter runs phpcs in parallel across all cores first, and it runs phpcbf only on files that fail phpcs.
  • PythonLinter runs mypy once for the full file set, and it keeps pylint at one process per file to isolate module imports.

antedotee and others added 3 commits November 19, 2026 09:00
Node 14 cannot execute those tools, and a phpcs or mypy process per file is what makes the lint job slow.

Co-authored-by: Cursor <cursoragent@cursor.com>
Nothing in the image installs or runs those tools. JavaScript lint is the oxlint key.

Co-authored-by: Cursor <cursoragent@cursor.com>
…h oxlint

Skip instantiating or invoking run_all linters when allowlist/denylist filtering leaves zero files. Run phpcs with --parallel across all cores before phpcbf so clean runs skip phpcbf altogether, and batch oxlint into one process over relative paths.

Co-authored-by: Cursor <cursoragent@cursor.com>

@pabo99 pabo99 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all the work on these performance improvements! There are several valuable changes here that I'd like to incorporate independently of the ESLint/Prettier migration.

Could we split this PR into the following smaller PRs?

  1. Skip linters when no files match the allowlist/denylist.
  2. Upgrade Node.js to v22 while retaining the existing linting and formatting tools.
  3. Optimize PHP linter execution by batching and parallelizing phpcs/phpcbf.
  4. Batch mypy execution while preserving pylint isolation.
  5. Introduce Oxfmt as an alternative to Prettier.
  6. Introduce Oxlint while retaining ESLint for unsupported rules, particularly Vue template rules.

This would allow us to review, benchmark, and merge each improvement independently, making regressions easier to identify.

For the last two PRs, I'd like us to evaluate compatibility and rule coverage before completely replacing our existing tools.

Please include regression tests and before/after performance measurements where applicable.

I really appreciate the initiative to improve our CI performance. Let's make these improvements easier to review and integrate incrementally.

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