File tree Expand file tree Collapse file tree
packages/cli/snap-tests/lint-vite-plus-imports Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ [1]> vp lint src/index.ts src/types.ts # should fail before fix
2+
3+ × vite-plus(prefer-vite-plus-imports): Use 'vite-plus' instead of 'vite' in Vite+ projects.
4+ ╭─[src/index.ts:1:30]
5+ 1 │ import { defineConfig } from 'vite';
6+ · ──────
7+ 2 │
8+ ╰────
9+
10+ × vite-plus(prefer-vite-plus-imports): Use 'vite-plus' instead of 'vitest/config' in Vite+ projects.
11+ ╭─[src/index.ts:3:30]
12+ 2 │
13+ 3 │ const configPromise = import('vitest/config');
14+ · ───────────────
15+ 4 │
16+ ╰────
17+
18+ × vite-plus(prefer-vite-plus-imports): Use 'vite-plus/test' instead of 'vitest' in Vite+ projects.
19+ ╭─[src/index.ts:5:24]
20+ 4 │
21+ 5 │ export { expect } from 'vitest';
22+ · ────────
23+ 6 │
24+ ╰────
25+
26+ × vite-plus(prefer-vite-plus-imports): Use 'vite-plus/test' instead of 'vitest' in Vite+ projects.
27+ ╭─[src/types.ts:1:30]
28+ 1 │ type TestFn = (typeof import('vitest'))['test'];
29+ · ────────
30+ 2 │
31+ ╰────
32+
33+ × vite-plus(prefer-vite-plus-imports): Use 'vite-plus/test/browser-playwright' instead of '@vitest/browser-playwright' in Vite+ projects.
34+ ╭─[src/types.ts:3:16]
35+ 2 │
36+ 3 │ declare module '@vitest/browser-playwright' {}
37+ · ────────────────────────────
38+ 4 │
39+ ╰────
40+
41+ × vite-plus(prefer-vite-plus-imports): Use 'vite-plus/client' instead of 'vite/client' in Vite+ projects.
42+ ╭─[src/types.ts:5:25]
43+ 4 │
44+ 5 │ import client = require('vite/client');
45+ · ─────────────
46+ 6 │
47+ ╰────
48+
49+ Found 0 warnings and 6 errors.
50+ Finished in <variable>ms on 2 files with <variable> rules using <variable> threads.
51+
152> vp lint --fix src/index.ts src/types.ts # rewrite vite and vitest imports via the vite-plus oxlint plugin
253Found 0 warnings and 0 errors.
354Finished in <variable>ms on 2 files with <variable> rules using <variable> threads.
Original file line number Diff line number Diff line change 11{
22 "commands" : [
3+ " vp lint src/index.ts src/types.ts # should fail before fix" ,
34 " vp lint --fix src/index.ts src/types.ts # rewrite vite and vitest imports via the vite-plus oxlint plugin" ,
45 " cat src/index.ts" ,
56 " cat src/types.ts" ,
You can’t perform that action at this time.
0 commit comments