Skip to content

Conversation

@9romise
Copy link
Contributor

@9romise 9romise commented Nov 22, 2025

Since our minimum supported version is currently ESLint 8.57.0.

This PR aligns with the migration guide at https://eslint.org/blog/2023/09/preparing-custom-rules-eslint-v9/, replacing certain APIs that will be removed in ESLint v10 with their modern equivalents.

Related:

@changeset-bot
Copy link

changeset-bot bot commented Nov 22, 2025

⚠️ No Changeset found

Latest commit: 9adaecf

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

@FloEdelmann FloEdelmann force-pushed the cleanup branch 2 times, most recently from 3d4b39d to b41f03a Compare November 24, 2025 18:07
Copy link
Member

@FloEdelmann FloEdelmann left a comment

Choose a reason for hiding this comment

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

I'm sorry @9romise, I pushed some changes that failed the tests. After reverting and even force-pushing to remove the commit, now the tests even fail for your last commit, where they previously passed. I guess something's in the cache somewhere that shouldn't be there.

Regarding your changes, those look good to me. Thank you for cleaning up! 🙂

Copy link
Contributor

Copilot AI left a comment

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 removes ESLint compatibility code for older versions (< 8.57.0) and migrates to modern ESLint v9/v10 APIs. Since the minimum supported ESLint version is now 8.57.0, the code no longer needs to maintain backward-compatible wrappers for deprecated APIs.

  • Updated TypeScript definitions to reflect required vs optional context properties
  • Replaced deprecated method calls (getSourceCode(), getFilename(), getCwd()) with direct property access (sourceCode, filename, cwd)
  • Removed the markVariableAsUsed utility wrapper function since context.sourceCode.markVariableAsUsed is now always available

Reviewed changes

Copilot reviewed 101 out of 102 changed files in this pull request and generated no comments.

Show a summary per file
File Description
typings/eslint/index.d.ts Updated type definitions to mark deprecated methods as optional and new properties as required; clarified ESLint v10 deprecation comments
lib/utils/index.js Removed markVariableAsUsed utility wrapper and simplified getDeclaredVariables implementation; updated all getSourceCode() calls to sourceCode property
lib/rules/*.js Replaced deprecated method calls with direct property access across all rule files
tests/lib/utils/selector.js Updated test utility to use context.sourceCode directly
lib/utils/*.js Updated utility functions to use modern context properties

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

Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!
The CI error should be fixed in #2969.

@FloEdelmann FloEdelmann merged commit 76c51ac into vuejs:master Nov 26, 2025
15 checks passed
@9romise 9romise deleted the cleanup branch November 26, 2025 09:05
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.

3 participants