Skip to content

fix(linter): support eslint v10#34534

Merged
jaysoo merged 1 commit intonrwl:masterfrom
JasonWeinzierl:support-eslint-v10
Feb 26, 2026
Merged

fix(linter): support eslint v10#34534
jaysoo merged 1 commit intonrwl:masterfrom
JasonWeinzierl:support-eslint-v10

Conversation

@JasonWeinzierl
Copy link
Copy Markdown
Contributor

Current Behavior

@nx/eslint relies on ESLint internals that changed in ESLint v10 (use-at-your-own-risk), which causes failures.

It looks like #24632 originally attempted to use loadESLint() which would've been forward compatible with v10, but it was later removed in #27404 in favor of the use-at-your-own-risk import.

Expected Behavior

@nx/eslint supports ESLint v10.

Related Issue(s)

Fixes #34415

@netlify
Copy link
Copy Markdown

netlify bot commented Feb 20, 2026

‼️ Deploy request for nx-docs rejected.

Name Link
🔨 Latest commit 14067f2

@netlify
Copy link
Copy Markdown

netlify bot commented Feb 20, 2026

‼️ Deploy request for nx-dev rejected.

Name Link
🔨 Latest commit 14067f2

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud bot commented Feb 23, 2026

View your CI Pipeline Execution ↗ for commit 14067f2

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 36m 42s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 3m 31s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 8s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 1s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2026-02-26 17:27:54 UTC

@leosvelperez leosvelperez self-assigned this Feb 23, 2026
nx-cloud[bot]

This comment was marked as outdated.

nx-cloud[bot]

This comment was marked as outdated.

nx-cloud[bot]

This comment was marked as outdated.

Copy link
Copy Markdown
Contributor

@nx-cloud nx-cloud bot left a comment

Choose a reason for hiding this comment

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

Important

At least one additional CI pipeline execution has run since the conclusion below was written and it may no longer be applicable.

Nx Cloud has identified a possible root cause for your failed CI:

Our analysis indicates this failure is unrelated to the ESLint v10 changes in this PR. The failing Gradle plugin e2e test is experiencing a Gradle daemon socket timeout ("Timed out waiting for finished message from client socket connection"), which is a test infrastructure issue not introduced by the ESLint module loading changes in this PR.

No code changes were suggested for this issue.

You can trigger a rerun by pushing an empty commit:

git commit --allow-empty -m "chore: trigger rerun"
git push

Nx Cloud View detailed reasoning on Nx Cloud ↗

🔔 Heads up, your workspace has pending recommendations ↗ to auto-apply fixes for similar failures.


🎓 Learn more about Self-Healing CI on nx.dev

@leosvelperez leosvelperez force-pushed the support-eslint-v10 branch 2 times, most recently from e3b1968 to 6e02baf Compare February 25, 2026 11:21
Copy link
Copy Markdown
Member

@jaysoo jaysoo left a comment

Choose a reason for hiding this comment

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

The approach is correct — using loadESLint() (available since ESLint 8.57.0) as the primary path and falling back to the removed FlatESLint/LegacyESLint imports for older versions.

One gap: the existing tests only exercise the legacy fallback path. Could you add a test that mocks loadESLint() to verify the new primary code path works correctly? That would give confidence the happy path is covered.

Otherwise this looks good and is the right way to handle ESLint v10 compatibility.

@JasonWeinzierl
Copy link
Copy Markdown
Contributor Author

Tests added on both eslintrc and flat paths.

@jaysoo jaysoo merged commit 31dad41 into nrwl:master Feb 26, 2026
16 of 17 checks passed
FrozenPandaz pushed a commit that referenced this pull request Feb 26, 2026
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior

`@nx/eslint` relies on ESLint internals that changed in ESLint v10
(`use-at-your-own-risk`), which causes failures.

It looks like #24632 originally attempted
to use `loadESLint()` which would've been forward compatible with v10,
but it was later removed in #27404 in
favor of the `use-at-your-own-risk` import.

## Expected Behavior

`@nx/eslint` supports ESLint v10.

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #34415

(cherry picked from commit 31dad41)
@JasonWeinzierl JasonWeinzierl deleted the support-eslint-v10 branch February 26, 2026 18:05
FrozenPandaz pushed a commit that referenced this pull request Feb 26, 2026
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior

`@nx/eslint` relies on ESLint internals that changed in ESLint v10
(`use-at-your-own-risk`), which causes failures.

It looks like #24632 originally attempted
to use `loadESLint()` which would've been forward compatible with v10,
but it was later removed in #27404 in
favor of the `use-at-your-own-risk` import.

## Expected Behavior

`@nx/eslint` supports ESLint v10.

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #34415

(cherry picked from commit 31dad41)
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 4, 2026

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@nx/eslint not compatible with ESLint 10

3 participants