eslint-plugin-react-hook-form icon indicating copy to clipboard operation
eslint-plugin-react-hook-form copied to clipboard

feat: Add check for useController() and <Controller>

Open ypresto opened this issue 2 years ago • 1 comments

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.

ypresto avatar Jun 15 '23 11:06 ypresto

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.

andykao1213 avatar Jul 29 '23 06:07 andykao1213