Skip to content

Commit 4c9d9c0

Browse files
authored
chore: migrate to vite-plus (#966)
1 parent d982da3 commit 4c9d9c0

14 files changed

Lines changed: 486 additions & 337 deletions

.husky/pre-commit

Lines changed: 0 additions & 1 deletion
This file was deleted.

.oxfmtrc.jsonc

Lines changed: 0 additions & 7 deletions
This file was deleted.

.oxlintrc.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

.vite-hooks/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
vp staged

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["VoidZero.vite-plus-extension-pack"]
3+
}

.vscode/settings.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"editor.defaultFormatter": "oxc.oxc-vscode",
3+
"editor.formatOnSave": true,
4+
"editor.formatOnSaveMode": "file",
5+
"editor.codeActionsOnSave": {
6+
"source.fixAll.oxc": "explicit"
7+
}
8+
}

__test__/getCommand.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { it, describe, expect } from 'vitest'
1+
import { it, describe, expect } from 'vite-plus/test'
22
import getCommand from '../utils/getCommand'
33

44
describe('getCommand', () => {

__test__/locale.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { describe, it, expect } from 'vitest'
1+
import { describe, it, expect } from 'vite-plus/test'
22
import { resolve } from 'node:path'
33
import { readdirSync } from 'node:fs'
44
import en from '../locales/en-US.json'

__test__/sortDependencies.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { it, describe, expect } from 'vitest'
1+
import { it, describe, expect } from 'vite-plus/test'
22
import sortDependencies from '../utils/sortDependencies'
33

44
describe('sortDependencies', () => {

package.json

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@
2828
"provenance": true
2929
},
3030
"scripts": {
31-
"prepare": "husky",
32-
"format": "oxfmt",
33-
"format-check": "oxfmt --check",
34-
"lint": "oxlint . --fix --ignore-pattern playground",
31+
"prepare": "vp config",
32+
"format": "vp fmt",
33+
"format-check": "vp fmt --check",
34+
"lint": "vp lint . --fix --ignore-pattern playground",
3535
"build": "rolldown -c rolldown.config.ts",
3636
"snapshot": "zx ./scripts/snapshot.mjs",
3737
"pretest": "pnpm run build && pnpm run snapshot",
3838
"test": "zx ./scripts/test.mjs",
39-
"test:unit": "vitest",
39+
"test:unit": "vp test",
4040
"preversion": "git fetch && git status -uno | grep -q 'Your branch is up to date'",
4141
"postversion": "zx ./scripts/postversion.mjs",
4242
"prepublishOnly": "pnpm run build"
@@ -49,22 +49,13 @@
4949
"@types/prompts": "^2.4.9",
5050
"@vue/tsconfig": "^0.9.0",
5151
"ejs": "^3.1.10",
52-
"husky": "^9.1.7",
53-
"lint-staged": "^16.3.3",
54-
"oxfmt": "^0.40.0",
55-
"oxlint": "~1.55.0",
5652
"picocolors": "^1.1.1",
5753
"rolldown": "1.0.0-rc.8",
5854
"rollup-plugin-license": "^3.7.0",
59-
"vitest": "^4.0.18",
55+
"vite-plus": "catalog:",
56+
"vitest": "catalog:",
6057
"zx": "^8.8.5"
6158
},
62-
"lint-staged": {
63-
"*.{js,ts,vue,json}": [
64-
"oxfmt --no-error-on-unmatched-pattern",
65-
"oxlint --fix"
66-
]
67-
},
6859
"engines": {
6960
"node": "^20.19.0 || >=22.12.0"
7061
},

0 commit comments

Comments
 (0)