25 lines
838 B
JSON
25 lines
838 B
JSON
{
|
||
"compilerOptions": {
|
||
"target": "ES2020",
|
||
"useDefineForClassFields": true,
|
||
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
||
"module": "ESNext",
|
||
"skipLibCheck": true,
|
||
"moduleResolution": "bundler",
|
||
"allowImportingTsExtensions": true,
|
||
"resolveJsonModule": true,
|
||
"isolatedModules": true,
|
||
"noEmit": true,
|
||
"jsx": "react-jsx",
|
||
"strict": true,
|
||
"noUnusedLocals": true,
|
||
"noUnusedParameters": true,
|
||
"noFallthroughCasesInSwitch": true,
|
||
// vitest 的 globals: true 让 describe/it/expect 无需 import;
|
||
// jest-dom 提供 toBeInTheDocument 等 matcher 的类型。
|
||
// 不加这两个的话 tsc --noEmit 会把整套测试报成「找不到名称」。
|
||
"types": ["vitest/globals", "@testing-library/jest-dom"]
|
||
},
|
||
"include": ["src", "test/components", "vitest.config.ts"]
|
||
}
|