From 34017d86306d8ab2ee51bf45fd150e508c071f16 Mon Sep 17 00:00:00 2001 From: DEls Date: Sun, 25 Oct 2026 23:12:57 +0200 Subject: [PATCH] chore(tooling): ignore foreman in lint, relax script rules, force NODE_ENV=test in vitest Co-Authored-By: Claude Opus 5.5 --- eslint.config.mjs | 20 ++++++++++++++++++++ src/components/ui/input.tsx | 2 +- vitest.config.ts | 5 +++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index ccc6133..ea43051 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -23,5 +23,25 @@ export default defineConfig([ ".opencode/**", ".freebuff/**", ".playwright-mcp/**", + // foreman is a standalone Ink terminal tool, not part of the Next app. + "foreman/**", ]), + { + // Node scripts and config files: CommonJS requires and loosely typed + // one-off helpers are normal here. + files: ["scripts/**", "next.config.js"], + rules: { + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-require-imports": "off", + }, + }, + { + files: ["**/*.{js,jsx,mjs,ts,tsx,mts,cts}"], + // New React Compiler rules from eslint-config-next 16: surfaced as + // warnings until the existing effects/refs are reworked deliberately. + rules: { + "react-hooks/set-state-in-effect": "warn", + "react-hooks/refs": "warn", + }, + }, ]); diff --git a/src/components/ui/input.tsx b/src/components/ui/input.tsx index e4d18b8..55ed50d 100644 --- a/src/components/ui/input.tsx +++ b/src/components/ui/input.tsx @@ -3,7 +3,7 @@ import * as React from "react"; import { cn } from "@/lib/utils"; -export interface InputProps extends React.InputHTMLAttributes {} +export type InputProps = React.InputHTMLAttributes; const Input = React.forwardRef( ({ className, type, ...props }, ref) => { diff --git a/vitest.config.ts b/vitest.config.ts index deb38ca..d5a060c 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -1,6 +1,11 @@ import { defineConfig } from "vitest/config"; import path from "node:path"; +// React only exposes `act` in its development build, so a shell with +// NODE_ENV=production would break every component test. Vitest only sets +// NODE_ENV when it is unset, so force it. +process.env.NODE_ENV = "test"; + export default defineConfig({ resolve: { alias: [