Skip to content

Switch to Oxlint/Oxfmt#353

Draft
glass-ships wants to merge 8 commits into
masterfrom
oxlint
Draft

Switch to Oxlint/Oxfmt#353
glass-ships wants to merge 8 commits into
masterfrom
oxlint

Conversation

@glass-ships

@glass-ships glass-ships commented Dec 4, 2025

Copy link
Copy Markdown
Member
  • Switches to using oxlint for frontend linting
  • Addresses a couple minor linting and type-checking issues
  • Modify the frontend lint pre-commit hook to check for bun or npm rather than only using npm

Same motivation as #342, but oxlint is by the Vue team and actually supports Vue style files, which biome currently does not support.

Full compatibility with eslint and prettier rules (no new or missing linting errors / formatting changes were made in running the new tool(s).

Will follow up with an analogous bumps PR if this is received well

import ModelView from "./components/ModelView.vue";
import ProfileUncertaintyView from "./components/ProfileUncertaintyView.vue";
import SimpleBuilder from "./components/SimpleBuilder.vue";
import DataView from "@/components/DataView.vue";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm a little surprised by this suggested change - it doesn't seem better to me. What is the benefit of using the special @ construction?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I looked up this suggestion online... I can see the logic. Since we're already loading a resolver and aliases, it might be a good idea to simplify the bumps imports too from bumps-webview-client/src/... to @bumps/...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

not the worst idea. do you want me to test that out in this PR or do it separately?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sure, if you want to do it here that's fine!

@glass-ships

Copy link
Copy Markdown
Member Author

I also need to see if I can't figure out why the CI types test is failing when it passes for me locally - it accurately assesses that there's an implicit type mismatch in some places, but how we'd want to address that is up for discussion

@glass-ships

Copy link
Copy Markdown
Member Author

nice, you got it haha.
before we merge this, actually, I did just find out that biome 2.3 released which does also now include full support for Vue. I'm interested in updating that branch and seeing how we feel about one tool vs. the other

@bmaranville

Copy link
Copy Markdown
Member

I don't have much knowledge of either tool. It's nice that our dependency list gets so much smaller with this change (prettier was a bit of a bear to manage)

@bmaranville

Copy link
Copy Markdown
Member

It seems like both oxc and biomejs are missing the ability to deeply analyze the template part of Vuejs components like the eslint plugin does - is that something we want to give up? (they analyze the JS/TS but not the template?)

@glass-ships

Copy link
Copy Markdown
Member Author

yeah i've tested biome again and run into the same issue as before (i didn't realize that PR was already on biome 2.3)
it mostly works as expected, but then you get a lot of "this function is unused", when in reality it is used, just within the template. which results in a lot of false positives.

i like that biome is a little more stringent and flexible, it's making a lot of really solid code style suggestions, and catching things that oxlint didn't (maybe we need to extend the rules?)
but that's a pretty major feature to be lacking.

at least oxlint seems to be respecting the template section and not throwing false positives around.

@glass-ships

Copy link
Copy Markdown
Member Author

oh, one thing we may want to bring over from the biome PR is that DataView global property being shadowed

@bmaranville

Copy link
Copy Markdown
Member

Agreed... it is just bad form to shadow globals!

@bmaranville

Copy link
Copy Markdown
Member

I feel like there was never an overwhelming determination that this was better or worse than biomejs. To be honest I forgot about this PR when I was working over in the bumps repo, and I needed a formatter that worked when prettier was breaking again, and there was already a biomejs PR that I could start from in bumps.

@glass-ships

Copy link
Copy Markdown
Member Author

Yeah, this seemed promising since it comes from the Vue team themselves, but like biome, it still doesn't support linting the section, which doesn't really make it any better than biome, and we've put the work into biome already.

I'd say we can just close this for now, and whenever one or the other wins the race to template linting, we can revisit the comparison

@bmaranville bmaranville marked this pull request as draft May 14, 2026 14:07
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