Repository navigation
fix: resolve all ESLint warnings in web/ (issue #437) - #526
Merged
Merged
Conversation
- Remove unused VisibilityBar, InfoTip, ColHead components and their orphaned imports (useRef, createPortal, HelpCircle) from competitors/page.tsx - Add scoped eslint-disable comments with reason for <img> tags in shopping/page.tsx and ai-provider-avatar.tsx (arbitrary remote domains make next/image remotePatterns would need an open-ended wildcard) - Remove stale eslint-disable comment from opengraph-image.tsx - Remove unused variable isCloud from traffic/page.tsx - Remove unused destructured variable data from sign-in-form.tsx - Remove unused import Link from sign-up-form.tsx Fixes #437
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.
Summary
Fixes #437
Eliminates all 8 ESLint warnings from
npx eslint srcwith 0 regressions(
npx tsc --noEmitand✓ Compiled successfullyboth pass clean).Changes
competitors/page.tsx— Remove 3 unused components + orphaned importsVisibilityBarandColHeadwere defined but never referenced in JSX.Deleting
ColHeadexposedInfoTipas also orphaned (it was only usedby
ColHead), so that was removed too. Their imports were then cleaned up:useReffrom thereactimportimport { createPortal } from 'react-dom'HelpCirclefrom thelucide-reactimport blockshopping/page.tsx— Suppressno-img-elementwith reason commentThe
<img>tag at line 693 loads product images from arbitrary merchantdomains. Migrating to
next/imagewould require adding an open-endedwildcard to
remotePatternsinnext.config.ts, which is a broaderchange outside the scope of this issue. Added a scoped
eslint-disable-next-linecomment with an explanation.traffic/page.tsx— Remove unused variableisCloudconst isCloud = process.env.NEXT_PUBLIC_IS_CLOUD === 'true'wasassigned at line 138 but never read anywhere in the file. Deleted.
opengraph-image.tsx— Remove staleeslint-disabledirectiveThe
{/* eslint-disable-next-line @next/next/no-img-element */}commentwas flagged as unused because ESLint's
no-img-elementrule does notfire inside Next.js
ImageResponseJSX. The directive was suppressingnothing, so it was removed. The
<img>tag itself is untouched.ai-provider-avatar.tsx— Suppressno-img-elementwith reason commentThe
<img>tag at line 168 loads AI provider favicon icons fromarbitrary remote domains. Same reasoning as
shopping/page.tsx— anopen-ended
remotePatternswildcard would be needed fornext/image,which is out of scope here. Added a scoped
eslint-disable-next-linecomment with an explanation.
sign-in-form.tsx— Remove unused destructured variabledataconst { data, error }at line 33 —datawas destructured from theSupabase
signInWithPasswordresponse but never used. Changed toconst { error }.sign-up-form.tsx— Remove unused importLinkLinkwas imported from@/i18n/navigationat line 6 but not usedanywhere in the component. Removed from the import.
Testing