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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: eslint-plugin-react-hooks documentation might be misleading #29045

Open
StyleShit opened this issue May 12, 2024 · 6 comments · May be fixed by #29046
Open

Bug: eslint-plugin-react-hooks documentation might be misleading #29045

StyleShit opened this issue May 12, 2024 · 6 comments · May be fixed by #29046
Labels
Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug

Comments

@StyleShit
Copy link
Contributor

Splits from WordPress/gutenberg#61598 & WordPress/gutenberg#61599

The current explanation about "additionalHooks" under react-hooks/exhaustive-deps might be misleading. The regex in the example catches more than needed.

This:

"additionalHooks": "(useMyCustomHook|useMyOtherCustomHook)"

Will catch also things like this:

function App() {
	const data1 = useMyCustomHook2();
	const data2 = useMyOtherCustomHookTest();

	// ...
}

This might be the reason why Gutenberg used the same approach (which caused the bug mentioned above):
https://github.com/WordPress/gutenberg/blob/2df566c771dba22eec2841081a00963a2e56658c/packages/eslint-plugin/configs/react.js#L37-L42

@StyleShit StyleShit added the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label May 12, 2024
Copy link

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@github-actions github-actions bot added the Resolution: Stale Automatically closed due to inactivity label Aug 10, 2024
@StyleShit
Copy link
Contributor Author

Bump

@github-actions github-actions bot removed the Resolution: Stale Automatically closed due to inactivity label Aug 10, 2024
Copy link

github-actions bot commented Nov 8, 2024

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@github-actions github-actions bot added the Resolution: Stale Automatically closed due to inactivity label Nov 8, 2024
@StyleShit
Copy link
Contributor Author

Bump

@github-actions github-actions bot removed the Resolution: Stale Automatically closed due to inactivity label Nov 9, 2024
Copy link

github-actions bot commented Feb 7, 2025

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@github-actions github-actions bot added the Resolution: Stale Automatically closed due to inactivity label Feb 7, 2025
@StyleShit
Copy link
Contributor Author

Bump

@github-actions github-actions bot removed the Resolution: Stale Automatically closed due to inactivity label Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant