diff --git a/.husky/pre-commit b/.husky/pre-commit index 4f3fd73344..376d9947c6 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,2 +1,3 @@ npx lint-staged node scripts/check-docs-sync.mjs +npm run test:unit diff --git a/eslint.config.mjs b/eslint.config.mjs index 52e74dba08..0b02a757c2 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -24,16 +24,34 @@ const eslintConfig = [ "react-hooks/rules-of-hooks": "off", }, }, - // Global ignores (open-sse and tests REMOVED — now linted) + // Global ignores — keep ESLint scoped to source files only { ignores: [ + // Next.js build output ".next/**", "out/**", "build/**", "next-env.d.ts", + // Scripts and binaries "scripts/**", "bin/**", + // Dependencies "node_modules/**", + // VS Code extension and its large test fixtures + "vscode-extension/**", + // Electron app + "electron/**", + // Docs + "docs/**", + // Open-SSE compiled/bundled output + "open-sse/mcp-server/dist/**", + // Playwright test output + "playwright-report/**", + "test-results/**", + // Subdirectory .next build output (app/ subdir) + "app/.next/**", + // CLI package copy directory + "clipr/**", ], }, ]; diff --git a/tests/unit/auth-clear-account-error.test.mjs b/tests/unit/auth-clear-account-error.test.mjs index cb7f283f7f..7f957a1ccd 100644 --- a/tests/unit/auth-clear-account-error.test.mjs +++ b/tests/unit/auth-clear-account-error.test.mjs @@ -24,7 +24,6 @@ test.after(() => { test("clearAccountError clears stale provider error metadata after recovery", async () => { await resetStorage(); - core.getDbInstance().exec('ALTER TABLE provider_connections ADD COLUMN "group" TEXT'); const created = await providersDb.createProviderConnection({ provider: "codex", diff --git a/tests/unit/auth-clear-provider-routes.test.mjs b/tests/unit/auth-clear-provider-routes.test.mjs index 30c192ee2e..e67cb5245b 100644 --- a/tests/unit/auth-clear-provider-routes.test.mjs +++ b/tests/unit/auth-clear-provider-routes.test.mjs @@ -16,7 +16,6 @@ async function resetStorage() { core.resetDbInstance(); fs.rmSync(TEST_DATA_DIR, { recursive: true, force: true }); fs.mkdirSync(TEST_DATA_DIR, { recursive: true }); - core.getDbInstance().exec('ALTER TABLE provider_connections ADD COLUMN "group" TEXT'); } async function seedOpenAIConnection(email) {