core icon indicating copy to clipboard operation
core copied to clipboard

feat: migrate linting to oxlint

Open camc314 opened this issue 6 months ago • 4 comments

$ hyperfine --warmup 3 'npm run lint' 'npm run lint:ox'                                                                                        
Benchmark 1: npm run lint
  Time (mean ± σ):     718.5 ms ±  11.7 ms    [User: 697.0 ms, System: 138.4 ms]
  Range (min … max):   693.1 ms … 738.2 ms    10 runs
 
Benchmark 2: npm run lint:ox
  Time (mean ± σ):     233.6 ms ±  12.0 ms    [User: 162.8 ms, System: 47.5 ms]
  Range (min … max):   213.0 ms … 263.9 ms    12 runs
 
Summary
  npm run lint:ox ran
    3.08 ± 0.17 times faster than npm run lint

oxlint appears to run 3x faster than eslint (with eslint using cache)

camc314 avatar May 14 '25 10:05 camc314

[!IMPORTANT]

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar May 14 '25 10:05 coderabbitai[bot]

hey all, oxlint doesn't support this:

https://github.com/vuejs/core/blob/35785f3cd7bd86cbec3f8324022491da2d088b61/eslint.config.js#L164-L169

part of the lint rule - what's the purpose of this lint rule? it looks like it's just enforcing that nodejs modules are imported like

import 'path'

and not

import 'node:path

thanks

camc314 avatar May 14 '25 10:05 camc314

Size Report

Bundles

File Size Gzip Brotli
compiler-dom.global.prod.js 84.8 kB 30 kB 26.5 kB
runtime-dom.global.prod.js 106 kB 39.8 kB 35.8 kB
vue.global.prod.js 164 kB 60 kB 53.4 kB

Usages

Name Size Gzip Brotli
createApp (CAPI only) 47.8 kB 18.7 kB 17.1 kB
createApp 56.6 kB 21.8 kB 19.9 kB
createApp + vaporInteropPlugin 89.3 kB 33.4 kB 30.2 kB
createVaporApp 33.1 kB 12.7 kB 11.6 kB
createSSRApp 60.9 kB 23.6 kB 21.5 kB
defineCustomElement 62 kB 23.4 kB 21.4 kB
overall 71.6 kB 27.2 kB 24.7 kB

github-actions[bot] avatar May 15 '25 07:05 github-actions[bot]

Open in StackBlitz

@vue/compiler-core

npm i https://pkg.pr.new/@vue/compiler-core@13326
@vue/compiler-dom

npm i https://pkg.pr.new/@vue/compiler-dom@13326
@vue/compiler-sfc

npm i https://pkg.pr.new/@vue/compiler-sfc@13326
@vue/compiler-ssr

npm i https://pkg.pr.new/@vue/compiler-ssr@13326
@vue/compiler-vapor

npm i https://pkg.pr.new/@vue/compiler-vapor@13326
@vue/reactivity

npm i https://pkg.pr.new/@vue/reactivity@13326
@vue/runtime-core

npm i https://pkg.pr.new/@vue/runtime-core@13326
@vue/runtime-dom

npm i https://pkg.pr.new/@vue/runtime-dom@13326
@vue/runtime-vapor

npm i https://pkg.pr.new/@vue/runtime-vapor@13326
@vue/server-renderer

npm i https://pkg.pr.new/@vue/server-renderer@13326
@vue/shared

npm i https://pkg.pr.new/@vue/shared@13326
vue

npm i https://pkg.pr.new/vue@13326
@vue/compat

npm i https://pkg.pr.new/@vue/compat@13326

commit: 134f472

pkg-pr-new[bot] avatar May 15 '25 07:05 pkg-pr-new[bot]

@camc314 Thanks for this PR, but I think you should create the branch based on the minor branch instead of main.

edison1105 avatar Sep 10 '25 03:09 edison1105

Deploy Preview for vue-sfc-playground failed. Why did it fail? →

Name Link
Latest commit 4c0d013d89e7f69dc62970e2241389c291d8c9d0
Latest deploy log https://app.netlify.com/projects/vue-sfc-playground/deploys/68c10f8ca0956f0007e6dd8d

netlify[bot] avatar Sep 10 '25 03:09 netlify[bot]

@camc314 Thanks for this PR, but I think you should create the branch based on the minor branch instead of main.

yep, thank you. should be fixed now 🤞

camc314 avatar Sep 10 '25 03:09 camc314

Those deployments failed just related to [email protected], pin [email protected] will resolve.

edison1105 avatar Sep 10 '25 03:09 edison1105

Those deployments failed just related to [email protected], pin [email protected] will resolve.

I can't work out the netifly failure? It should be pinned to 4.47.0 here? And yet it's still failing

https://github.com/camc314/core/blob/15aa50bb88aa3026c0c91115c93e215d20c226e6/package.json#L99

camc314 avatar Sep 10 '25 04:09 camc314

@camc314 uh, sorry, should be [email protected].

edison1105 avatar Sep 10 '25 05:09 edison1105

Thanks! looks like it's working now

camc314 avatar Sep 10 '25 07:09 camc314

CI is failing, i've put up a fix on oxc side https://github.com/oxc-project/oxc/pull/13644 the fix that it's running is technically unsafe (makes typecheck fail)

camc314 avatar Sep 10 '25 08:09 camc314

Ci is passing now 👏

TheAlexLichter avatar Oct 02 '25 12:10 TheAlexLichter