Skip to content

chore: testing eslint v10#779

Open
BPScott wants to merge 1 commit intomainfrom
eslint10
Open

chore: testing eslint v10#779
BPScott wants to merge 1 commit intomainfrom
eslint10

Conversation

@BPScott
Copy link
Copy Markdown
Member

@BPScott BPScott commented Feb 7, 2026

Good news! It seems like the existing version of eslint-plugin-prettier works fine with eslint v10.

Our integration tests for eslint-mdx are failing as that plugin does not yet support eslint v10.


Update to test against eslint v10.

  • Major version bumps to eslint related devDependencies: eslint v9 -> v10, @eslint/js v9 -> v10 and @eslint/json v0.14 -> v1.
  • Bump svelte-eslint-parser to v1.5.0 that supports eslint v10
  • Update CI to test against eslint v10, and node v24
  • Skip eslint-mdx tests in eslint v10, as this plugins for custom file formats does not support eslint 10 yet.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Feb 7, 2026

⚠️ No Changeset found

Latest commit: b197256

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Copy Markdown

@ellipsis-dev ellipsis-dev 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

Looks good to me! 👍

Reviewed everything up to cd1ebc5 in 8 seconds. Click for details.
  • Reviewed 383 lines of code in 4 files
  • Skipped 1 files when reviewing.
  • Skipped posting 0 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.

Workflow ID: wflow_hvwxWPByBYRiudYa

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 7, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Updated CI matrix and install steps for ESLint versions; bumped ESLint-related dependencies to v10; disabled MDX plugin in ESLint config; and added ESLint-major-version guards and conditional test adjustments in test/prettier.mjs.

Changes

Cohort / File(s) Summary
CI configuration
\.github/workflows/ci.yml
Converted matrix entries to array literals; switched ESLint install step to use matrix.eslint; added conditional transitive-upgrade steps for ESLint 9 vs 8 with separate conditionals.
ESLint configuration
eslint.config.mjs
Commented out the eslint-plugin-mdx import and removed its flat / flatCodeBlocks entries, disabling MDX-specific config paths.
Dependency manifest
package.json
Bumped devDependencies: eslint^10.0.0, @eslint/js^10.0.1, @eslint/json^1.0.0; added vue-eslint-parser to dependencies; updated Prettier-related versions and linkage.
Tests & fixtures
test/prettier.mjs
Replaced isESLint9 with isESLint8/isESLint10 guards; conditionally select RuleTester/FlatESLint; gate MDX/Svelte/JSON test setup and nodeType expectations based on ESLint major version.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested labels

ci

Suggested reviewers

  • JounQin

Poem

🐇 I hopped through YAML and nudged the lint to ten,

Shelved MDX gently, then hopped back again.
Tests now check versions, each guard in its place,
A tidy little upgrade — a carrot for the race. 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore: testing eslint v10' accurately reflects the main objective of the PR: upgrading and testing compatibility with ESLint v10 across the codebase.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch eslint10

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Feb 7, 2026

Open in StackBlitz

npm i https://pkg.pr.new/eslint-plugin-prettier@779

commit: b197256

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
.github/workflows/ci.yml (1)

44-46: ⚠️ Potential issue | 🔴 Critical

Bug: step name references matrix.node instead of matrix.eslint, and the skip condition appears wrong.

Two issues:

  1. Step name typo (Line 44): Install ESLint ${{ matrix.node }} should be ${{ matrix.eslint }}.

  2. Condition logic (Line 45): The condition matrix.eslint != 9 means this override step runs for both ESLint 8 and ESLint 10. Since the default eslint in package.json is ^10.0.0, the override should be skipped for ESLint 10 (not ESLint 9). Running this step for ESLint 10 would needlessly downgrade @graphql-eslint/eslint-plugin to v3, eslint-plugin-svelte to v2, svelte to v3, and vue-eslint-parser to v9 — all of which are only appropriate for the ESLint 8 compatibility path.

The condition should likely be matrix.eslint != 10, and you may also need a separate override set for ESLint 9 vs ESLint 8 if they require different companion package versions.

Proposed fix (minimal)
-      - name: Install ESLint ${{ matrix.node }}
-        if: ${{ matrix.eslint != 9 }}
-        run: pnpm install -D eslint@${{ matrix.eslint }} `@graphql-eslint/eslint-plugin`@3 eslint-plugin-svelte@2 svelte@3 vue-eslint-parser@9
+      - name: Install ESLint ${{ matrix.eslint }}
+        if: ${{ matrix.eslint != 10 }}
+        run: pnpm install -D eslint@${{ matrix.eslint }} `@graphql-eslint/eslint-plugin`@3 eslint-plugin-svelte@2 svelte@3 vue-eslint-parser@9
test/prettier.mjs (1)

530-536: ⚠️ Potential issue | 🔴 Critical

eslintPluginMdx.flat is still active in the shared ESLint config despite MDX tests being disabled.

Lines 211–293 comment out all MDX test assertions, but the ESLint instance created in runFixture still applies eslintPluginMdx.flat (Line 530) and the MDX settings block (Lines 531–536). If eslint-plugin-mdx is incompatible with ESLint 10, this will break all runFixture calls (HTML, Svelte, Pug, JSON), not just the MDX ones, since they share a single ESLint instance.

Consider also commenting out these MDX config entries in the overrideConfig array, consistent with the approach in eslint.config.mjs:

Proposed fix
-        eslintPluginMdx.flat,
-        {
-          files: ['*.{md,mdx}'],
-          settings: {
-            'mdx/code-block': true,
-          },
-        },
+        // eslintPluginMdx.flat,
+        // {
+        //   files: ['*.{md,mdx}'],
+        //   settings: {
+        //     'mdx/code-block': true,
+        //   },
+        // },
🤖 Fix all issues with AI agents
In `@package.json`:
- Line 76: Update the dependency entry for the ESLint parser plugin to use the
v9 compatible range by changing the "@eslint/js" dependency version from
"^10.0.1" to "^9.x" (e.g., "@eslint/js": "^9") so it matches ESLint v10's
internal dependency; locate the "@eslint/js" entry in package.json and update
its version string accordingly, then run package manager install to refresh
lockfile.
🧹 Nitpick comments (3)
eslint.config.mjs (1)

5-5: MDX support commented out — consider a TODO or tracking issue.

Since the PR title indicates this is exploratory ("testing eslint v10"), leaving commented-out code is fine for now. Consider adding a brief comment explaining why MDX is disabled (e.g., incompatibility with eslint v10) so future readers know the intent and when to re-enable it.

Also applies to: 14-15

test/prettier.mjs (2)

22-22: Unused namespace import if MDX config is also commented out.

If the MDX config lines (530–536) are also commented out per the suggestion above, then eslintPluginMdx on Line 22 becomes unused and should be commented out to match eslint-mdx on Line 27.

Also applies to: 27-27


356-381: invalid-prettierrc tests also disabled — is this MDX-related or an ESLint 10 incompatibility?

This block doesn't appear directly related to MDX. If it was disabled due to a separate ESLint 10 behavioral change, a brief comment explaining why would help distinguish it from the MDX-related disablements.

Copy link
Copy Markdown

@ellipsis-dev ellipsis-dev 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

Looks good to me! 👍

Reviewed 5a04fbd in 8 seconds. Click for details.
  • Reviewed 399 lines of code in 4 files
  • Skipped 1 files when reviewing.
  • Skipped posting 0 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.

Workflow ID: wflow_sF2897Pn8XlXRSxC

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@test/prettier.mjs`:
- Line 22: The ESLint MDX config is still being applied via eslintPluginMdx.flat
which loads an incompatible MDX plugin for every runFixture; remove or guard the
usage of eslintPluginMdx.flat in the ESLint config block (where the plugin is
merged into the config) so MDX is not applied when running with ESLint v10, and
also comment out or conditionally skip the import "import * as eslintPluginMdx"
if MDX support is disabled; update any references that merge
eslintPluginMdx.flat into the config (the MDX config block used by runFixture)
to be skipped/removed.

Copy link
Copy Markdown

@ellipsis-dev ellipsis-dev 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

Looks good to me! 👍

Reviewed ff8456b in 8 seconds. Click for details.
  • Reviewed 481 lines of code in 4 files
  • Skipped 1 files when reviewing.
  • Skipped posting 0 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.

Workflow ID: wflow_soTBWCSCs7L4dMxG

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Copy Markdown

@ellipsis-dev ellipsis-dev 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

Looks good to me! 👍

Reviewed 54c1bdb in 7 seconds. Click for details.
  • Reviewed 485 lines of code in 4 files
  • Skipped 1 files when reviewing.
  • Skipped posting 0 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.

Workflow ID: wflow_uq3EaljtVBoQB9Hc

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@test/prettier.mjs`:
- Around line 296-335: The Svelte plugin block must be removed from the active
ESLint configuration because eslint-plugin-svelte v3.14.0 is incompatible with
ESLint v10; locate where the ESLint instance or test harness is configured (the
block referred to as the Svelte config at lines 543–546 in test/prettier.mjs)
and remove any references to the svelte plugin (e.g., removing 'svelte' from
plugins and any 'plugin:svelte/...' entries from extends or parser
configurations) so the plugin is not loaded at test runtime; alternatively swap
those config lines to a conditional that only injects the Svelte config when a
compatible eslint version is detected.
🧹 Nitpick comments (2)
test/prettier.mjs (2)

356-381: invalid-prettierrc tests also commented out — what's the reason?

This test block doesn't appear to be MDX-related. If it was commented out for a different ESLint v10 incompatibility (e.g., the nodeType or parsing error format changed), a brief comment explaining why would help future maintainers know when to re-enable it.


402-427: The isESLint9 guard may need updating for ESLint v10.

isESLint9 is set on line 35 as !eslintUnsupportedApi.FlatRuleTester — this checks whether FlatRuleTester was removed (i.e., merged into main RuleTester), which happened in ESLint 9. For ESLint 10, this will also be true, so the name is misleading. Consider renaming to something like isFlatConfigDefault or isESLint9Plus.

Copy link
Copy Markdown

@ellipsis-dev ellipsis-dev 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

Looks good to me! 👍

Reviewed 1eea598 in 7 seconds. Click for details.
  • Reviewed 485 lines of code in 4 files
  • Skipped 1 files when reviewing.
  • Skipped posting 0 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.

Workflow ID: wflow_3YbPrrwRFN5E3QHp

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Copy Markdown

@ellipsis-dev ellipsis-dev 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

Looks good to me! 👍

Reviewed 6c49f72 in 7 seconds. Click for details.
  • Reviewed 451 lines of code in 4 files
  • Skipped 1 files when reviewing.
  • Skipped posting 0 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.

Workflow ID: wflow_1hbOYhNeTd3N4fsk

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Copy Markdown

@ellipsis-dev ellipsis-dev 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

Looks good to me! 👍

Reviewed 7a9d0bd in 7 seconds. Click for details.
  • Reviewed 451 lines of code in 4 files
  • Skipped 1 files when reviewing.
  • Skipped posting 0 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.

Workflow ID: wflow_lJSAN9zYhDpjEFiz

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Copy Markdown

@ellipsis-dev ellipsis-dev 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

Looks good to me! 👍

Reviewed 4956f34 in 6 seconds. Click for details.
  • Reviewed 417 lines of code in 4 files
  • Skipped 1 files when reviewing.
  • Skipped posting 0 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.

Workflow ID: wflow_yxaLBPpeOCoRmo8x

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Copy Markdown

@ellipsis-dev ellipsis-dev 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

Looks good to me! 👍

Reviewed e27df88 in 8 seconds. Click for details.
  • Reviewed 396 lines of code in 4 files
  • Skipped 1 files when reviewing.
  • Skipped posting 0 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.

Workflow ID: wflow_U8UJ9JGwF3D1y286

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Copy Markdown

@ellipsis-dev ellipsis-dev 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

Looks good to me! 👍

Reviewed 96d0450 in 7 seconds. Click for details.
  • Reviewed 384 lines of code in 4 files
  • Skipped 1 files when reviewing.
  • Skipped posting 0 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.

Workflow ID: wflow_YnmwcA8dVDQTHT4C

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Copy Markdown

@ellipsis-dev ellipsis-dev 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

Looks good to me! 👍

Reviewed c3fd96c in 7 seconds. Click for details.
  • Reviewed 387 lines of code in 4 files
  • Skipped 1 files when reviewing.
  • Skipped posting 0 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.

Workflow ID: wflow_CPlOtNMDKBHmKJh6

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@BPScott
Copy link
Copy Markdown
Member Author

BPScott commented Feb 24, 2026

New version of svelte-eslint-parser has been released and I've updated it to fix the svelte tests. Just waiting on the eslint-mdx release now.

@JounQin
Copy link
Copy Markdown
Member

JounQin commented Feb 24, 2026

Just waiting on the eslint-mdx release now.

I'm still waiting @wooorm for releasing. :(

mdx-js/eslint-mdx#603 (comment)

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
test/prettier.mjs (1)

308-345: ⚠️ Potential issue | 🟠 Major

Svelte runFixture is missing an isESLint10 skip guard.

The svelte test fixture (lines 309-344) uses ...(isESLint10 ? {} : { nodeType: null }) within its test assertions but is not skipped when ESLint v10 is detected. In contrast, the MDX tests are fully wrapped in if (!isESLint10) (line 219) to prevent them from running. The svelte fixture only uses svelteUnsupported (a Node version check) for the skip parameter, which is insufficient.

Proposed fix
 runFixture(
   'eslint-plugin-svelte/*.svelte',
   [
     ...
   ],
-  svelteUnsupported,
+  svelteUnsupported || isESLint10,
 );
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/prettier.mjs` around lines 308 - 345, The Svelte test runFixture call
should be skipped when ESLint v10 is present; wrap the existing runFixture(...)
invocation (the one using svelteUnsupported and the spread ...(isESLint10 ? {} :
{ nodeType: null })) in the same guard used for MDX tests (if (!isESLint10) {
... }) or alternatively add isESLint10 to the skip condition so the fixture does
not run under ESLint 10; update the block containing runFixture,
svelteUnsupported, and the ...(isESLint10 ? {} : { nodeType: null }) to ensure
the test is not executed when isESLint10 is true.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@test/prettier.mjs`:
- Around line 308-345: The Svelte test runFixture call should be skipped when
ESLint v10 is present; wrap the existing runFixture(...) invocation (the one
using svelteUnsupported and the spread ...(isESLint10 ? {} : { nodeType: null
})) in the same guard used for MDX tests (if (!isESLint10) { ... }) or
alternatively add isESLint10 to the skip condition so the fixture does not run
under ESLint 10; update the block containing runFixture, svelteUnsupported, and
the ...(isESLint10 ? {} : { nodeType: null }) to ensure the test is not executed
when isESLint10 is true.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c3fd96c and 5534556.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (4)
  • .github/workflows/ci.yml
  • eslint.config.mjs
  • package.json
  • test/prettier.mjs
🚧 Files skipped from review as they are similar to previous changes (1)
  • eslint.config.mjs

@JounQin
Copy link
Copy Markdown
Member

JounQin commented Feb 27, 2026

eslint-plugin-mdx@3.7.0 has just been released.

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