Skip to content

[Refactor:Developer] Clean up ESLint globals in forum.js#12631

Merged
williamjallen merged 2 commits into
Submitty:mainfrom
Benny-Dav:benny/refactor-eslint-globals-forum-js
Mar 23, 2026
Merged

[Refactor:Developer] Clean up ESLint globals in forum.js#12631
williamjallen merged 2 commits into
Submitty:mainfrom
Benny-Dav:benny/refactor-eslint-globals-forum-js

Conversation

@Benny-Dav

Copy link
Copy Markdown
Contributor

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.

@github-project-automation github-project-automation Bot moved this from Seeking Reviewer to Awaiting Maintainer Review in Submitty Development Mar 23, 2026
@codecov

codecov Bot commented Mar 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 21.66%. Comparing base (f740e33) to head (4694ac6).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            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           
Flag Coverage Δ
autograder 21.32% <ø> (ø)
js 2.04% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.68% <ø> (ø)
python_submitty_utils 80.08% <ø> (ø)
submitty_daemon_jobs 91.13% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Benny-Dav Benny-Dav changed the title [Refactor: Developer] Clean up ESLint globals in forum.js [Refactor:Developer] Clean up ESLint globals in forum.js Mar 23, 2026
@williamjallen
williamjallen merged commit b70fe3d into Submitty:main Mar 23, 2026
25 of 26 checks passed
@github-project-automation github-project-automation Bot moved this from Awaiting Maintainer Review to Done in Submitty Development Mar 23, 2026
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants