-
-
Notifications
You must be signed in to change notification settings - Fork 49
chore(no-sync): remove @typescript-eslint/utils
#449
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
chore(no-sync): remove @typescript-eslint/utils
#449
Conversation
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 the @typescript-eslint/utils
dependency and inlines its parser services logic.
- Removed
@typescript-eslint/utils
frompackage.json
. - Reimplemented
getParserServices
inlib/util/get-parser-services.js
with custom error handling and parser detection.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
package.json | dropped @typescript-eslint/utils dependency |
lib/util/get-parser-services.js | added inline parserServices logic, error messages, and a flag for type-info requirements |
Comments suppressed due to low confidence (1)
lib/util/get-parser-services.js:58
- This error branch is newly introduced but lacks corresponding tests. Add unit tests to cover the scenario where parserServices.program is null and allowWithoutFullTypeInformation is false to ensure throwError is invoked as expected.
if (parserServices.program == null && !allowWithoutFullTypeInformation) {
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.
Generally love this change 💜
Thank you
CC/ @JoshuaKGoldberg |
5b3c683
to
e67e523
Compare
- Removes the dependency on `typescript`, a peer dependency of `@typescript-eslint/utils`
e67e523
to
d9b69bb
Compare
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.
Awesome, thanks.
👋 @MichaelDeBoey thanks for the ping but I'm a bit lost, is there something I should be doing here? |
@JoshuaKGoldberg I figured since you're the maintainer of the original package, you could maybe give some more insights into if this replacement is done properly and maybe we forgot some edge cases here that are important and that's why you guys have TS as a dependency. |
Ah gotcha, thanks! Yeah I think you're on the right track. We've been experimenting with splitting up If you don't think you'd end up wanting to use the standalone |
@JoshuaKGoldberg I think it would be awesome if we could just keep using the original code without all the problems mentioned here in this PR. CC/ @eslint-community/eslint-plugin-node |
Sorry. I realized later that there was a #451. |
so what's the next step here? |
Description
@typescript-eslint/utils
, which hastypescript
as a peer dependency.Update the
getParserServices
function to handle parser services directly without relying on the removed utility.Related issues
Warning received while installing
eslint-plugin-n
on JS projects withouttypescript
: