diff --git a/.changeset/4850-misplaced-eslint-disable.md b/.changeset/4850-misplaced-eslint-disable.md new file mode 100644 index 0000000000..06a3767dab --- /dev/null +++ b/.changeset/4850-misplaced-eslint-disable.md @@ -0,0 +1,21 @@ +--- +--- + +Comment-only fix: two `eslint-disable-next-line` directives were placed on the +wrong line and had never suppressed anything since they landed. + +- `apps/console/src/pages/developer/PublicFormsPage.tsx` — the + `react-hooks/exhaustive-deps` directive was an inline block comment inside the + `useEffect(() => { load(); }, [])` statement, so its "next line" was a blank + line, not the statement itself. Moved above the statement with the reason + written out (mount-once by design; refresh is explicit via the Refresh + button and post-mutation `await load()` calls). +- `packages/react/src/SchemaRenderer.tsx` — the + `@typescript-eslint/no-explicit-any` directive's `--` reason wrapped onto a + second comment line, so its "next line" was that continuation comment, not + `type ForwardedProps = Record;`. Collapsed to one line so the + directive is immediately above its target. + +No logic changes. Verified with `eslint --report-unused-disable-directives`: +both directives are now effective (the two warnings they were meant to +suppress are gone) and neither directive is reported unused. diff --git a/apps/console/src/pages/developer/PublicFormsPage.tsx b/apps/console/src/pages/developer/PublicFormsPage.tsx index 97440deb26..c3d518be41 100644 --- a/apps/console/src/pages/developer/PublicFormsPage.tsx +++ b/apps/console/src/pages/developer/PublicFormsPage.tsx @@ -179,6 +179,12 @@ export function PublicFormsPage() { } }; + // `load` is intentionally omitted from the dependency array: this effect is a + // mount-once fetch. Refresh is driven by the explicit Refresh button + // (`onClick={load}` below) and by explicit `await load()` calls after + // publish/save (see the file-level doc comment), not by re-running on every + // `load` identity change. + // eslint-disable-next-line react-hooks/exhaustive-deps useEffect(() => { load(); }, []); const origin = typeof window !== 'undefined' ? window.location.origin : ''; diff --git a/packages/react/src/SchemaRenderer.tsx b/packages/react/src/SchemaRenderer.tsx index 54b1928b9b..db11eaa51a 100644 --- a/packages/react/src/SchemaRenderer.tsx +++ b/packages/react/src/SchemaRenderer.tsx @@ -411,6 +411,7 @@ export interface SchemaRendererProps { * and `packages/react/README.md` documents callers relying on it. The `any` is * the point: this is a pass-through channel, not a typed prop. */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any -- see doc comment above: the forwarded value is opaque to this component by construction. type ForwardedProps = Record; /**