build(frontend): close the lint gaps the E32 audit measured
eslint now also enforces: - the React Compiler diagnostics that `recommended` leaves out (todo, memo-dependencies and ten zero-hit tripwires); - a description on every suppression, and no blanket disables; - no focused or skipped tests (vitest and playwright); - the typed pair no-floating-promises and no-deprecated. Lint also covers e2e/ and the TypeScript build configs, which `eslint .` had been skipping in silence. Every hit is fixed or suppressed inline with a named reason: - The 31 try statements the compiler cannot lower yet carry a suppression until S3 rewrites them. Five other compiler skips were plain fixes: a module counter bumped inside a hook, a ref read in a default parameter, and a local named like the <section> it renders. - The real defects behind floating promises are fixed. ChatDock threw at nobody when the device key store could not be opened. VideoEditor's play() rejection went unhandled. loadYouTubeApi never rejected, so a blocked IFrame API left the player on an empty stage forever; it now fails on a script error or after 15 s, shows its own error with the way out, and lets the next open try again. - MutableRefObject, FormEvent and lucide's deprecated brand icon are replaced. The YouTube glyph now lives in lib/brandIcons. - The lint-probe harness lets its virtual file names into TypeScript's default project, so the contract tests still run the real config.
This commit is contained in:
@@ -24,21 +24,24 @@
|
||||
"noUnusedParameters": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"resolveJsonModule": true,
|
||||
// The build-tool configs include two hand-written .js files (tailwind/postcss). checkJs runs
|
||||
// the type checker over them via their `@type` JSDoc, so a bad tailwind/postcss option is
|
||||
// caught by the gate instead of silently mis-building CSS. Was the last hole in C-4.5.
|
||||
// The build-tool configs include a hand-written .js file (postcss; tailwind 4 needs no config
|
||||
// file, and the stale `tailwind.config.js` entry pointed at nothing until E32). checkJs runs
|
||||
// the type checker over it via its `@type` JSDoc, so a bad option is caught by the gate instead
|
||||
// of silently mis-building CSS. Was the last hole in C-4.5.
|
||||
"allowJs": true,
|
||||
"checkJs": true
|
||||
},
|
||||
// reactPlugin.ts is the ONE React transform both configs import (E27 S1) — it is build tooling,
|
||||
// not app source, so it belongs here and not under tsconfig.json's ["src"]. A file imported by a
|
||||
// listed one but absent from `include` is TS6307, not a silent pass.
|
||||
// listed one but absent from `include` is TS6307, not a silent pass. playwright.config.ts is
|
||||
// here as well as in e2e/tsconfig.json because eslint's typed rules (E32) find a file's project
|
||||
// through tsconfig.json's `references`, which name this project and not the e2e one.
|
||||
"include": [
|
||||
"vite.config.ts",
|
||||
"vitest.config.ts",
|
||||
"reactPlugin.ts",
|
||||
"devOnlyGuard.ts",
|
||||
"tailwind.config.js",
|
||||
"playwright.config.ts",
|
||||
"postcss.config.js"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user