```js
function Editor({ data: { page } }: EditorProps) {
  if (page == null) throw Error('missing page data in editor')
  const [editorValue, setEditorValue] = useState(() => {
}
```

I believe this should be a valid case, because throw. 
`,
    `
      // Currently valid because we found this to be a common pattern
      // for feature flag checks in existing components.
      // We *could* make it invalid but that produces quite a few false positives.
      // Why does it make sense to ignore it? Firstly, because using
      // hooks in a class would cause a runtime error anyway.
      // But why don't we care about the same kind of false positive in a functional
      // component? Because even if it was a false positive, it would be confusing
      // anyway. So it might make sense to rename a feature flag check in that case.
      class ClassComponentWithFeatureFlag extends React.Component {
        render() {
          if (foo) {
            useFeatureFlag();
          }
        }
      }
    `,
    `
      // Currently valid because we don't check for hooks in classes.
      // See ClassComponentWithFeatureFlag for rationale.
      // We *could* make it invalid if we don't regress that false positive.
      class ClassComponentWithHook extends React.Component {
        render() {
          React.useState();
        }
      }
    `,
    `
      // Currently valid.