Repository navigation
Fix max-classes-per-file disable comments for typescript-eslint 8.72 - #6555
Merged
alanorth merged 1 commit intoNov 23, 2026
Merged
Conversation
typescript-eslint 8.72.0 includes leading comments in the Program range (typescript-eslint/typescript-eslint#12991), so max-classes-per-file now reports at 1:1. A "// eslint-disable-next-line" on line 1 or an "eslint-disable" block after the license header no longer covers that position. Use a "/* eslint-disable max-classes-per-file */" block on line 1, as the other files already do. Works with typescript-eslint 8.71 and 8.72. Assisted-by: Claude Code [claude-opus-5-5]
Contributor
|
Thanks @bram-atmire. I had noticed the same in my comments on #6487 (comment). Seems like a change in behavior in eslint, though our behavior with these "disable-next-line" comments was inconsistent and I'm surprised it didn't break earlier! |
alanorth
approved these changes
Nov 23, 2026
Contributor
|
@bram-atmire I just noticed that we have the same problem on |
Member
Author
|
@alanorth on it |
This was referenced Nov 23, 2026
Merged
Member
Author
|
@alanorth sent. also did 9_x. 8_x didn't seem affected as far as i could see. |
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.
TL;DR & References
main), build(deps-dev): bump the eslint group across 1 directory with 4 updates #6478 (dspace-10_x), build(deps-dev): bump the eslint group across 1 directory with 4 updates #6483 (dspace-9_x)Description
typescript-eslint 8.72.0 makes
npm run lintfail with 14max-classes-per-fileerrors in files that already disable that rule. This PR moves the disable comment in those files to the same form the rest of the code base already uses, so lint passes with both 8.71 and 8.72.Instructions for Reviewers
typescript-eslint 8.72.0 now includes leading comments in the range of the
Programnode (typescript-eslint/typescript-eslint#12991).max-classes-per-filereports on that node, so the error is now at 1:1 instead of on the first line of code. Two disable styles no longer cover that position:// eslint-disable-next-line max-classes-per-file(10 files)/* eslint-disable max-classes-per-file */after the license header (4 files)59 files already use
/* eslint-disable max-classes-per-file */on line 1, which keeps working. This PR uses that form in the 14 remaining files.List of changes in this PR:
max-classes-per-filedisable comment replaced by/* eslint-disable max-classes-per-file */on line 1. No code changes.How to test
npm run lintpasses, as before.npm run lintpasses too. Without this PR it fails with 14max-classes-per-fileerrors.AI Disclosure (REQUIRED)
Were AI tools used in the creation of this PR?
Claude Code (claude-opus-5-5) traced the lint errors in the Dependabot PR to typescript-eslint#12991 and made the change. It ran the full lint with typescript-eslint 8.71.1 and with the 8.72.0 lockfile from #6487, both passing, and confirmed that the same 8.72.0 run without this change reproduces the 14 errors from CI. I reviewed the change and this description.
Human review didn't reveal any mistakes or logical issues.
Checklist
mainbranch of code (unless it is a backport or is fixing an issue specific to an older branch).npm run lintnpm run check-circ-deps)package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.