[Refactor:Developer] Clean up ESLint globals in JS files.#12618
Merged
williamjallen merged 1 commit intoMar 23, 2026
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12618 +/- ##
=========================================
Coverage 21.66% 21.66%
Complexity 9637 9637
=========================================
Files 268 268
Lines 36222 36222
Branches 487 487
=========================================
Hits 7847 7847
Misses 27892 27892
Partials 483 483
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
williamjallen
approved these changes
Mar 23, 2026
williamjallen
left a comment
Member
There was a problem hiding this comment.
Thanks for this contribution!
williamjallen
added a commit
that referenced
this pull request
Mar 23, 2026
### 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: - 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 #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 25, 2026
…2618) ### Why is this Change Important & Necessary? Partially adresses Submitty#10506 . Several JS files use '//eslint-disable-next-line no-undef' comments instead of properly declaring globals in '/*global*/' comments at the top of each file. ### What is the New Behavior? Added proper '/*global*/' declarations and removed '/*eslint-disable-next-line no-undef*/' comments in: - docker_interface.js - latedays.js - plagiarism.js - user-profile.js ### Files not included in this PR - server.js - The no-undef warnings in this file stem from undeclared local variables that require 'let' or 'const' declarations, not global additions. This change might be best suited for a separate PR -forum.js - This file was excluded due to its large size and high number of instances, which will be tackled in a follow-up PR. -PDFInitToolbar.js - This file no longer exists in the codebase ### What steps should a reviewer take to reproduce or test the bug or new feature? 1. Open the modified files and verify that `// eslint-disable-next-line no-undef` comments have been removed. 2. Verify that the variables referenced on the lines following removed lint comments are now declared in the global comment at the top of each file. 3. Confirm that other 'eslint-disable' comments, for instance 'no-restricted-syntax', 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.
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
…2618) ### Why is this Change Important & Necessary? Partially adresses Submitty#10506 . Several JS files use '//eslint-disable-next-line no-undef' comments instead of properly declaring globals in '/*global*/' comments at the top of each file. ### What is the New Behavior? Added proper '/*global*/' declarations and removed '/*eslint-disable-next-line no-undef*/' comments in: - docker_interface.js - latedays.js - plagiarism.js - user-profile.js ### Files not included in this PR - server.js - The no-undef warnings in this file stem from undeclared local variables that require 'let' or 'const' declarations, not global additions. This change might be best suited for a separate PR -forum.js - This file was excluded due to its large size and high number of instances, which will be tackled in a follow-up PR. -PDFInitToolbar.js - This file no longer exists in the codebase ### What steps should a reviewer take to reproduce or test the bug or new feature? 1. Open the modified files and verify that `// eslint-disable-next-line no-undef` comments have been removed. 2. Verify that the variables referenced on the lines following removed lint comments are now declared in the global comment at the top of each file. 3. Confirm that other 'eslint-disable' comments, for instance 'no-restricted-syntax', 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.
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
…2618) ### Why is this Change Important & Necessary? Partially adresses Submitty#10506 . Several JS files use '//eslint-disable-next-line no-undef' comments instead of properly declaring globals in '/*global*/' comments at the top of each file. ### What is the New Behavior? Added proper '/*global*/' declarations and removed '/*eslint-disable-next-line no-undef*/' comments in: - docker_interface.js - latedays.js - plagiarism.js - user-profile.js ### Files not included in this PR - server.js - The no-undef warnings in this file stem from undeclared local variables that require 'let' or 'const' declarations, not global additions. This change might be best suited for a separate PR -forum.js - This file was excluded due to its large size and high number of instances, which will be tackled in a follow-up PR. -PDFInitToolbar.js - This file no longer exists in the codebase ### What steps should a reviewer take to reproduce or test the bug or new feature? 1. Open the modified files and verify that `// eslint-disable-next-line no-undef` comments have been removed. 2. Verify that the variables referenced on the lines following removed lint comments are now declared in the global comment at the top of each file. 3. Confirm that other 'eslint-disable' comments, for instance 'no-restricted-syntax', 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.
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 adresses #10506 . Several JS files use '//eslint-disable-next-line no-undef' comments instead of properly declaring globals in '/global/' comments at the top of each file.
What is the New Behavior?
Added proper '/global/' declarations and removed '/eslint-disable-next-line no-undef/' comments in:
Files not included in this PR
-forum.js - This file was excluded due to its large size and high number of instances, which will be tackled in a follow-up PR.
-PDFInitToolbar.js - This file no longer exists in the codebase
What steps should a reviewer take to reproduce or test the bug or new feature?
Open the modified files and verify that
// eslint-disable-next-line no-undefcomments have been removed.Verify that the variables referenced on the lines following removed lint comments are now declared in the global comment at the top of each file.
Confirm that other 'eslint-disable' comments, for instance 'no-restricted-syntax', 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.