Conversation
- 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
There was a problem hiding this comment.
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/.eslintignorewith a neweslint.config.mjsflat 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-typeis set tooff, which loosens linting compared to the prior configuration and can allow mixedT[]vsArray<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', |
There was a problem hiding this comment.
@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).
| '@typescript-eslint/no-unused-vars': 'off', | |
| '@typescript-eslint/no-unused-vars': 'error', |
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.