Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

馃悰 Wrong documentation for useExhaustiveDependencies #4791

Closed
1 task done
jer-sen opened this issue Aug 31, 2023 · 1 comment
Closed
1 task done

馃悰 Wrong documentation for useExhaustiveDependencies #4791

jer-sen opened this issue Aug 31, 2023 · 1 comment
Labels
S-To triage Status: user report of a possible bug that needs to be triaged

Comments

@jer-sen
Copy link

jer-sen commented Aug 31, 2023

Environment information

https://docs.rome.tools/lint/rules/useexhaustivedependencies/

What happened?

Options have nothing to do with hooks considered as stable, it's a list of custom hooks of which the dependencies will be checked.

Stable hooks are defined here

let stable_config: HashSet<StableReactHookConfiguration> = HashSet::from_iter([
and are not configurable:

        let stable_config: HashSet<StableReactHookConfiguration> = HashSet::from_iter([
            StableReactHookConfiguration::new("useState", Some(1)),
            StableReactHookConfiguration::new("useReducer", Some(1)),
            StableReactHookConfiguration::new("useTransition", Some(1)),
            StableReactHookConfiguration::new("useRef", None),
            StableReactHookConfiguration::new("useContext", None),
            StableReactHookConfiguration::new("useId", None),
            StableReactHookConfiguration::new("useSyncExternalStore", None),
        ]);

Expected result

Something like:

Allows to specify custom hooks - from libraries or internal projects - that will also be checked.

By the way, it would be nice to make stable hooks configurable!

Code of Conduct

  • I agree to follow Rome's Code of Conduct
@jer-sen jer-sen added the S-To triage Status: user report of a possible bug that needs to be triaged label Aug 31, 2023
@ematipico
Copy link
Contributor

@jer-sen Rome is NOT maintained anymore

Check the README: https://github.com/rome/tools

@ematipico ematipico closed this as not planned Won't fix, can't repro, duplicate, stale Aug 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
S-To triage Status: user report of a possible bug that needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants