Skip to content

Upgrade ESLint and fix no-unused-vars mapped type errors#8050

Merged
gilluminate merged 2 commits into
mainfrom
gill/eslint-upgrade-unused-vars-fix
Apr 28, 2026
Merged

Upgrade ESLint and fix no-unused-vars mapped type errors#8050
gilluminate merged 2 commits into
mainfrom
gill/eslint-upgrade-unused-vars-fix

Conversation

@gilluminate
Copy link
Copy Markdown
Contributor

@gilluminate gilluminate commented Apr 28, 2026

Description Of Changes

Upgrades ESLint in admin-ui and fixes the 5 @typescript-eslint/no-unused-vars errors introduced by the stricter rule. The newer ESLint now flags mapped type index variables (e.g. [K in SomeType]) as "defined but never used."

The fix replaces mapped type syntax with the equivalent Record<> / Partial<Record<>> utility types, which avoids declaring an index variable entirely.

Code Changes

  • Upgraded ESLint in clients/admin-ui/package.json (+ lockfile)
  • RequestStatusBadge.tsx: { [_status in PrivacyRequestStatus]: ... }Record<PrivacyRequestStatus, ...>
  • allIntegrationTypes.tsx: { [K in ConnectionType]?: ... }Partial<Record<ConnectionType, ...>>
  • helpers.tsx: { [Property in keyof ExperienceTranslationCreate]?: ... }Partial<Record<keyof ExperienceTranslationCreate, ...>>
  • cells.tsx: { [key in PrivacyRequestStatus]: ... }Record<PrivacyRequestStatus, ...>
  • MultipleSystemsFilterModal.tsx: { [key in keyof typeof VendorSources]: ... }Record<keyof typeof VendorSources, ...>

Steps to Confirm

  1. CI pipelines succeed

Pre-Merge Checklist

  • Issue requirements met
  • All CI pipelines succeeded
  • CHANGELOG.md updated
    • Updates unreleased work already in Changelog, no new entry necessary
  • UX feedback:
    • No UX review needed
  • Followup issues:
    • No followup issues
  • Database migrations:
    • No migrations
  • Documentation:
    • No documentation updates required

🤖 Generated with Claude Code

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
fides-plus-nightly Ignored Ignored Preview Apr 28, 2026 8:12pm
fides-privacy-center Ignored Ignored Apr 28, 2026 8:12pm

Request Review

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 28, 2026

Dependency Review

✅ No vulnerabilities found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA 6746b2e.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

Scanned Files

  • clients/admin-ui/package.json
  • clients/package-lock.json

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 28, 2026

Title Lines Statements Branches Functions
admin-ui Coverage: 8%
6.31% (2799/44303) 5.55% (1402/25225) 4.41% (579/13105)
fides-js Coverage: 78%
79.39% (2011/2533) 65.99% (1240/1879) 73.09% (345/472)
privacy-center Coverage: 88%
85.97% (331/385) 81.36% (179/220) 78.87% (56/71)

@gilluminate gilluminate marked this pull request as ready for review April 28, 2026 20:10
@gilluminate gilluminate requested a review from a team as a code owner April 28, 2026 20:10
@gilluminate gilluminate requested review from jpople and removed request for a team April 28, 2026 20:10
gilluminate and others added 2 commits April 28, 2026 14:11
Replace mapped type syntax ([key in X]: Y) with Record<X, Y> utility
types to satisfy the stricter @typescript-eslint/no-unused-vars rule
in the upgraded ESLint version.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@gilluminate gilluminate force-pushed the gill/eslint-upgrade-unused-vars-fix branch from c29aad3 to 6746b2e Compare April 28, 2026 20:12
Copy link
Copy Markdown
Contributor

@kruulik kruulik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@gilluminate gilluminate enabled auto-merge April 28, 2026 20:20
@gilluminate gilluminate added this pull request to the merge queue Apr 28, 2026
Merged via the queue into main with commit 8c80da3 Apr 28, 2026
54 checks passed
@gilluminate gilluminate deleted the gill/eslint-upgrade-unused-vars-fix branch April 28, 2026 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants