- Add vitest coverage-v8 plugin and configure coverage thresholds (80% lines) - Add coverage exclusions for server-only pages, DB layer, and ML backends - Create eslint-disable annotations for test mocks and setup - Exclude test files from tsconfig to avoid type errors on mocks - Rewrite API route tests (diseases, plants) for async diseases-db imports - Update component tests (EmptyState, Footer, Navbar, LoadingSkeleton, ResultsDashboard, ImageUpload) to match current component implementations - Add page-level tests for homepage, 404, and results page - Fix upload-client tests with proper mock resets in beforeEach - Add diseases-db module as async knowledge base backend - Refactor API routes to use async diseases-db (listDiseases, getDiseaseById, getPlantById, getLookalikeDiseases, etc.) - Add plant field to PredictionResult type and identify route response - Add KB generation scripts (plant-list, disease-templates, generate-full-kb) - Update constants with expanded featured plants and trust signals - Fix ResultsDashboard to use plant from prediction result instead of DB lookup
36 lines
751 B
JSON
36 lines
751 B
JSON
{
|
|
"compilerOptions": {
|
|
"target": "ES2017",
|
|
"lib": ["dom", "dom.iterable", "esnext"],
|
|
"allowJs": true,
|
|
"skipLibCheck": true,
|
|
"strict": true,
|
|
"noEmit": true,
|
|
"types": ["vitest/globals"],
|
|
"esModuleInterop": true,
|
|
"module": "esnext",
|
|
"moduleResolution": "bundler",
|
|
"resolveJsonModule": true,
|
|
"isolatedModules": true,
|
|
"jsx": "react-jsx",
|
|
"incremental": true,
|
|
"plugins": [
|
|
{
|
|
"name": "next"
|
|
}
|
|
],
|
|
"paths": {
|
|
"@/*": ["./src/*"]
|
|
}
|
|
},
|
|
"include": [
|
|
"next-env.d.ts",
|
|
"**/*.ts",
|
|
"**/*.tsx",
|
|
".next/types/**/*.ts",
|
|
".next/dev/types/**/*.ts",
|
|
"**/*.mts"
|
|
],
|
|
"exclude": ["node_modules", "**/*.test.ts", "**/*.test.tsx", "src/test/**"]
|
|
}
|