eslint-plugin-react-hook-form
eslint-plugin-react-hook-form copied to clipboard
feat: Add check for useController() and <Controller>
Just checks it..! ✌️
- Add useController() to method name filter
- Check for fieldState of controller (it refers formState: https://github.com/react-hook-form/react-hook-form/blob/2f3986a16682a905467f1cd6da7e4a9bc837277b/src/useController.ts#L160 )
- Change findPropertyByName() to accept ObjectPattern used in a node other than VariableDeclarator.
- Find
<Controller render=({ formState, fieldState }) />and check by same logic.
Hi @ypresto, thanks for contributing. I saw there were lots of test cases that failed when I tested locally. Please make sure the test case won't be failed. Sorry that the CI got some problem, so the test case didn't run immediately. I'm looking into that.