Skip to content

refactor(test): use eslint-compat-utils - #3027

Merged
ota-meshi merged 4 commits into
vuejs:masterfrom
9romise:test/compat
Feb 19, 2026
Merged

ota-meshi merged 4 commits into
vuejs:masterfrom
9romise:test/compat

Conversation

@9romise

@9romise 9romise commented Feb 18, 2026 •

Copy link
Copy Markdown
Collaborator

The changes in typings aim to avoid TS errors.

@changeset-bot

changeset-bot Bot commented Feb 18, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 8c8a3b6

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

@9romise
9romise marked this pull request as ready for review February 18, 2026 16:23
@FloEdelmann
FloEdelmann requested a review from Copilot February 19, 2026 09:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors test code to use the eslint-compat-utils library instead of custom ESLint version compatibility code. The refactoring replaces approximately 140 lines of custom compatibility logic with calls to utility functions from eslint-compat-utils. The TypeScript typing changes add re-exports from node_modules packages and extend the Linter class to avoid TypeScript errors.

Changes:

  • Replaced custom ESLint compatibility code with eslint-compat-utils library functions
  • Added TypeScript type exports to avoid TS errors in test files
  • Added eslint-compat-utils@^0.6.5 as a dev dependency

Reviewed changes

Copilot reviewed 2 out of 4 changed files in this pull request and generated no comments.

File Description
tests/eslint-compat.js Refactored to use eslint-compat-utils functions instead of custom compatibility classes, reducing code from ~145 lines to ~24 lines
package.json Added eslint-compat-utils@^0.6.5 as a dev dependency
typings/vue-eslint-parser/index.d.ts Added re-exports of meta, parse, and parseForESLint from vue-eslint-parser to avoid TS errors
typings/eslint/index.d.ts Added ESLint type export and changed Linter class to extend ESLintLinter

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@FloEdelmann FloEdelmann left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me, thank you 🙂

@ota-meshi ota-meshi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM! Thanks!

@ota-meshi
ota-meshi merged commit e20b0b3 into vuejs:master Feb 19, 2026
23 checks passed
@9romise
9romise deleted the test/compat branch February 19, 2026 12:57
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.

4 participants