Conversation
…CI gate
Phase 1 of cavatelli-typing-debt: eliminate all
@typescript-eslint/no-unused-vars violations in frontend (156 -> 0) and
flip the CI ratchet so the focused gate enforces the rule going forward.
- Removed unused imports, locals, dead helper functions, and unused
destructured props/state across 78 frontend files (mechanical dead-code
removal; no logic changes).
- Intentionally-unused symbols that must stay positionally are _-prefixed
(pizzaAlgorithm shouldUseHalfAndHalf _style) or handled via
ignoreRestSiblings (ReactMarkdown { node, ...props } overrides).
- Unused catch bindings converted to optional catch (} catch {).
- eslint.config.js: no-unused-vars now ['error'] with argsIgnorePattern,
varsIgnorePattern, caughtErrorsIgnorePattern '^_' + ignoreRestSiblings.
- eslint.hooks.config.js (CI gate): registered @typescript-eslint plugin and
added the same no-unused-vars rule so PRs are blocked on regressions.
Verified: npm run lint no-unused-vars count = 0; CI gate command exits 0.
(Pre-existing, out-of-scope: vite build fails on a missing heic2any dep that
also fails on origin/master; not touched here.)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Phase 0 of the typing-debt cleanup (plans/cavatelli-typing-debt.md). Ran `npm run lint -- --fix --report-unused-disable-directives-severity off`. On current master the only safe auto-fixables are 2 prefer-const (let->const, neither reassigned). NOTE: a plain `--fix` ALSO strips eslint-disable directives (ESLint 9 flat config defaults reportUnusedDisableDirectives to "warn"), including deliberate react-hooks/exhaustive-deps suppressions in payments files. That's deliberately EXCLUDED here — stale-directive cleanup is a judgment call handled in a later phase, not a blanket sweep. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 11, 2026
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…cl/useless-catch/constant-binary/etc) + ratchet
Cleared all 34 non-(no-explicit-any/no-unused-vars) ESLint errors and added
each cleared rule to eslint.hooks.config.js as 'error' so the CI gate enforces
them. The two `false &&` constant-binary-expression JSX guards were intentional
feature-hides ("Coming Soon" AI ordering); converted to named const flags
(SHOW_LEGACY_PIZZERIA_SELECTION / SHOW_AI_ORDER_BUTTON) preserving exact runtime
behavior. BOM-strip regexes switched from literal U+FEFF to escape.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One long-lived integration branch for the whole frontend lint/typing-debt cleanup (
plans/cavatelli-typing-debt.md). All phases land here and merge once at the end — single Vercel preview, no incremental master merges.Included so far
eslint --fixsafe auto-fixables (2×prefer-const).no-unused-vars(667 → 511 total problems) + ratcheted the rule to error ineslint.hooks.config.js(the CI gate now blocks regressions). Added_-prefix /ignoreRestSiblingsescape hatches ineslint.config.js.Coming (same branch)
P2 long-tail errors (~39) · P2.5 stale eslint-disable directives · P3
no-explicit-any(342, foundation-first via generated Supabase types) · P4exhaustive-deps(41) + final switch to fullnpm run lint.Notes
lib/api.ts,PaymentsAdminPage.tsx) → I'll rebase on master periodically to keep conflicts manageable.🤖 Generated with Claude Code