Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"ignoreOutput": true
},
{
"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"
"command": "cd my-astro-app && perl -0pi.bak -e 's/\\n lint: \\{.*?\\n \\},\\n/\\n/s' vite.config.ts && vp check --fix # fix generated formatting and ensure no errors"
}
]
}
12 changes: 9 additions & 3 deletions packages/cli/snap-tests-global/create-missing-typecheck/snap.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ export default defineConfig({
fmt: {},
lint: {
jsPlugins: [{ name: "vite-plus", specifier: "vite-plus/oxlint-plugin" }],
rules: { "vite-plus/prefer-vite-plus-imports": "error", "vite-plus/require-pnpm-vite-alias": "error" },
rules: {
"vite-plus/prefer-vite-plus-imports": "error",
"vite-plus/require-pnpm-vite-alias": "error",
},
options: { typeAware: true, typeCheck: true },
},
});
Expand All @@ -25,12 +28,15 @@ export default defineConfig({
fmt: {},
lint: {
jsPlugins: [{ name: "vite-plus", specifier: "vite-plus/oxlint-plugin" }],
rules: { "vite-plus/prefer-vite-plus-imports": "error", "vite-plus/require-pnpm-vite-alias": "error" },
rules: {
"vite-plus/prefer-vite-plus-imports": "error",
"vite-plus/require-pnpm-vite-alias": "error",
},
options: { typeAware: true, typeCheck: true },
},
run: {
cache: true,
},
});

> test ! -f vite-plus-monorepo/apps/website/vite.config.ts # sub-app should NOT have typeAware/typeCheck
> test ! -f vite-plus-monorepo/apps/website/vite.config.ts # sub-app should NOT have typeAware/typeCheck
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ Skipped initialization: 'lint' already exists in 'vite.config.ts'.
> vp fmt --init
Skipped initialization: 'fmt' already exists in 'vite.config.ts'.

> test ! -f .oxfmtrc.json # check .oxfmtrc.json is not created
> test ! -f .oxfmtrc.json # check .oxfmtrc.json is not created
7 changes: 5 additions & 2 deletions packages/cli/snap-tests/command-init-inline-config/snap.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ import { defineConfig } from "vite-plus";
export default defineConfig({
lint: {
jsPlugins: [{ name: "vite-plus", specifier: "vite-plus/oxlint-plugin" }],
rules: { "vite-plus/prefer-vite-plus-imports": "error", "vite-plus/require-pnpm-vite-alias": "error" },
rules: {
"vite-plus/prefer-vite-plus-imports": "error",
"vite-plus/require-pnpm-vite-alias": "error",
},
options: { typeAware: true, typeCheck: true },
},
});
Expand All @@ -26,4 +29,4 @@ export default defineConfig({
},
});

> test ! -f .oxfmtrc.json # check .oxfmtrc.json is removed
> test ! -f .oxfmtrc.json # check .oxfmtrc.json is removed
5 changes: 4 additions & 1 deletion packages/cli/snap-tests/create-org-bundled-monorepo/snap.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ export default defineConfig({
fmt: {},
lint: {
jsPlugins: [{ name: "vite-plus", specifier: "vite-plus/oxlint-plugin" }],
rules: { "vite-plus/prefer-vite-plus-imports": "error", "vite-plus/require-pnpm-vite-alias": "error" },
rules: {
"vite-plus/prefer-vite-plus-imports": "error",
"vite-plus/require-pnpm-vite-alias": "error",
},
options: { typeAware: true, typeCheck: true },
},
run: { cache: true },
Expand Down
Loading