Skip to content

Comments

V2 – chore(eslint): migrate to oxlint, oxfmt#8282

Open
Kenzo-Wada wants to merge 2 commits intoQwikDev:build/v2from
Kenzo-Wada:chore/migrate-oxc
Open

V2 – chore(eslint): migrate to oxlint, oxfmt#8282
Kenzo-Wada wants to merge 2 commits intoQwikDev:build/v2from
Kenzo-Wada:chore/migrate-oxc

Conversation

@Kenzo-Wada
Copy link

@Kenzo-Wada Kenzo-Wada commented Jan 29, 2026

What is it?

  • Infra

Description

Migrate from ESLint + Prettier to OxLint + OxFmt for faster linting and formatting.

Changes

  • Linting: Replace ESLint with OxLint (eslint-plugin-qwik rules remain via oxlint config)
  • Formatting: Replace Prettier with OxFmt (experimentalPrettierFallback for md/json/yaml)
  • Remove: eslint, prettier, prettier-plugin-jsdoc, prettier-plugin-tailwindcss, pretty-quick
  • Add: oxlint, oxfmt

Benchmark (no cache)

Command main This PR Improvement
pnpm lint 48s 11.5s 4.2x
pnpm fmt 31s 12s 2.6x

Checklist

  • My code follows the developer guidelines of this project
  • I performed a self-review of my own code
  • I added a changeset with pnpm change
  • I made corresponding changes to the Qwik docs
  • I added new tests to cover the fix / functionality

Copilot AI review requested due to automatic review settings January 29, 2026 09:16
@Kenzo-Wada Kenzo-Wada requested review from a team as code owners January 29, 2026 09:16
@changeset-bot
Copy link

changeset-bot bot commented Jan 29, 2026

⚠️ No Changeset found

Latest commit: 6a228ce

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@Kenzo-Wada Kenzo-Wada changed the title chore: migrate to oxlint, oxfmt chore(eslint): migrate to oxlint, oxfmt Jan 29, 2026
Copy link
Member

@gioboa gioboa left a comment

Choose a reason for hiding this comment

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

Thanks for your help @Kenzo-Wada
Can I ask you to resolve the conflicts please?

@wmertens
Copy link
Member

@Kenzo-Wada ideally you add a commit with just the configuration, then a commit with the result of running lint, and commits before/after with manual fixes if any are needed.

That way conflicts are easy to handle

@Kenzo-Wada
Copy link
Author

@wmertens @gioboa Got it, I'll do that first!
Sorry, reviewers have it rough right now. My bad for not thinking of that 🙇

done with this commit: 0ffee29

Copy link
Member

@gioboa gioboa left a comment

Choose a reason for hiding this comment

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

I did some research with AI and there is a way to preserve all the files with the same formatting. You can achieve it with the right configuration. This means: new faster tool and same formatting, it will be amazing

@Kenzo-Wada
Copy link
Author

Ill get into it. Thankyou for the research!

@Kenzo-Wada
Copy link
Author

@gioboa

I tried adjusting the oxfmt configuration, but couldn't find options to control import/function parameter line wrapping behavior.

Also, I noticed the existing codebase has inconsistent formatting (mixed single/double quotes in some files), which may complicate the migration.
Could you share the configuration from your research? I'd be happy to test it!

@wmertens
Copy link
Member

wmertens commented Feb 4, 2026

@Kenzo-Wada about the inconsistencies: the starters subdirectory isn't configured quite correctly. It would be great if it is consistent with the rest.

Copy link
Member

@gioboa gioboa left a comment

Choose a reason for hiding this comment

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

@Kenzo-Wada you are right the style inside the different folders looks inconsistent.
we can try to do our best with the configuration. here is an example.

Image

@maiieul maiieul changed the title chore(eslint): migrate to oxlint, oxfmt V2 – chore(eslint): migrate to oxlint, oxfmt Feb 7, 2026
@maiieul
Copy link
Member

maiieul commented Feb 7, 2026

Thanks @Kenzo-Wada for the initiative! Greatly appreciated ⚡️

Copy link
Member

@wmertens wmertens left a comment

Choose a reason for hiding this comment

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

some important things + the tests are failing because of missing prettier

@@ -0,0 +1,10 @@
{
"$schema": "https://oxc.rs/schemas/oxfmt.json",
"experimentalPrettierFallback": true,
Copy link
Member

Choose a reason for hiding this comment

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

does this mean that prettier still needs to be present, and its ignore file as well?

"vitest/no-disabled-tests": "off",
"vitest/valid-title": "off",
"vitest/warn-todo": "off",
"jest/expect-expect": "off",
Copy link
Member

Choose a reason for hiding this comment

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

we don't use jest?

"jsdoc/require-property": "off",
"jsdoc/require-yields": "off",
"vitest/expect-expect": "off",
"vitest/no-disabled-tests": "off",
Copy link
Member

Choose a reason for hiding this comment

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

we had the "no-only-test" eslint rule, so I think this should be on instead

Copy link
Member

Choose a reason for hiding this comment

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

this is missing the very important @typescript-eslint/no-restricted-imports and its configuration

Comment on lines +21 to +22
packages/qwik-labs/lib-types
packages/qwik-labs/vite
Copy link
Member

Choose a reason for hiding this comment

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

these don't exist in v2

},
"simple-git-hooks": {
"pre-commit": "pnpm pretty-quick --staged"
"pre-commit": "pnpm fmt.staged"
Copy link
Member

Choose a reason for hiding this comment

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

now that oxlint is so fast, maybe you can add lint-staged to the mix, and do both formatting and lint checking (no fix) to precommit

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.

4 participants