Skip to content

Commit f4fbbbc

Browse files
committed
test(migrate): show generated vite.config.ts in plugins-cleanup snap
So reviewers can see the lint/staged/fmt block the comprehensive cleanup produces, not just the trimmed package.json.
1 parent b874c44 commit f4fbbbc

2 files changed

Lines changed: 40 additions & 2 deletions

File tree

packages/cli/snap-tests-global/migration-eslint-plugins-cleanup/snap.txt

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,41 @@
2626
"packageManager": "pnpm@<semver>"
2727
}
2828

29-
> test ! -f eslint.config.mjs # check eslint config is removed
29+
> test ! -f eslint.config.mjs # check eslint config is removed
30+
> cat vite.config.ts # verify the generated vite.config.ts
31+
import { defineConfig } from 'vite-plus';
32+
33+
export default defineConfig({
34+
staged: {
35+
"*": "vp check --fix"
36+
},
37+
fmt: {},
38+
lint: {
39+
"plugins": [
40+
"oxc",
41+
"typescript",
42+
"unicorn",
43+
"react"
44+
],
45+
"categories": {
46+
"correctness": "warn"
47+
},
48+
"env": {
49+
"builtin": true
50+
},
51+
"rules": {
52+
"no-unused-vars": "error",
53+
"vite-plus/prefer-vite-plus-imports": "error"
54+
},
55+
"options": {
56+
"typeAware": true,
57+
"typeCheck": true
58+
},
59+
"jsPlugins": [
60+
{
61+
"name": "vite-plus",
62+
"specifier": "vite-plus/oxlint-plugin"
63+
}
64+
]
65+
},
66+
});

packages/cli/snap-tests-global/migration-eslint-plugins-cleanup/steps.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"commands": [
33
"vp migrate --no-interactive # migration should remove ESLint, plugins, configs, scopes, formatters, and peer eslint",
44
"cat package.json # verify the comprehensive ESLint ecosystem cleanup",
5-
"test ! -f eslint.config.mjs # check eslint config is removed"
5+
"test ! -f eslint.config.mjs # check eslint config is removed",
6+
"cat vite.config.ts # verify the generated vite.config.ts"
67
]
78
}

0 commit comments

Comments
 (0)