Repository navigation
refactor(test): use eslint-compat-utils - #3027
Conversation
|
There was a problem hiding this comment.
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-utilslibrary functions - Added TypeScript type exports to avoid TS errors in test files
- Added
eslint-compat-utils@^0.6.5as 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
left a comment
There was a problem hiding this comment.
Looks good to me, thank you 🙂
The changes in
typingsaim to avoid TS errors.