Conversation
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 |
|
@henrymercer High-level question here: would we be better off upgrading to an earlier/older minor version of |
|
Dug a little and I think this is missing a few rules. These are the missing rules I've got a draft PR ready upstream, if you could verify that I'm onto something here! |
3a66b61 to
80e0eb7
Compare
80e0eb7 to
2a07b6e
Compare
The most confusing aspect of this for me has been the
Thanks @sam-robson, this is a great point. I thought that the GitHub ruleset extends eslint/recommended but that's not quite true. typescript-eslint disables some of the standard eslint rules due to a couple of reasons, e.g. the rule is already checked by the TypeScript compiler, or the rule is replaced by a more precise TypeScript-specific one. So I don't think we necessarily want to have all the eslint recommended rules enabled. But we can enable both I'm not sure whether the upstream |
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