Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .changeset/4850-misplaced-eslint-disable.md
Original file line number Diff line number Diff line change
@@ -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<string, any>;`. 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.
6 changes: 6 additions & 0 deletions apps/console/src/pages/developer/PublicFormsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 : '';
Expand Down
1 change: 1 addition & 0 deletions packages/react/src/SchemaRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, any>;

/**
Expand Down
Loading