mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-12 09:54:16 -05:00
[PR #1113] [MERGED] Fix ESLint issues: prefer-const warnings and missing semicolons #958
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/fosrl/pangolin/pull/1113
Author: @Copilot
Created: 7/22/2025
Status: ✅ Merged
Merged: 8/10/2025
Merged by: @oschwartz10612
Base:
main← Head:copilot/fix-1112📝 Commits (10+)
b5afd73Initial plan4f5091eInitial commit: Document plan to fix ESLint issues2259879Fix ESLint issues: prefer-const warnings and missing semicolonsa2526eaRevert mappings variable from const to let in getAllRelays.ts27ac204Fix variables incorrectly changed from let to const - revert to let where variables are reassigned4701da2Fix a few consts to letse9e6b0bMerge branch 'main' into copilot/fix-11120edb3cdMerge branch 'main' of github.com:fosrl/pangolin into copilot/fix-1112c3723d0Add semiea27075Lint fix📊 Changes
40 files changed (+52 additions, -51 deletions)
View changed files
📝
server/lib/ip.ts(+2 -2)📝
server/lib/rateLimitStore.ts(+1 -1)📝
server/routers/accessToken/listAccessTokens.ts(+1 -1)📝
server/routers/gerbil/getAllRelays.ts(+2 -2)📝
server/routers/gerbil/getConfig.ts(+1 -1)📝
server/routers/idp/createOidcIdp.ts(+1 -1)📝
server/routers/idp/updateOidcIdp.ts(+1 -1)📝
server/routers/idp/validateOidcCallback.ts(+2 -2)📝
server/routers/newt/handleNewtPingRequestMessage.ts(+1 -1)📝
server/routers/olm/handleOlmPingMessage.ts(+2 -2)📝
server/routers/olm/handleOlmRegisterMessage.ts(+1 -1)📝
server/routers/resource/listResourceRules.ts(+2 -2)📝
server/routers/resource/listResources.ts(+1 -1)📝
server/routers/role/listRoles.ts(+1 -1)📝
server/routers/site/listSites.ts(+1 -1)📝
server/routers/site/pickSiteDefaults.ts(+1 -1)📝
server/routers/target/helpers.ts(+3 -3)📝
server/routers/target/listTargets.ts(+2 -2)📝
server/routers/ws/ws.ts(+1 -1)📝
server/setup/scriptsPg/1.6.0.ts(+1 -1)...and 20 more files
📄 Description
This PR resolves all ESLint issues identified in the codebase by fixing
prefer-constwarnings and missing semicolon errors.Issues Fixed
Before:
prefer-constwarnings - variables declared withletthat are never reassignedAfter:
Changes Made
Automated Fixes (ESLint --fix)
--fixcapability to automatically resolve 58 out of 70 issueslettoconstfor variables that are never reassigned across server routers and React componentsManual Fixes
prefer-constwarnings in migration scripts where ESLint couldn't auto-fix due to declaration/assignment separationFiles Modified
server/andsrc/directoriesImpact
constvsletusageVerification
Fixes #1112.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.