mirror of
https://github.com/kuhyx/testsAndMisc-archive.git
synced 2026-11-10 18:07:09 +01:00
bucket_catch: fix typecheck so build works and eslint runs
npm run build and npm run lint were both failing at HEAD on two errors:
TS2769 vitest 4 no longer contributes `test` to vite's defineConfig, so
the /// <reference types="vitest" /> directive had gone inert
TS6133 an unused `const { result } =` in usePuzzleGameLoop.test.ts
Because lint is `tsc --noEmit && eslint src`, the failing tsc short-circuited
the &&, so eslint had never actually run on this package. Fixing tsc unmasks
45 pre-existing eslint errors across 10 files -- 18 no-non-null-assertion,
10 unbound-method, 9 non-nullable-type-assertion-style, and a tail. Those need
per-site judgment and are NOT fixed here; lint still exits 1 on them.
So this does not make lint green. It makes build work (52 modules, was
failing) and makes the eslint failures visible instead of hidden behind a
short-circuit. Coverage unchanged at 583/217/97/534, which is what proves the
config is still read after changing its import.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY
This commit is contained in:
parent
06cc07b2c2
commit
5ccaeca890
@ -228,7 +228,7 @@ describe("usePuzzleGameLoop", () => {
|
||||
|
||||
// Use large canvas so piece doesn't collide on first tick
|
||||
const canvas = makeCanvas(800, 600); // basketY=520; piece reaches it at tick~190
|
||||
const { result } = renderHook(() =>
|
||||
renderHook(() =>
|
||||
usePuzzleGameLoop(
|
||||
makeRef<HTMLCanvasElement | null>(canvas),
|
||||
makeRef(500), // far from x=48 → piece will miss
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
/// <reference types="vitest" />
|
||||
import { defineConfig } from "vite";
|
||||
// vitest 4 no longer contributes the `test` key to vite's own defineConfig, so
|
||||
// the config is typed by importing defineConfig from vitest/config instead of
|
||||
// the (now inert) triple-slash reference.
|
||||
import { defineConfig } from "vitest/config";
|
||||
import react from "@vitejs/plugin-react";
|
||||
|
||||
export default defineConfig({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user