Update eslint to v9#3497
Open
henrymercer wants to merge 2 commits intomaingithub/codeql-action:mainfrom
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR upgrades ESLint from v8 to v9, migrating to the new flat config format and updating related linting plugins. This is a development tooling change that does not affect runtime behavior of CodeQL Action workflows.
Changes:
- Updated ESLint from v8.57.1 to v9.39.2 and migrated to flat config (eslint.config.mjs)
- Replaced
eslint-plugin-importwitheslint-plugin-import-xand removed deprecated plugins - Removed an eslint-disable directive for
no-constant-conditionthat is no longer needed in ESLint v9
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Updated ESLint and linting plugin versions |
| package-lock.json | Auto-generated lockfile reflecting dependency updates |
| eslint.config.mjs | Migrated from legacy to flat config format |
| src/upload-lib.ts | Removed eslint-disable for no-constant-condition (rule now handles while(true) correctly) |
| lib/*.js | Generated JavaScript files reflecting TypeScript source changes |
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.
This PR updates eslint to v9. It is too early to update to v10 since some of our linter plugins don't yet have support.
The eslint config file has changed substantially due to converting to flat config and changes to upstream plugins. I have attempted to ensure that the rules we are running are the same, and note that there is only one change to disable directives, which is to remove a
while (true)statement that is no longer flagged by the no constant condition linting rule. However this PR would benefit from a careful look at this config file.I checked
import/no-cyclemanually, since this has caught user-visible issues for us in the past. Strangely I could not getimport/no-cycleto work with eslint v9. It ran, but did not detect an example import cycle. I have replaced it byimport-x/no-cycle, but it's still odd to me that this didn't work initially.Risk assessment
For internal use only. Please select the risk level of this change:
Which use cases does this change impact?
Environments:
How did/will you validate this change?
Going through linter plugins to check rules, confirming other disable directives are still required.
If something goes wrong after this change is released, what are the mitigation and rollback strategies?
How will you know if something goes wrong after this change is released?
n/a
Are there any special considerations for merging or releasing this change?
Merge / deployment checklist