diff --git a/CLAUDE.md b/CLAUDE.md index 903fc96132..2679d77688 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -13,6 +13,7 @@ For detailed project documentation (architecture, commands, workflows, etc.), se - **GitHub Actions workflows ARE allowed to commit/push** - When running as part of `spec-*.yml` or `impl-*.yml` workflows, creating branches, commits, and PRs is expected and required. - **Always write in English** - All output text (code comments, commit messages, PR descriptions, issue comments, documentation) must be in English, even if the user writes in another language. - **Update documentation when making changes** - When adding new features, events, or modifying behavior, always check if related documentation needs updating (e.g., `docs/reference/plausible.md` for analytics events, `docs/workflows/` for workflow changes, `docs/contributing.md` for user-facing changes). +- **Fix small build/test blockers directly, even when out of scope** - If a typecheck error, failing test, lint failure, or other small pipeline blocker shows up while working on something unrelated (incl. things the current PR was not meant to touch), fix it in the same PR or a tiny follow-up — never leave it parked under "out of scope". A latent `tsc` error that doesn't surface locally will silently break the next Cloud Build, which deploys nothing new and leaves production stale even though every PR check looks green (this is exactly how PR #6961's frontend fixes never reached anyplot.ai — the unrelated `prism/r` TS7016 from #6944 was deferred, then blocked the next `yarn build`). The bar: if the fix is < ~20 lines and obviously correct, just do it; if it would expand scope meaningfully, ask first rather than deferring silently. ## PR Follow-Through (mandatory after every `gh pr create`) diff --git a/app/src/types/react-syntax-highlighter.d.ts b/app/src/types/react-syntax-highlighter.d.ts new file mode 100644 index 0000000000..bb0c86e25a --- /dev/null +++ b/app/src/types/react-syntax-highlighter.d.ts @@ -0,0 +1,9 @@ +// @types/react-syntax-highlighter ships an ambient declaration for this path, +// but TypeScript's bundler module resolution doesn't pick it up — it resolves +// the import to the sibling `.js` file before consulting the @types index, +// breaking `tsc` (and therefore the Cloud Build `yarn build` step) with TS7016. +// A project-local shim wins over @types, so this is enough to unblock the build. +declare module 'react-syntax-highlighter/dist/esm/languages/prism/r' { + const language: unknown; + export default language; +}