Skip to content

Conversation

@glass-ships
Copy link
Member

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

  • 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
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
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
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
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
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
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
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
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
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
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
Member

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

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.

3 participants