Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change all usages of var to let or const #727

Open
shaynak opened this issue Jan 18, 2021 · 2 comments
Open

Change all usages of var to let or const #727

shaynak opened this issue Jan 18, 2021 · 2 comments
Labels

Comments

@shaynak
Copy link
Member

shaynak commented Jan 18, 2021

Currently, much of our code uses var; we should move away from using it and change all usages to let (for variables that will be updated) or const (for variables that will not be updated).

@shaynak shaynak changed the title Change all usages of var to let or const Change all usages of var to let or const Jan 18, 2021
@DineshKoushik
Copy link

Hi @shaynak , is the issue still open? Confirming this because it was opened quite a while back.

@erwang01
Copy link
Member

erwang01 commented Dec 6, 2021

@DineshKoushik yep its still open!

Here's a quick count on the number of vars left in the code base:

$ grep var -roc huxley | wc -l     
     782
$ grep var -roc huxley | grep -v :0 
huxley/core/constants.py:1
huxley/core/__pycache__/constants.cpython-39.pyc:1
huxley/db.sqlite3:12
huxley/www/js/constants/GenderConstants.js:3
huxley/www/js/constants/ContactTypes.js:3
huxley/www/js/constants/ProgramTypes.js:3
huxley/www/js/stores/CountryStore.js:1
huxley/www/js/stores/PositionPaperStore.js:5
huxley/www/js/stores/CurrentUserStore.js:4
huxley/www/js/stores/AssignmentStore.js:6
huxley/www/js/stores/CommitteeStore.js:3
huxley/www/js/stores/RubricStore.js:1
huxley/www/js/stores/__tests__/CommitteeStore-test.js:11
huxley/www/js/stores/__tests__/AssignmentStore-test.js:12
huxley/www/js/stores/__tests__/SecretariatMemberStore-test.js:13
huxley/www/js/stores/__tests__/RegistrationStore-test.js:13
huxley/www/js/stores/__tests__/CommitteeFeedbackStore-test.js:17
huxley/www/js/stores/__tests__/CurrentUserStore-test.js:15
huxley/www/js/stores/__tests__/CountryStore-test.js:8
huxley/www/js/stores/__tests__/DelegateStore-test.js:23
huxley/www/js/stores/CommitteeFeedbackStore.js:4
huxley/www/js/stores/SecretariatMemberStore.js:3
huxley/www/js/stores/DelegateStore.js:6
huxley/www/js/stores/NoteStore.js:1
huxley/www/js/stores/RegistrationStore.js:3
huxley/www/js/utils/User.js:4
huxley/www/js/utils/__tests__/User-test.js:4
huxley/www/js/utils/__tests__/formatPhone-test.js:4
huxley/www/js/utils/formatPhone.js:11
huxley/www/js/components/ChairRubricView.js:17
huxley/www/js/components/AdvisorView.js:6
huxley/www/js/components/registration/RegistrationSchoolInformation.js:5
huxley/www/js/components/registration/RegistrationPrimaryContact.js:6
huxley/www/js/components/registration/RegistrationAccountInformation.js:5
huxley/www/js/components/registration/RegistrationSecondaryContact.js:6
huxley/www/js/components/registration/RegistrationPhoneInput.js:2
huxley/www/js/components/registration/RegistrationSpecialCommitteePreferences.js:5
huxley/www/js/components/registration/RegistrationTextInput.js:2
huxley/www/js/components/registration/RegistrationProgramInformation.js:7
huxley/www/js/components/ForgotPasswordView.js:1
huxley/www/js/components/AdvisorAssignmentsView.js:54
huxley/www/js/components/core/TextTemplate.js:4
huxley/www/js/components/core/Button.js:2
huxley/www/js/components/LogoutButton.js:3
huxley/www/js/components/RedirectView.js:4
huxley/www/js/components/DelegateCommitteeFeedbackView.js:23
huxley/www/js/components/AdvisorProfileView.js:26
huxley/www/js/components/RegistrationClosedView.js:5
huxley/www/js/components/RegistrationView.js:2
huxley/www/js/components/DelegateView.js:3
huxley/www/js/components/PaperAssignmentList.js:20
huxley/www/js/components/ChairFeedView.js:1
huxley/www/js/components/RegistrationSuccessView.js:5
huxley/www/js/components/ChairDelegateEmailView.js:22
huxley/www/js/components/DelegatePaperView.js:25
huxley/www/js/components/ChangePasswordView.js:3
huxley/www/js/components/PaperSubmissionTable.js:27
huxley/www/js/components/CountrySelect.js:2
huxley/www/js/components/TopBar.js:4
huxley/www/js/components/PaperGradeTable.js:13
huxley/www/js/components/AdvisorPaperView.js:83
huxley/www/js/components/NotFoundView.js:1
huxley/www/js/components/AdvisorZoomLinkView.js:13
huxley/www/js/components/ChairPapersView.js:47
huxley/www/js/components/PasswordResetSuccessView.js:4
huxley/www/js/components/DelegateNoteView.js:1
huxley/www/js/components/RegistrationWaitlistView.js:5
huxley/www/js/components/ChairCommitteeFeedbackView.js:12
huxley/www/js/components/PermissionDeniedView.js:2
huxley/www/js/components/AdvisorFeedbackView.js:31
huxley/www/js/components/DelegateProfileView.js:15
huxley/www/js/components/ChairAttendanceView.js:40
huxley/www/js/components/LoginView.js:2
huxley/www/js/components/ChairView.js:3
huxley/www/js/components/Huxley.js:36
huxley/www/js/components/AdvisorRosterView.js:36
huxley/www/js/components/NumberInput.js:1
huxley/www/js/components/PhoneInput.js:5
huxley/www/js/components/ChairSummaryView.js:44
huxley/www/js/components/ChairNoteView.js:1
huxley/www/js/components/DelegationAttendanceRow.js:1
huxley/www/js/actions/CommitteeActions.js:1
huxley/www/js/actions/SecretariatMemberActions.js:1
huxley/www/js/actions/NoteActions.js:1
huxley/www/js/actions/RegistrationActions.js:1
huxley/www/js/actions/RubricActions.js:1
huxley/www/js/actions/AssignmentActions.js:1
huxley/www/js/actions/CommitteeFeedbackActions.js:1
huxley/www/js/actions/PositionPaperActions.js:1
huxley/www/js/actions/DelegateActions.js:1
huxley/www/js/actions/__tests__/CurrentUserActions-test.js:4
huxley/www/js/actions/CountryActions.js:1
huxley/www/js/lib/ServerAPI.js:4
huxley/www/js/entry.js:4
huxley/www/static/js/vendor.js:11
huxley/www/static/js/huxley.css:1
huxley/www/static/js/huxley.js:11
huxley/static/js/vendor.js:11
huxley/static/js/huxley.css:1
huxley/static/js/huxley.js:11
huxley/static/admin/js/urlify.js:25
huxley/static/admin/js/inlines.min.js:11
huxley/static/admin/js/core.js:18
huxley/static/admin/js/collapse.js:9
huxley/static/admin/js/actions.js:12
huxley/static/admin/js/prepopulate.js:3
huxley/static/admin/js/admin/RelatedObjectLookups.js:23
huxley/static/admin/js/admin/DateTimeShortcuts.js:51
huxley/static/admin/js/autocomplete.js:4
huxley/static/admin/js/inlines.js:35
huxley/static/admin/js/change_form.js:2
huxley/static/admin/js/SelectFilter2.js:29
huxley/static/admin/js/jquery.init.js:1
huxley/static/admin/js/popup_response.js:1
huxley/static/admin/js/SelectBox.js:42
huxley/static/admin/js/actions.min.js:6
huxley/static/admin/js/calendar.js:23
huxley/static/admin/js/timeparse.js:8
huxley/static/admin/js/prepopulate.min.js:1
huxley/static/admin/js/collapse.min.js:2
huxley/static/admin/js/vendor/jquery/jquery.min.js:1
huxley/static/admin/js/vendor/jquery/jquery.js:330
huxley/static/admin/js/vendor/xregexp/xregexp.min.js:5
huxley/static/admin/js/vendor/xregexp/xregexp.js:43
huxley/static/admin/js/vendor/select2/select2.full.min.js:3
huxley/static/admin/js/vendor/select2/select2.full.js:452
huxley/static/admin/js/vendor/select2/i18n/pt.js:1
huxley/static/admin/js/vendor/select2/i18n/vi.js:1
huxley/static/admin/js/vendor/select2/i18n/lv.js:1
huxley/static/admin/js/vendor/select2/i18n/gl.js:1
huxley/static/admin/js/vendor/select2/i18n/pl.js:1
huxley/static/admin/js/vendor/select2/i18n/el.js:1
huxley/static/admin/js/vendor/select2/i18n/et.js:1
huxley/static/admin/js/vendor/select2/i18n/is.js:1
huxley/static/admin/js/vendor/select2/i18n/ko.js:1
huxley/static/admin/js/vendor/select2/i18n/hr.js:1
huxley/static/admin/js/vendor/select2/i18n/ms.js:1
huxley/static/admin/js/vendor/select2/i18n/fi.js:1
huxley/static/admin/js/vendor/select2/i18n/th.js:1
huxley/static/admin/js/vendor/select2/i18n/ru.js:1
huxley/static/admin/js/vendor/select2/i18n/eu.js:1
huxley/static/admin/js/vendor/select2/i18n/mk.js:1
huxley/static/admin/js/vendor/select2/i18n/ja.js:1
huxley/static/admin/js/vendor/select2/i18n/he.js:1
huxley/static/admin/js/vendor/select2/i18n/bg.js:1
huxley/static/admin/js/vendor/select2/i18n/sr-Cyrl.js:1
huxley/static/admin/js/vendor/select2/i18n/id.js:1
huxley/static/admin/js/vendor/select2/i18n/az.js:1
huxley/static/admin/js/vendor/select2/i18n/ca.js:1
huxley/static/admin/js/vendor/select2/i18n/nb.js:1
huxley/static/admin/js/vendor/select2/i18n/zh-CN.js:1
huxley/static/admin/js/vendor/select2/i18n/zh-TW.js:1
huxley/static/admin/js/vendor/select2/i18n/pt-BR.js:1
huxley/static/admin/js/vendor/select2/i18n/da.js:1
huxley/static/admin/js/vendor/select2/i18n/fa.js:1
huxley/static/admin/js/vendor/select2/i18n/de.js:1
huxley/static/admin/js/vendor/select2/i18n/en.js:1
huxley/static/admin/js/vendor/select2/i18n/sv.js:1
huxley/static/admin/js/vendor/select2/i18n/hi.js:1
huxley/static/admin/js/vendor/select2/i18n/uk.js:1
huxley/static/admin/js/vendor/select2/i18n/cs.js:1
huxley/static/admin/js/vendor/select2/i18n/km.js:1
huxley/static/admin/js/vendor/select2/i18n/fr.js:1
huxley/static/admin/js/vendor/select2/i18n/nl.js:1
huxley/static/admin/js/vendor/select2/i18n/sr.js:1
huxley/static/admin/js/vendor/select2/i18n/hu.js:1
huxley/static/admin/js/vendor/select2/i18n/lt.js:1
huxley/static/admin/js/vendor/select2/i18n/ar.js:1
huxley/static/admin/js/vendor/select2/i18n/sk.js:1
huxley/static/admin/js/vendor/select2/i18n/it.js:1
huxley/static/admin/js/vendor/select2/i18n/es.js:1
huxley/static/admin/js/vendor/select2/i18n/ro.js:1
huxley/static/admin/js/vendor/select2/i18n/tr.js:1
huxley/static/admin/js/prepopulate_init.js:1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants