956c71cd7b
Replace ESLint with Biome for ~14x faster linting (~360ms vs ~5s). - Add biome.json with rules matching ESLint parity (Next.js, a11y, TypeScript, unused vars/imports) - Remove eslint, @typescript-eslint/*, eslint-config-next, eslint-plugin-jsx-a11y, @eslint/* from deps - Remove eslint.config.mjs - Update lint script to: tsgo --noEmit && biome check . - Fix 11 real code issues caught by Biome (banned types, explicit any, unsafe finally, unreachable code, shadowed names) - Disable Biome formatter (Prettier stays for Tailwind class sorting) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
56 lines
1.4 KiB
TypeScript
56 lines
1.4 KiB
TypeScript
import tsconfigPaths from 'vite-tsconfig-paths';
|
|
import { defineConfig } from 'vitest/config';
|
|
import { playwright } from '@vitest/browser-playwright';
|
|
import { loadEnvFile } from './vitest.env.mts';
|
|
|
|
// Load .env and .env.web so browser tests have the same env as the web app.
|
|
const env = { ...loadEnvFile('.env'), ...loadEnvFile('.env.web') };
|
|
|
|
export default defineConfig({
|
|
plugins: [tsconfigPaths()],
|
|
define: {
|
|
'process.env': JSON.stringify(env),
|
|
},
|
|
resolve: {
|
|
conditions: ['development'],
|
|
},
|
|
optimizeDeps: {
|
|
include: [
|
|
'js-md5',
|
|
'@tauri-apps/plugin-fs',
|
|
'@tauri-apps/plugin-http',
|
|
'@tauri-apps/api/path',
|
|
'@tauri-apps/api/core',
|
|
'@zip.js/zip.js',
|
|
'franc-min',
|
|
'iso-639-2',
|
|
'iso-639-3',
|
|
'uuid',
|
|
'jwt-decode',
|
|
'@supabase/supabase-js',
|
|
],
|
|
exclude: [
|
|
'@tursodatabase/database-wasm',
|
|
'@tursodatabase/database-wasm-common',
|
|
'@tursodatabase/database-common',
|
|
],
|
|
},
|
|
server: {
|
|
headers: {
|
|
'Cross-Origin-Embedder-Policy': 'require-corp',
|
|
'Cross-Origin-Opener-Policy': 'same-origin',
|
|
},
|
|
},
|
|
test: {
|
|
include: ['src/**/*.browser.test.ts'],
|
|
onConsoleLog(_log, type) {
|
|
if (type === 'stdout') return false;
|
|
},
|
|
browser: {
|
|
enabled: true,
|
|
provider: playwright(),
|
|
instances: [{ browser: 'chromium' }],
|
|
},
|
|
},
|
|
});
|