Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

FYI: typescript-eslint@v6 will remove parserServices.hasFullTypeInformation #2227

Closed
JoshuaKGoldberg opened this issue Jul 1, 2023 · 1 comment 路 Fixed by #2256
Closed

Comments

@JoshuaKGoldberg
Copy link

馃憢 Hi! I'm one of the maintainers of typescript-eslint. We're getting ready to release a new v6 major version of the tooling, which includes some small breaking changes.

Coming over from typescript-eslint/typescript-eslint#7124: I see this repo contains references to hasFullTypeInformation. That property is something we've never recommended using (see that issue & typescript-eslint/typescript-eslint#7158). We recommend instead using ESLintUtils.getParserServices per https://typescript-eslint.io/developers/custom-rules#typed-rules.

If you really want to "progressively enhance" lint rules, parserServices.program will be null if type information isn't available. But we definitely recommend against that kind of rule behavior changing.

Overall, I'd suggest trying out typescript-eslint@v6 and making sure internal builds & downstream repos still compile & lint nicely with all the changes. Let me know if there's anything we can do to help with the v6 upgrade! 馃挅

@ota-meshi
Copy link
Member

Thank you for letting me know.
I would avoid using ESLintUtils.getParserServices because @typescript-eslint/utils is too many dependencies for us. I especially don't want TypeScript to be installed in the environment of users who don't use TypeScript. So I think maybe we implement our own function.

we've never recommended

I didn't know it was never recommended 馃槄. I was referring to the source code of someone who used to belong to your team.
https://github.com/mysticatea/eslint-plugin-es/blob/00d73851793541dc7b0d07292deb0ca2bc8a25e1/lib/util/define-prototype-method-handler.js#L27
I need to modify the source code that I created with reference to it.

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 a pull request may close this issue.

2 participants