Skip to content

fix: add ESLint v10 to peerDependencies#686

Open
roli-lpci wants to merge 1 commit intogithub:mainfrom
roli-lpci:fix/eslint-10-compat
Open

fix: add ESLint v10 to peerDependencies#686
roli-lpci wants to merge 1 commit intogithub:mainfrom
roli-lpci:fix/eslint-10-compat

Conversation

@roli-lpci
Copy link
Copy Markdown

Summary

Widens eslint peerDependencies from ^8 || ^9 to ^8 || ^9 || ^10.

All rules already use the modern context.sourceCode / sourceCode.getScope() APIs with fallbacks for older versions, so no runtime changes are needed. Audited all 5 rule files that reference deprecated context APIs — all already use ?? / ternary fallback patterns.

Closes #680

Test plan

  • All 67 existing tests pass
  • ESLint linting passes
  • Audited all rule files using deprecated context APIs — all already use fallback patterns

Widen the eslint peerDependencies range from `^8 || ^9` to
`^8 || ^9 || ^10` so the plugin installs cleanly with ESLint 10.

All rules already use the modern `context.sourceCode` / `sourceCode.getScope`
APIs with fallbacks, so no runtime changes are needed.

Closes github#680

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@roli-lpci roli-lpci requested a review from a team as a code owner February 25, 2026 09:25
@roli-lpci roli-lpci requested a review from jibrang February 25, 2026 09:25
@colindunn
Copy link
Copy Markdown

Unfortunately this update would not fix the package for eslint 10 as there is at least one dependency still using deprecated context calls which shows up if you use recommended settings:

Oops! Something went wrong! :(

ESLint: 10.0.3

TypeError: Error while loading rule 'eslint-comments/no-duplicate-disable': context.getSourceCode is not a function

It appears that eslint-plugin-eslint-comments still uses the context functions and is no longer maintained. Recommend moving the dependency over to @eslint-community/eslint-plugin-eslint-comments which has updates for v9/10

At a quick glance through dependencies, it also looks like eslint-plugin-filenames has the same issue

@colindunn
Copy link
Copy Markdown

Have commented on the PR with what works so far for me. Still some work required

platinummonkey added a commit to platinummonkey/changed-files that referenced this pull request Apr 21, 2026
[email protected] peers eslint@"^8 || ^9" and no release supports
eslint 10 yet (upstream: github/eslint-plugin-github#686). Revert eslint and
@eslint/js to 9.x while keeping the other 8 bumps in this group, regenerate
package-lock.json and dist/.
platinummonkey added a commit to platinummonkey/changed-files that referenced this pull request Apr 22, 2026
* Bump the all group across 1 directory with 10 updates

Bumps the all group with 10 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [@actions/github](https://github.com/actions/toolkit/tree/HEAD/packages/github) | `9.0.0` | `9.1.0` |
| [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) | `9.39.4` | `10.0.1` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `25.5.2` | `25.6.0` |
| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `8.58.1` | `8.58.2` |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `8.58.1` | `8.58.2` |
| [eslint](https://github.com/eslint/eslint) | `9.39.4` | `10.2.1` |
| [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) | `29.15.1` | `29.15.2` |
| [globals](https://github.com/sindresorhus/globals) | `17.4.0` | `17.5.0` |
| [prettier](https://github.com/prettier/prettier) | `3.8.1` | `3.8.3` |
| [typescript](https://github.com/microsoft/TypeScript) | `6.0.2` | `6.0.3` |



Updates `@actions/github` from 9.0.0 to 9.1.0
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/github/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/github)

Updates `@eslint/js` from 9.39.4 to 10.0.1
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/commits/v10.0.1/packages/js)

Updates `@types/node` from 25.5.2 to 25.6.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `@typescript-eslint/eslint-plugin` from 8.58.1 to 8.58.2
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.58.2/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 8.58.1 to 8.58.2
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.58.2/packages/parser)

Updates `eslint` from 9.39.4 to 10.2.1
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](eslint/eslint@v9.39.4...v10.2.1)

Updates `eslint-plugin-jest` from 29.15.1 to 29.15.2
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](jest-community/eslint-plugin-jest@v29.15.1...v29.15.2)

Updates `globals` from 17.4.0 to 17.5.0
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](sindresorhus/globals@v17.4.0...v17.5.0)

Updates `prettier` from 3.8.1 to 3.8.3
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](prettier/prettier@3.8.1...3.8.3)

Updates `typescript` from 6.0.2 to 6.0.3
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Commits](microsoft/TypeScript@v6.0.2...v6.0.3)

---
updated-dependencies:
- dependency-name: "@actions/github"
  dependency-version: 9.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: "@eslint/js"
  dependency-version: 10.0.1
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: all
- dependency-name: "@types/node"
  dependency-version: 25.6.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-version: 8.58.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: "@typescript-eslint/parser"
  dependency-version: 8.58.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: eslint
  dependency-version: 10.2.1
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: all
- dependency-name: eslint-plugin-jest
  dependency-version: 29.15.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: globals
  dependency-version: 17.5.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: prettier
  dependency-version: 3.8.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: typescript
  dependency-version: 6.0.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all
...

Signed-off-by: dependabot[bot] <[email protected]>

* fix: keep eslint at ^9.39.4 pending eslint-plugin-github v10 support

[email protected] peers eslint@"^8 || ^9" and no release supports
eslint 10 yet (upstream: github/eslint-plugin-github#686). Revert eslint and
@eslint/js to 9.x while keeping the other 8 bumps in this group, regenerate
package-lock.json and dist/.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Cody Lee <[email protected]>
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.

Support ESLint v10

2 participants