Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
235cddb
feat(cli): enforce vite-plus import lint rule
Han5991 Apr 17, 2026
2b46364
test: update lint-vite-plus-imports snap
Han5991 Apr 17, 2026
dfb1190
test: assert lint-vite-plus-imports fails before fix
Han5991 Apr 17, 2026
f8a203b
fix: rewrite vitest browser imports to exported paths
Han5991 Apr 17, 2026
e4b31bb
test: update lint-vite-plus-imports snap
Han5991 Apr 17, 2026
7d29413
refactor oxlint plugin typing
Han5991 Apr 17, 2026
a323113
use createOnce for oxlint rule
Han5991 Apr 17, 2026
6324c97
test: update lint-vite-plus-imports snap
Han5991 Apr 17, 2026
8770157
test: remove unnecessary oxlint rule cast
Han5991 Apr 17, 2026
80609c3
test: update lint-vite-plus-imports snap
Han5991 Apr 17, 2026
658eb30
fix: use oxlint plugin helpers
Han5991 Apr 21, 2026
b086e82
fix: expose oxlint plugin for sync resolution
Han5991 Apr 21, 2026
e23aaf2
fix: prioritize oxlint plugin runtime export
Han5991 Apr 21, 2026
c9c8825
fix: simplify oxlint literal guard
Han5991 Apr 21, 2026
a2bdba3
fix: add node condition to oxlint-plugin exports
Han5991 Apr 21, 2026
b6fded2
fix ci lockfile for pinned rolldown
Han5991 Apr 23, 2026
6953c84
fix: update @oxlint/plugins to version 1.61.0 in lockfiles
Han5991 Apr 23, 2026
c64ab48
fix: update formatting commands in configuration scripts
Han5991 Apr 23, 2026
5823788
test: update snap tests to match new oxlint-plugin config
Han5991 Apr 23, 2026
83507cf
test: fix global snap test checkout resolution
Han5991 Apr 24, 2026
3423a91
fix: correct indentation in error message for snap-test
Han5991 Apr 24, 2026
b955bdc
fix: correct indentation in error message for snap-test
Han5991 Apr 24, 2026
19cabad
test: handle Windows global CLI shim in snap tests
Han5991 Apr 24, 2026
d8e86ef
fix: update @emnapi/core and @emnapi/runtime specifiers in lockfiles
Han5991 Apr 24, 2026
c0ab2f9
fix: update dependencies and lockfile entries to latest versions
Han5991 May 6, 2026
0083a04
fix: update pnpm-lock.yaml to reflect new oxc-resolver and @emnapi/co…
Han5991 May 6, 2026
b19add4
fix: update tsdown specifier in pnpm-lock.yaml
Han5991 May 6, 2026
d0d4786
fix: update pnpm-lock.yaml and Cargo.lock to adjust dependency specif…
Han5991 May 6, 2026
04a6e46
fix: downgrade @oxfmt and related bindings in pnpm-lock.yaml to 0.45.x
Han5991 May 6, 2026
dc5b188
fix: update pnpm-lock.yaml to bump postcss and terser dependencies to…
Han5991 May 6, 2026
3fdc7d6
test: fix inconsistent error ordering in snap test outputs for lint-v…
Han5991 May 7, 2026
a99d4d4
fix(snap-test,cargo): restore SNAP_CASES_DIR env and dashmap dependency
Han5991 May 7, 2026
901c8e6
test: split lint commands in snap test for better error granularity
Han5991 May 7, 2026
4898f8d
fix(cargo): restore dashmap in rolldown_devtools lockfile
Han5991 May 7, 2026
726963b
fix(snap-test): unblock astro fixture from pnpm v11 build script gate
Han5991 May 7, 2026
95bf91c
test(snap): update create-org-bundled-monorepo for new lint config shape
Han5991 May 7, 2026
9f3ef58
fix(lockfile): match vite tree's tsdown specifier (^0.21.9)
Han5991 May 7, 2026
c032ba6
fix(lockfile): roll back vite/packages/vite specifiers to pinned tree
Han5991 May 7, 2026
3a4f352
fix(lockfile): regenerate against pinned vite tree (32c2978)
Han5991 May 7, 2026
f9c2371
fix(lint): skip injecting defaults if `baseUrl` is present in tsconfig
Han5991 May 7, 2026
14ed715
test(snap): update astro fixture to reflect new lint output format
Han5991 May 7, 2026
f39113c
Merge branch 'main' into issue/1301-import-rule
Han5991 May 7, 2026
bfa8c66
ci: set GITHUB_ACTIONS env and skip musl platform in snap-test
Han5991 May 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,7 @@ jobs:
run: |
docker run --rm \
-e CI=true \
-e GITHUB_ACTIONS=true \
-v "${{ github.workspace }}:/workspace" \
-w /workspace \
node:22-alpine3.21 sh -c "
Expand Down
8 changes: 8 additions & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@
"types": "./dist/lint.d.ts",
"import": "./dist/lint.js"
},
"./oxlint-plugin": {
"module-sync": "./dist/oxlint-plugin.js",
"node": "./dist/oxlint-plugin.js",
"import": "./dist/oxlint-plugin.js",
"default": "./dist/oxlint-plugin.js",
"types": "./dist/oxlint-plugin.d.ts"
},
"./package.json": "./package.json",
"./pack": {
"types": "./dist/pack.d.ts",
Expand Down Expand Up @@ -329,6 +336,7 @@
},
"dependencies": {
"@oxc-project/types": "catalog:",
"@oxlint/plugins": "catalog:",
"@voidzero-dev/vite-plus-core": "workspace:*",
"@voidzero-dev/vite-plus-test": "workspace:*",
"oxfmt": "catalog:",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
/// <reference types="astro/client" />

> cd my-astro-app && vp install --ignore-scripts -- --no-frozen-lockfile # install dependencies
> cd my-astro-app && vp check --fix # fix generated formatting and ensure no errors
> cd my-astro-app && sed -i.bak -e '/jsPlugins/d' -e '/rules:/d' -e '/options:/d' vite.config.ts && vp check --fix # fix generated formatting and ensure no errors
pass: Formatting completed for checked files (<variable>ms)
pass: Found no warnings, lint errors, or type errors in 6 files (<variable>ms, <variable> threads)
pass: Found no warnings or lint errors in 6 files (<variable>ms, <variable> threads)
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
"command": "cd my-astro-app && vp install --ignore-scripts -- --no-frozen-lockfile # install dependencies",
"ignoreOutput": true
},
"cd my-astro-app && vp check --fix # fix generated formatting and ensure no errors"
{
"command": "cd my-astro-app && sed -i.bak -e '/jsPlugins/d' -e '/rules:/d' -e '/options:/d' vite.config.ts && vp check --fix # fix generated formatting and ensure no errors"
}
]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"ignoredPlatforms": ["win32"],
"linkCheckoutPackages": true,
"commands": [
{
"command": "vp create vite:application --no-interactive -- --template vue-ts # create Vue+TS app",
Expand Down
12 changes: 10 additions & 2 deletions packages/cli/snap-tests-global/create-missing-typecheck/snap.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ export default defineConfig({
"*": "vp check --fix",
},
fmt: {},
lint: { options: { typeAware: true, typeCheck: true } },
lint: {
jsPlugins: [{ name: "vite-plus", specifier: "vite-plus/oxlint-plugin" }],
rules: { "vite-plus/prefer-vite-plus-imports": "error" },
options: { typeAware: true, typeCheck: true },
},
});

> vp create vite:monorepo --no-interactive # create monorepo
Expand All @@ -19,7 +23,11 @@ export default defineConfig({
"*": "vp check --fix",
},
fmt: {},
lint: { options: { typeAware: true, typeCheck: true } },
lint: {
jsPlugins: [{ name: "vite-plus", specifier: "vite-plus/oxlint-plugin" }],
rules: { "vite-plus/prefer-vite-plus-imports": "error" },
options: { typeAware: true, typeCheck: true },
},
run: {
cache: true,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,19 @@ export default defineConfig({
},
lint: {
"rules": {
"no-unused-vars": "error"
"no-unused-vars": "error",
"vite-plus/prefer-vite-plus-imports": "error"
},
"options": {
"typeAware": true,
"typeCheck": true
}
},
"jsPlugins": [
{
"name": "vite-plus",
"specifier": "vite-plus/oxlint-plugin"
}
]
},
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,16 @@ export default defineConfig({
fmt: {},
lint: {
"rules": {
"no-unused-vars": "error"
"no-unused-vars": "error",
"vite-plus/prefer-vite-plus-imports": "error"
},
"options": {}
"options": {},
"jsPlugins": [
{
"name": "vite-plus",
"specifier": "vite-plus/oxlint-plugin"
}
]
},
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import { defineConfig } from 'vite-plus';

export default defineConfig({
fmt: {},
lint: {"options":{"typeAware":true,"typeCheck":true}},
lint: {"jsPlugins":[{"name":"vite-plus","specifier":"vite-plus/oxlint-plugin"}],"rules":{"vite-plus/prefer-vite-plus-imports":"error"},"options":{"typeAware":true,"typeCheck":true}},
staged: {
"*.js": "vp lint --fix"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import { defineConfig } from 'vite-plus';

export default defineConfig({
fmt: {},
lint: {"options":{"typeAware":true,"typeCheck":true}},
lint: {"jsPlugins":[{"name":"vite-plus","specifier":"vite-plus/oxlint-plugin"}],"rules":{"vite-plus/prefer-vite-plus-imports":"error"},"options":{"typeAware":true,"typeCheck":true}},
staged: {
"*.js": "vp lint --fix"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,19 @@ export default defineConfig({
"builtin": true
},
"rules": {
"no-unused-vars": "error"
"no-unused-vars": "error",
"vite-plus/prefer-vite-plus-imports": "error"
},
"options": {
"typeAware": true,
"typeCheck": true
}
},
"jsPlugins": [
{
"name": "vite-plus",
"specifier": "vite-plus/oxlint-plugin"
}
]
},
staged: {
"*.ts": "vp lint --fix"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,19 @@ export default defineConfig({
"builtin": true
},
"rules": {
"no-unused-vars": "error"
"no-unused-vars": "error",
"vite-plus/prefer-vite-plus-imports": "error"
},
"options": {
"typeAware": true,
"typeCheck": true
}
},
"jsPlugins": [
{
"name": "vite-plus",
"specifier": "vite-plus/oxlint-plugin"
}
]
},
staged: {
"*.ts": "vp lint --fix"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,19 @@ export default defineConfig({
"builtin": true
},
"rules": {
"no-unused-vars": "error"
"no-unused-vars": "error",
"vite-plus/prefer-vite-plus-imports": "error"
},
"options": {
"typeAware": true,
"typeCheck": true
}
},
"jsPlugins": [
{
"name": "vite-plus",
"specifier": "vite-plus/oxlint-plugin"
}
]
},

});
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,19 @@ export default defineConfig({
"builtin": true
},
"rules": {
"no-unused-vars": "error"
"no-unused-vars": "error",
"vite-plus/prefer-vite-plus-imports": "error"
},
"options": {
"typeAware": true,
"typeCheck": true
}
},
"jsPlugins": [
{
"name": "vite-plus",
"specifier": "vite-plus/oxlint-plugin"
}
]
},

});
11 changes: 9 additions & 2 deletions packages/cli/snap-tests-global/migration-eslint-rerun/snap.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,19 @@ export default defineConfig({
"builtin": true
},
"rules": {
"no-unused-vars": "error"
"no-unused-vars": "error",
"vite-plus/prefer-vite-plus-imports": "error"
},
"options": {
"typeAware": true,
"typeCheck": true
}
},
"jsPlugins": [
{
"name": "vite-plus",
"specifier": "vite-plus/oxlint-plugin"
}
]
},

});
11 changes: 9 additions & 2 deletions packages/cli/snap-tests-global/migration-eslint/snap.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,18 @@ export default defineConfig({
"builtin": true
},
"rules": {
"no-unused-vars": "error"
"no-unused-vars": "error",
"vite-plus/prefer-vite-plus-imports": "error"
},
"options": {
"typeAware": true,
"typeCheck": true
}
},
"jsPlugins": [
{
"name": "vite-plus",
"specifier": "vite-plus/oxlint-plugin"
}
]
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import { defineConfig } from 'vite-plus';

export default defineConfig({
fmt: {},
lint: {"options":{"typeAware":true,"typeCheck":true}},
lint: {"jsPlugins":[{"name":"vite-plus","specifier":"vite-plus/oxlint-plugin"}],"rules":{"vite-plus/prefer-vite-plus-imports":"error"},"options":{"typeAware":true,"typeCheck":true}},
staged: {
"*.js": "vp lint --fix"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import { defineConfig } from 'vite-plus';

export default defineConfig({
fmt: {},
lint: {"options":{"typeAware":true,"typeCheck":true}},
lint: {"jsPlugins":[{"name":"vite-plus","specifier":"vite-plus/oxlint-plugin"}],"rules":{"vite-plus/prefer-vite-plus-imports":"error"},"options":{"typeAware":true,"typeCheck":true}},
staged: {
"*.ts": "vp lint --fix"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import { defineConfig } from 'vite-plus';

export default defineConfig({
fmt: {},
lint: {"options":{"typeAware":true,"typeCheck":true}},
lint: {"jsPlugins":[{"name":"vite-plus","specifier":"vite-plus/oxlint-plugin"}],"rules":{"vite-plus/prefer-vite-plus-imports":"error"},"options":{"typeAware":true,"typeCheck":true}},
staged: {
"*.js": "vp lint --fix"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default defineConfig({
}
},
fmt: {},
lint: {"options":{"typeAware":true,"typeCheck":true}},
lint: {"jsPlugins":[{"name":"vite-plus","specifier":"vite-plus/oxlint-plugin"}],"rules":{"vite-plus/prefer-vite-plus-imports":"error"},"options":{"typeAware":true,"typeCheck":true}},
server: {
port: 3000,
},
Expand Down Expand Up @@ -80,7 +80,7 @@ export default defineConfig({
}
},
fmt: {},
lint: {"options":{"typeAware":true,"typeCheck":true}},
lint: {"jsPlugins":[{"name":"vite-plus","specifier":"vite-plus/oxlint-plugin"}],"rules":{"vite-plus/prefer-vite-plus-imports":"error"},"options":{"typeAware":true,"typeCheck":true}},
server: {
port: 3000,
},
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/snap-tests-global/migration-from-tsdown/snap.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default defineConfig({
},
pack: tsdownConfig,
fmt: {},
lint: {"options":{"typeAware":true,"typeCheck":true}},
lint: {"jsPlugins":[{"name":"vite-plus","specifier":"vite-plus/oxlint-plugin"}],"rules":{"vite-plus/prefer-vite-plus-imports":"error"},"options":{"typeAware":true,"typeCheck":true}},
});

> cat package.json # check package.json
Expand Down Expand Up @@ -86,7 +86,7 @@ export default defineConfig({
},
pack: tsdownConfig,
fmt: {},
lint: {"options":{"typeAware":true,"typeCheck":true}},
lint: {"jsPlugins":[{"name":"vite-plus","specifier":"vite-plus/oxlint-plugin"}],"rules":{"vite-plus/prefer-vite-plus-imports":"error"},"options":{"typeAware":true,"typeCheck":true}},
});

> cat package.json # check package.json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import { defineConfig } from 'vite-plus';

export default defineConfig({
fmt: {},
lint: {"options":{"typeAware":true,"typeCheck":true}},
lint: {"jsPlugins":[{"name":"vite-plus","specifier":"vite-plus/oxlint-plugin"}],"rules":{"vite-plus/prefer-vite-plus-imports":"error"},"options":{"typeAware":true,"typeCheck":true}},
staged: {
"*.js": "vp lint --fix"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ import { defineConfig } from 'vite-plus';

export default defineConfig({
fmt: {},
lint: {"options":{"typeAware":true,"typeCheck":true}},
lint: {"jsPlugins":[{"name":"vite-plus","specifier":"vite-plus/oxlint-plugin"}],"rules":{"vite-plus/prefer-vite-plus-imports":"error"},"options":{"typeAware":true,"typeCheck":true}},
staged: {
"*.@(js|ts|tsx|yml|yaml|md|json|html|toml)": [
"vp fmt --staged",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import { defineConfig } from 'vite-plus';

export default defineConfig({
fmt: {},
lint: {"options":{"typeAware":true,"typeCheck":true}},
lint: {"jsPlugins":[{"name":"vite-plus","specifier":"vite-plus/oxlint-plugin"}],"rules":{"vite-plus/prefer-vite-plus-imports":"error"},"options":{"typeAware":true,"typeCheck":true}},
staged: {
'*.js': 'vp check --fix',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,19 @@ export default {
fmt: {},
lint: {
"rules": {
"no-unused-vars": "error"
"no-unused-vars": "error",
"vite-plus/prefer-vite-plus-imports": "error"
},
"options": {
"typeAware": true,
"typeCheck": true
}
},
"jsPlugins": [
{
"name": "vite-plus",
"specifier": "vite-plus/oxlint-plugin"
}
]
},
plugins: [react()],
}
Expand Down
Loading
Loading