feat(eslint-plugin-query): add support for trpc hooks in no-unstable-deps rule#8894
Closed
magrinj wants to merge 1 commit intoTanStack:mainfrom
Closed
feat(eslint-plugin-query): add support for trpc hooks in no-unstable-deps rule#8894magrinj wants to merge 1 commit intoTanStack:mainfrom
magrinj wants to merge 1 commit intoTanStack:mainfrom
Conversation
Collaborator
|
trpc moved away from those hooks in v11, and it’s not our place to lint for integrations that are build on top of react-query, sorry. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow up of #7911
Summary
This PR enhances the
no-unstable-depsESLint rule by adding support for trpc hooks. The rule now correctly identifies and handles trpc hooks in addition to the existing React hooks.Why These Changes?
The original rule only supported React hooks, which limited its usefulness in projects using trpc. By adding support for trpc hooks, we ensure that the rule is more comprehensive and can be used in a wider range of projects.
Below an example of how trpc called are made: