Skip to content

refactor: use const for un-reassigned variables #677#683

Merged
Aditya948351 merged 1 commit into
devpathindcommunity-india:masterfrom
kumar-ayan:fix/eslint-prefer-const
Jun 21, 2026
Merged

refactor: use const for un-reassigned variables #677#683
Aditya948351 merged 1 commit into
devpathindcommunity-india:masterfrom
kumar-ayan:fix/eslint-prefer-const

Conversation

@kumar-ayan

Copy link
Copy Markdown
Contributor

Description

Refactored several variable declarations from let to const across the codebase in files where variables are read but never reassigned. This aligns with the ESLint prefer-const rule to enforce immutability.

The following files were updated:

  • recalculate-all-points.ts (updated projectCount)
  • UserProfile.tsx (updated docRef and snap in the document fetch loop)
  • InteractiveBackground.tsx (updated logoAngle)

Fixes #677

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Ran npm run lint locally on the modified files to verify the prefer-const warnings were successfully resolved.

  • Local testing

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have checked that the "DevPath India" branding remains intact

@github-actions github-actions Bot added gssoc26 This is a official GirlScript Summer of Code label. javascript Pull requests that update javascript code level:beginner Beginner level issues type:refactor labels Jun 21, 2026
@kumar-ayan

Copy link
Copy Markdown
Contributor Author

Hey @devpathindcommunity-india,

The lint check failure is not caused by these changes. The ESLint errors (~306) are pre-existing issues in the codebase (mainly any type violations in src/types/three.d.ts, setState calls in effects, and unused variables).

This PR only modifies 3 lines to convert letconst, which are valid prefer-const fixes and don't introduce any new lint violations.

@Aditya948351 Aditya948351 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Great work. Merging it!

@Aditya948351 Aditya948351 merged commit 1cab226 into devpathindcommunity-india:master Jun 21, 2026
3 of 4 checks passed
@Aditya948351 Aditya948351 added the gssoc:approved give 50+ base points label Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved give 50+ base points gssoc26 This is a official GirlScript Summer of Code label. javascript Pull requests that update javascript code level:beginner Beginner level issues type:refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants