Write code that’s easy to read and matches intent (mutability, string composition, UI semantics), and remove obvious clutter.
Apply these rules:
1) Avoid reassignable variables
const when a value isn’t reassigned.
const repository = curriculumLocale === 'english'
? 'freeCodeCamp'
: 'i18n-curriculum';
2) Build static paths/strings directly
join(...)/extra indirection.
const challengesFolder = ['blob', 'main', 'curriculum', 'challenges'].join('/');
const gitPath = [repository, challengesFolder, curriculumLocale, 'blocks', block, `${challengeId}.md'].join('/');
gitURL.pathname = gitURL.pathname + gitPath;
3) Don’t add redundant conditionals when UI state already guarantees behavior
disabled, the handler usually doesn’t need guarding.
```tsx<Button disabled={isClassroomAccount} onClick={updateIsClassroomAccount} /> ```
4) Render links as links; actions as buttons
5) Remove duplicate/unused imports
Enter the URL of a public GitHub repository