chore(tooling): ignore foreman in lint, relax script rules, force NODE_ENV=test in vitest
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
18fb7ef99d
commit
34017d8630
3 changed files with 26 additions and 1 deletions
|
|
@ -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",
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
import * as React from "react";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {}
|
||||
export type InputProps = React.InputHTMLAttributes<HTMLInputElement>;
|
||||
|
||||
const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
||||
({ className, type, ...props }, ref) => {
|
||||
|
|
|
|||
|
|
@ -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: [
|
||||
|
|
|
|||
Loading…
Reference in a new issue