mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
c9dd12473b
Adds oxlint RuleTester cases for the lint rule introduced in #5025, per review feedback: valid two-arg forms don't false-positive (including a single-arg `.record()` on a non-`z` object), the single-arg form fires with correct autofix output (plain and chained `.optional()`), and a spread argument reports without a fix. Since the guarded bug is type-level, this rule is the real regression guard, so it warrants direct coverage. oxlint's RuleTester requires Node >= 22; the cases are gated to skip on older runtimes so the Node 20 CI job stays green (the rule itself is exercised on every Node via the oxlint job). Extends the react-ui vitest include to pick up co-located oxlint-rules tests. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
12 lines
287 B
JavaScript
12 lines
287 B
JavaScript
import { defineConfig } from "vitest/config";
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
environment: "node",
|
|
globals: true,
|
|
include: ["src/**/*.{test,spec}.ts", "oxlint-rules/**/*.{test,spec}.mjs"],
|
|
reporters: [["default", { summary: false }]],
|
|
silent: true,
|
|
},
|
|
});
|