function isReactHookCallWithDepsArray(args) {
  if (args.length === 2) {
    /**
     * useEffect(() => {
     *   // do something
     * }, [dep1, dep2, dep2])
     */
    return isValidHookCallbackAndDepsFormat(args, /* baseIndex */ 0);
  }
  if (args.length === 3) {
    /**
     * useImperativeHandle(ref, () => {
     *   // do something
     * }, [dep1, dep2, dep2]);
     */
    return (
      args[0].type === "Identifier" &&
      isValidHookCallbackAndDepsFormat(args, /* baseIndex */ 1)
    );
  }
  return false;
}
Checks if the arguments of a function are a call to a React Hook with a dependencies array.