Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork700
chore: remove ESLint compatibility code#2965
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This reverts commitf06309c.
changeset-botbot commentedNov 22, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
|
3d4b39d tob41f03aComparethey are not relevant anymore when the functions areavailable in all supported ESLint versions
FloEdelmann left a comment
There was a problem hiding this 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! 🙂
There was a problem hiding this 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
markVariableAsUsedutility wrapper function sincecontext.sourceCode.markVariableAsUsedis 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 | RemovedmarkVariableAsUsed utility wrapper and simplifiedgetDeclaredVariables implementation; updated allgetSourceCode() calls tosourceCode 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 usecontext.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.
ota-meshi left a comment
There was a problem hiding this 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.
76c51ac intovuejs:masterUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Since our minimum supported version is currentlyESLint 8.57.0.
This PR aligns with the migration guide athttps://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: