<!--
  Note: if the issue is about documentation or the website, please file it at:
  https://github.com/reactjs/reactjs.org/issues/new
-->

**Do you want to request a *feature* or report a *bug*?**
Feature (to catch potential bugs)

**What is the current behavior?**
The react-hooks/rules-of-hooks ESLint rule catches uses of hooks in conditionals in components, but does not recognise an anonymous function wrapped in forwardRef as a component. 

The following example breaks the rules of hooks, but isn't caught by the rule:
```jsx
// This should fail
const FancyButton = React.forwardRef((props, ref) => {
  if (props.fancy) {
    useCustomHook();
  }
  return <button ref={ref}>{props.children}</button>;
});
```

**What is the expected behavior?**
The above example should be caught by react-hooks/rules-of-hooks, and raise the "React Hook "useCustomHook" is called conditionally" error.

// These are variations capturing the current heuristic--
      // we only allow hooks in PascalCase, useFoo functions,
      // or classes (due to common false positives and because they error anyway).
      // We *could* make some of these invalid.
      // They probably don't matter much.
      (class {useHook = () => { useState(); }});
      (class {useHook() { useState(); }});
      (class {h = () => { useState(); }});
      (class {i() { useState(); }});
    `,
    `
      // Valid because they're not matching use[A-Z].
      fooState();
      use();
      _use();
      _useState();
      use_hook();
    `,
    `
      // This is grey area.
      // Currently it's valid (although React.useCallback would fail here).
      // We could also get stricter and disallow it, just like we did
      // with non-namespace use*() top-level calls.
      const History = require('history-2.1.2');
      const browserHistory = History.useBasename(History.createHistory)({
        basename: '/',
      });
    `,
    `
      // Regression test for some internal code.