[Refactor:Developer] Clean up ESLint globals in forum.js#12631
Merged
williamjallen merged 2 commits intoMar 23, 2026
Merged
Conversation
williamjallen
approved these changes
Mar 23, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12631 +/- ##
=========================================
Coverage 21.66% 21.66%
Complexity 9639 9639
=========================================
Files 268 268
Lines 36226 36226
Branches 487 487
=========================================
Hits 7847 7847
Misses 27896 27896
Partials 483 483
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
GarvitKhandelwal31
pushed a commit
to GarvitKhandelwal31/Submitty
that referenced
this pull request
Mar 25, 2026
) ### Why is this Change Important & Necessary? Partially addresses Submitty#10506 . forum.js file uses // eslint-disable-next-line no-undef comments instead of properly declaring globals in '/*global*/' comments at the top of the file. ### What is the New Behavior? Added proper '/*global*/' declarations and removed // eslint-disable-next-line no-undef comments for global variables in: - forum.js ### Remaining 'no-undef' comments Some // eslint-disable-next-line no-undef comments remain in forum.js for the variables (box, newelement, newcatcolorpicker, unread_marked, thread_id) that are undeclared local variables , not global variables. Similarly, server.js file (noted in pr Submitty#12618 ) had no global variables but only local undeclared variables. Both fixes would require functional changes of declaring let and const variables, and possibly affecting any global dependencies on those variables. ### Clarification to close issue Should these local variable fixes be handled in the next PR to close this issue or will they be addressed as a separate issue? ### What steps should a reviewer take to reproduce or test the bug or new feature? 1. Open the modified file and verify that more global variables have been added at the top of the file. 2. Verify that // eslint-disable-next-line no-undef comments have been removed from lines preceding global variables. 3. Confirm that other eslint comments, for instance 'no-restricted-syntax', and comments before local variables (box, newelement, newcatcolorpicker, unread_marked, thread_id) are untouched. ### Automated Testing & Documentation ESLint passes on all modified files. No functional changes, only lint comments were cleaned up and global declarations added. ### Other information This is not a breaking change. No migrations or security concerns. Co-authored-by: William Allen <[email protected]>
GarvitKhandelwal31
pushed a commit
to GarvitKhandelwal31/Submitty
that referenced
this pull request
Mar 29, 2026
) ### Why is this Change Important & Necessary? Partially addresses Submitty#10506 . forum.js file uses // eslint-disable-next-line no-undef comments instead of properly declaring globals in '/*global*/' comments at the top of the file. ### What is the New Behavior? Added proper '/*global*/' declarations and removed // eslint-disable-next-line no-undef comments for global variables in: - forum.js ### Remaining 'no-undef' comments Some // eslint-disable-next-line no-undef comments remain in forum.js for the variables (box, newelement, newcatcolorpicker, unread_marked, thread_id) that are undeclared local variables , not global variables. Similarly, server.js file (noted in pr Submitty#12618 ) had no global variables but only local undeclared variables. Both fixes would require functional changes of declaring let and const variables, and possibly affecting any global dependencies on those variables. ### Clarification to close issue Should these local variable fixes be handled in the next PR to close this issue or will they be addressed as a separate issue? ### What steps should a reviewer take to reproduce or test the bug or new feature? 1. Open the modified file and verify that more global variables have been added at the top of the file. 2. Verify that // eslint-disable-next-line no-undef comments have been removed from lines preceding global variables. 3. Confirm that other eslint comments, for instance 'no-restricted-syntax', and comments before local variables (box, newelement, newcatcolorpicker, unread_marked, thread_id) are untouched. ### Automated Testing & Documentation ESLint passes on all modified files. No functional changes, only lint comments were cleaned up and global declarations added. ### Other information This is not a breaking change. No migrations or security concerns. Co-authored-by: William Allen <[email protected]>
GarvitKhandelwal31
pushed a commit
to GarvitKhandelwal31/Submitty
that referenced
this pull request
Apr 14, 2026
) ### Why is this Change Important & Necessary? Partially addresses Submitty#10506 . forum.js file uses // eslint-disable-next-line no-undef comments instead of properly declaring globals in '/*global*/' comments at the top of the file. ### What is the New Behavior? Added proper '/*global*/' declarations and removed // eslint-disable-next-line no-undef comments for global variables in: - forum.js ### Remaining 'no-undef' comments Some // eslint-disable-next-line no-undef comments remain in forum.js for the variables (box, newelement, newcatcolorpicker, unread_marked, thread_id) that are undeclared local variables , not global variables. Similarly, server.js file (noted in pr Submitty#12618 ) had no global variables but only local undeclared variables. Both fixes would require functional changes of declaring let and const variables, and possibly affecting any global dependencies on those variables. ### Clarification to close issue Should these local variable fixes be handled in the next PR to close this issue or will they be addressed as a separate issue? ### What steps should a reviewer take to reproduce or test the bug or new feature? 1. Open the modified file and verify that more global variables have been added at the top of the file. 2. Verify that // eslint-disable-next-line no-undef comments have been removed from lines preceding global variables. 3. Confirm that other eslint comments, for instance 'no-restricted-syntax', and comments before local variables (box, newelement, newcatcolorpicker, unread_marked, thread_id) are untouched. ### Automated Testing & Documentation ESLint passes on all modified files. No functional changes, only lint comments were cleaned up and global declarations added. ### Other information This is not a breaking change. No migrations or security concerns. Co-authored-by: William Allen <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why is this Change Important & Necessary?
Partially addresses #10506 .
forum.js file uses // eslint-disable-next-line no-undef comments instead of properly declaring globals in '/global/' comments at the top of the file.
What is the New Behavior?
Added proper '/global/' declarations and removed // eslint-disable-next-line no-undef comments for global variables in:
Remaining 'no-undef' comments
Some // eslint-disable-next-line no-undef comments remain in forum.js for the variables (box, newelement, newcatcolorpicker, unread_marked, thread_id) that are undeclared local variables , not global variables.
Similarly, server.js file (noted in pr #12618 ) had no global variables but only local undeclared variables.
Both fixes would require functional changes of declaring let and const variables, and possibly affecting any global dependencies on those variables.
Clarification to close issue
Should these local variable fixes be handled in the next PR to close this issue or will they be addressed as a separate issue?
What steps should a reviewer take to reproduce or test the bug or new feature?
Open the modified file and verify that more global variables have been added at the top of the file.
Verify that // eslint-disable-next-line no-undef comments have been removed from lines preceding global variables.
Confirm that other eslint comments, for instance 'no-restricted-syntax', and comments before local variables (box, newelement, newcatcolorpicker, unread_marked, thread_id) are untouched.
Automated Testing & Documentation
ESLint passes on all modified files. No functional changes, only lint comments were cleaned up and global declarations added.
Other information
This is not a breaking change.
No migrations or security concerns.