Skip to content

style: enforce prefer-const rules in profile, scripts, and background components #677

Description

@kumar-ayan

Describe the changes
Refactored several variable declarations from let to const in files where variables are read but never reassigned. This aligns with the ESLint prefer-const rule to ensure immutability is clearly declared.

To Reproduce/Files Modified:
The following files were modified to replace let with const for unused reassignments:

  1. scripts/recalculate-all-points.ts

    • Changed let projectCount = projectsSnap.size; to const projectCount = projectsSnap.size;
  2. src/components/profile/UserProfile.tsx

    • Changed let docRef and let snap to const docRef and const snap during the asynchronous user document fetch loop.
  3. src/components/ui/InteractiveBackground.tsx

    • Changed let logoAngle = 0; to const logoAngle = 0; in the interactive background animation loop.

Expected behavior
Variables that are never reassigned should use const instead of let to improve code readability, maintainability, and satisfy ESLint's prefer-const rule.

Additional context
These changes were resolved automatically by running npm run lint --fix on the workspace.

Metadata

Metadata

Assignees

Labels

gssoc26This is a official GirlScript Summer of Code label.javascriptPull requests that update javascript codelevel:beginnerBeginner level issuestype:refactor

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions