Skip to content

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

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

Closed
JoshuaKGoldberg opened this issue Jul 1, 2023 · 6 comments · Fixed by #683
Closed
Labels
Status: Released It's now live.

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! 💖

@BleedingDev
Copy link

Hi,
I am using this rule in https://github.com/pegak/nauc-me-it and after update to v6 it fails with error:
3:31 Error: Parameter should have an immutability of at least "ReadonlyShallow" (actual: "Unknown"). functional/prefer-immutable-types

Could it be caused by this change?

@RebeccaStevens
Copy link
Collaborator

v6 isn't supported yet. I'll should be able to work on this sometime in the next week.
Theses' work that needs to be done both in repo and in https://github.com/RebeccaStevens/is-immutable-type

@BleedingDev
Copy link

Many thanks. Can I help? :)

@RebeccaStevens
Copy link
Collaborator

@pegak Thanks for the offer, but I should be good. I've already done the majority of the work back when v6 was in beta. I just need to finish it. I'm starting back on it now.

@RebeccaStevens
Copy link
Collaborator

RebeccaStevens commented Jul 15, 2023

6.0.0-next.1 is now available for testing.

RebeccaStevens added a commit that referenced this issue Jul 30, 2023
@github-actions
Copy link

🎉 This issue has been resolved in version 6.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot added the Status: Released It's now live. label Jul 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Released It's now live.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants