**Do you want to request a *feature* or report a *bug*?**
bug
**What is the current behavior?**
React hooks linter fails with this piece of code

```js
function useHook() {
  const ref = React.useRef([1, 2, 3]);
  const res = []
  // valid because there are not unexpected returns
  if (ref.current) {
    for (let i = 0; i !== ref.current.length && !ref.current[i]; ++i ) {
      res.push(ref.current[i]);
    }
  }
  React.useLayoutEffect(() => {});
}
```

however a bit more usual for loop is handled as expected
```js
function useHook() {
  const ref = React.useRef([1, 2, 3]);
  const res = []
  if (ref.current) {
    for (let i = 0; i !== ref.current.length; ++i ) {
      res.push(ref.current[i]);
    }
  }
  React.useLayoutEffect(() => {});
}
```

**What is the expected behavior?**

Skip for looks without returns

**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**

eslint-plugin-react-hooks 0.0.0
while (cond) {
            useHookInsideLoop();
          }
        }
      `,
      errors: [loopError('useHookInsideLoop')],
    },
    {
      code: `
        // Invalid because it's dangerous and might not warn otherwise.
        // This *must* be invalid.
        function renderItem() {
          useState();
        }
        function List(props) {
          return props.items.map(renderItem);
        }
      `,
      errors: [functionError('useState', 'renderItem')],
    },
    {
      code: `
        // Currently invalid because it violates the convention and removes the "taint"
        // from a hook. We *could* make it valid to avoid some false positives but let's
        // ensure that we don't break the "renderItem" and "normalFunctionWithConditionalHook"
        // cases which must remain invalid.
        function normalFunctionWithHook() {
          useHookInsideNormalFunction();
        }
      `,