Skip to content

Commit 9852dbe

Browse files
committed
FIXUP
1 parent cb2348b commit 9852dbe

23 files changed

Lines changed: 460 additions & 1 deletion

File tree

packages/global/snap-tests/migration-auto-create-vite-config/snap.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
44
● Using default package manager: pnpm
55
6+
● pnpm@latest installing...
7+
8+
● pnpm@<semver> installed
9+
610
◆ ✅ Merged .oxlintrc.json into vite.config.ts
711
812
◆ ✅ Merged .oxfmtrc.json into vite.config.ts
@@ -33,3 +37,16 @@ cat: .oxlintrc.json: No such file or directory
3337

3438
> cat .oxfmtrc.json && exit 1 || true # check .oxfmtrc.json is removed
3539
cat: .oxfmtrc.json: No such file or directory
40+
41+
> cat package.json # check package.json
42+
{
43+
"devDependencies": {
44+
"@voidzero-dev/vite-plus": "latest"
45+
},
46+
"pnpm": {
47+
"overrides": {
48+
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
49+
"vitest": "npm:@voidzero-dev/vite-plus-test@latest"
50+
}
51+
}
52+
}
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
{
2+
"env": {
3+
"VITE_DISABLE_AUTO_INSTALL": "1"
4+
},
25
"commands": [
36
"vp migration # migration should auto create vite.config.ts and remove oxlintrc and oxfmtrc",
47
"cat vite.config.ts # check vite.config.ts",
58
"cat .oxlintrc.json && exit 1 || true # check .oxlintrc.json is removed",
6-
"cat .oxfmtrc.json && exit 1 || true # check .oxfmtrc.json is removed"
9+
"cat .oxfmtrc.json && exit 1 || true # check .oxfmtrc.json is removed",
10+
"cat package.json # check package.json"
711
]
812
}

packages/global/snap-tests/migration-lintstagedrc/steps.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"env": {
3+
"VITE_DISABLE_AUTO_INSTALL": "1"
4+
},
25
"commands": [
36
{
47
"command": "vp migration # migration work with lintstagedrc.json",
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"rules": {
3+
"no-unused-vars": "error"
4+
}
5+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"devDependencies": {
3+
"vite": "^7.0.0",
4+
"@vitejs/plugin-react": "^4.2.0",
5+
"oxlint": "1"
6+
},
7+
"scripts": {
8+
"dev": "vite --port 3000",
9+
"build": "vite build",
10+
"lint": "oxlint"
11+
}
12+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
> vp migration # migration should merge vite.config.js and remove oxlintrc
2+
┌ Vite+ Migration
3+
4+
● Using default package manager: pnpm
5+
6+
● pnpm@latest installing...
7+
8+
● pnpm@<semver> installed
9+
10+
◆ ✅ Merged .oxlintrc.json into vite.config.js
11+
12+
└ ✨ Migration completed!
13+
14+
15+
> cat vite.config.js # check vite.config.js
16+
import react from '@vitejs/plugin-react';
17+
18+
export default {
19+
lint: {
20+
rules: {
21+
'no-unused-vars': 'error',
22+
},
23+
},
24+
plugins: [react()],
25+
}
26+
27+
> cat .oxlintrc.json && exit 1 || true # check .oxlintrc.json is removed
28+
cat: .oxlintrc.json: No such file or directory
29+
30+
> cat package.json # check package.json
31+
{
32+
"devDependencies": {
33+
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
34+
"@vitejs/plugin-react": "^4.2.0",
35+
"@voidzero-dev/vite-plus": "latest"
36+
},
37+
"scripts": {
38+
"dev": "vite dev --port 3000",
39+
"build": "vite build",
40+
"lint": "vite lint"
41+
},
42+
"pnpm": {
43+
"overrides": {
44+
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
45+
"vitest": "npm:@voidzero-dev/vite-plus-test@latest"
46+
}
47+
}
48+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"env": {
3+
"VITE_DISABLE_AUTO_INSTALL": "1"
4+
},
5+
"commands": [
6+
"vp migration # migration should merge vite.config.js and remove oxlintrc",
7+
"cat vite.config.js # check vite.config.js",
8+
"cat .oxlintrc.json && exit 1 || true # check .oxlintrc.json is removed",
9+
"cat package.json # check package.json"
10+
]
11+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import react from '@vitejs/plugin-react';
2+
3+
export default {
4+
plugins: [react()],
5+
};
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"printWidth": 100,
3+
"tabWidth": 2,
4+
"semi": true,
5+
"singleQuote": true,
6+
"trailingComma": "es5"
7+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"rules": {
3+
"no-unused-vars": "error"
4+
}
5+
}

0 commit comments

Comments
 (0)