Allow additional hook names with Eslint Plugin Query #8025
Answered
by
Newbie012
thespacemanatee
asked this question in
Ideas
-
Thank you for this wonderful library. We are using this library in React Native and we are wrapping We would like to see an {
"rules": {
// ...
"react-hooks/exhaustive-deps": ["warn", {
"additionalHooks": "(useMyCustomHook|useMyOtherCustomHook)"
}]
}
} Thank you very much for considering this feature request! |
Beta Was this translation helpful? Give feedback.
Answered by
Newbie012
Sep 8, 2024
Replies: 1 comment 14 replies
-
@Newbie012 what do you think ? |
Beta Was this translation helpful? Give feedback.
14 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Apparently I don't check the imports. It's already working as long as an object contains both
queryKey
andqueryFn
: https://eslint-online-playground.netlify.app/#eNqNkEFrwzAMhf+K8CUtpAnbMaNj0LHLTjvXPYREKe5iOY3t0RLy3yfbZWQwRk+W0XufnjQJOzYlXmo99FicrKhE56lxyhDsjB4MIbnVBKrNwVv88DheY7Xz1hkd/zCvYZIE0BiyDs4PsP3RsvUc3ne8VrA/5On3RhWs1rB9Zi67nxbmx2Re4O9FzCIXaHtFrmBWp45pHcVLjA6G3h8VpbzdaDRkL67miXXzWSbXJkk2EZ9JkoSXaG2xq33vYB9iFkWxQN0m2X3W9bUrR2yM1kgtttkhl3SQxKEGnlEfw3UNcaB4KincdUApKq60aX3PNRtCo8WvVxwChBqFNmiiJfT+zZxonAOtu9GiJ0nLU0T9IUj9383Qm8NN528O0brm