feat(cli): enforce vite-plus import lint rule#1408
feat(cli): enforce vite-plus import lint rule#1408Han5991 wants to merge 15 commits intovoidzero-dev:mainfrom
Conversation
✅ Deploy Preview for viteplus-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
1fe3184 to
3a43e6d
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7eceea6afe
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Awesome, the import rewrite logic can be completely replaced with the oxlint plugin. |
Makes sense. I focused this PR on the unsafe rewrite fix first, and I can move the remaining import rewrite logic into the oxlint plugin in a follow-up. |
| preferVitePlusImports: "Use '{{to}}' instead of '{{from}}' in Vite+ projects.", | ||
| }, | ||
| }, | ||
| create(context: any) { |
There was a problem hiding this comment.
it would be ideal to use createOnce over create due to its perf advantages
There was a problem hiding this comment.
BTW: @camc314 We need an oxlint plugin rule to guide us on how to write good oxlint plugins 😃
camc314
left a comment
There was a problem hiding this comment.
This looks good! but we should definitely use oxlint's types rather than handrolling it, it duplicates code, and might cause issues in future!
b757aaf to
57897c7
Compare
|
The failure appears to come from a version skew in the global snap test. In this test, The local CLI generates a lint config that references That means oxlint sees the registry-installed This also explains why the other |
Summary
vite/vitestimports tovite-pluslintconfigTesting
command-init-inline-configandlint-vite-plus-importsCloses #1301