Skip to content

Fix ESLint v10 RuleContext API removal (follow-up to #3972)#3979

Open
ledsun wants to merge 12 commits intojsx-eslint:masterfrom
ledsun:update-deprecated-calls-v8
Open

Fix ESLint v10 RuleContext API removal (follow-up to #3972)#3979
ledsun wants to merge 12 commits intojsx-eslint:masterfrom
ledsun:update-deprecated-calls-v8

Conversation

@ledsun
Copy link

@ledsun ledsun commented Feb 9, 2026

This PR follows up on the feedback in the comments of #3972 and incorporates the requested changes.

I think this PR will fix #3977.

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

we'll need regression tests - it might be as simple as adding eslint 10 to the GHA matrix.

@ledsun ledsun force-pushed the update-deprecated-calls-v8 branch from f987ffa to a7b967b Compare February 11, 2026 08:06
@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.81%. Comparing base (25249f3) to head (33e30c8).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3979      +/-   ##
==========================================
- Coverage   97.85%   97.81%   -0.04%     
==========================================
  Files         136      136              
  Lines       10008    10013       +5     
  Branches     3717     3718       +1     
==========================================
+ Hits         9793     9794       +1     
- Misses        215      219       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Run published type checks against both ESLint 7 and 10.
Use per-matrix dependency setup and exclude unsupported TS combinations for ESLint 10.
- route filename/sourceCode access through util helpers for ESLint 7/10 compatibility
- remove deprecated meta.docs.category to satisfy current RuleModule typings
- augment @eslint/core SettingsConfig with react settings shape
@socket-security
Copy link

socket-security bot commented Feb 11, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedeslint@​10.0.08910010096100

View full report

@ledsun ledsun marked this pull request as ready for review February 11, 2026 12:08
matrix:
node-version: ${{ fromJson(needs.matrix.outputs.latest) }}
eslint:
- 10
Copy link
Member

Choose a reason for hiding this comment

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

you'll also need to exclude eslint 10 on node < 20

const resolve = require('resolve');
const semver = require('semver');
const error = require('./error');
const eslintUtil = require('./eslint');
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const eslintUtil = require('./eslint');
const getFilename = require('./eslint').getFilename;

"@typescript-eslint/parser": "^2.34.0 || ^3.10.1 || ^4 || ^5 || ^6.20 || ^7.14.1 || 8.4 - 8.17",
"babel-eslint": "^8 || ^9 || ^10.1.0",
"eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7",
"eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 || ^10.0",
Copy link
Member

Choose a reason for hiding this comment

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

this might be premature; it's fine if the eslint 10 tests don't completely pass after this PR, and this line is what actually adds support for it.

however obv if this PR is sufficient to support eslint 10, this is great :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

ESLint v10 compatibility

4 participants