Skip to content

Conversation

@danwkennedy
Copy link
Contributor

Description

Eslint 9 requires us to change the format of its configuration files (to effectively a single one). This PR migrates Eslint to version 9.

- eslint: ^8.57.0 → ^9.28.0
- eslint-plugin-github: ^4.10.2 → ^6.0.0
- eslint-config-prettier: ^9.0.0 → ^10.1.5
- eslint-plugin-jest: ^27.9.0 → ^29.0.1
- Remove @typescript-eslint/* (bundled with eslint-plugin-github@6)
- Replace .eslintrc.json with eslint.config.mjs
- Remove .eslintignore (ignores now in config)
- Remove deprecated rules (semi, type-annotation-spacing, no-empty-interface)
- Remove unused eslint-disable directives for @typescript-eslint/no-var-requires
@danwkennedy danwkennedy requested a review from a team as a code owner January 30, 2026 14:31
Copilot AI review requested due to automatic review settings January 30, 2026 14:31
@danwkennedy danwkennedy changed the title Upgrade/eslint-9 Upgrade eslint to v9.x Jan 30, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Migrates the repo’s linting setup to ESLint v9 by switching from legacy .eslintrc/.eslintignore to a flat config, and updates related ESLint plugin dependencies.

Changes:

  • Upgraded ESLint and key lint plugins/configs (github, jest, prettier) to versions compatible with ESLint v9.
  • Replaced .eslintrc.json / .eslintignore with a new eslint.config.mjs flat configuration.
  • Updated a couple of tests’ inline eslint-disable directives to match the new rule set.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/tool-cache/tests/manifest.test.ts Updates inline eslint-disable directive for require usage.
packages/http-client/tests/proxy.test.ts Updates inline eslint-disable directive for require usage.
package.json Bumps ESLint + related lint tooling dependencies to v9-compatible versions.
package-lock.json Locks updated dependency graph from the ESLint v9/tooling upgrades.
eslint.config.mjs Introduces ESLint v9 flat config with repo-specific ignores and rule overrides.
.eslintrc.json Removed legacy ESLint configuration (superseded by flat config).
.eslintignore Removed legacy ignore file (replaced by ignores in flat config).
Comments suppressed due to low confidence (1)

eslint.config.mjs:52

  • @typescript-eslint/array-type is set to off, which loosens linting compared to the prior configuration and can allow mixed T[] vs Array<T> styles over time. If there isn't a specific migration-related need to disable it, consider re-enabling it to avoid churn/inconsistency.
      // Disable stricter rules from eslint-plugin-github v6
      '@typescript-eslint/no-shadow': 'off',
      '@typescript-eslint/array-type': 'off',
      '@typescript-eslint/no-wrapper-object-types': 'off',

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

'@typescript-eslint/no-unsafe-function-type': 'off',

// TypeScript rules
'@typescript-eslint/no-unused-vars': 'off',
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@typescript-eslint/no-unused-vars is set to off, which is a behavior change from the previous ESLint config (it was enforced as an error). If the goal of this PR is primarily an ESLint v9/config-format migration, consider restoring this rule (or explicitly documenting the decision to stop enforcing unused-variable checks).

Suggested change
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'error',

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants