title: ESlint parsing error "Unexpected token" on TypeScript cast operator "as"
body: <p>Any occurrence of <code>as</code> operator gives <code>[eslint] [E] Parsing error: Unexpected token, expected ";"</code> pointing to the place of <code>as</code>. Example code:</p>
  
  <pre><code>{error &amp;&amp; &lt;small className="invalid-feedback"&gt;{(error as any).message}&lt;/small&gt;}
  </code></pre>
  
  <p>This cast to <code>any</code> is a workaround to some bug in <code>react-hooks-form</code>'s <code>useFormContext</code> function.</p>
  
  <p>When I ignore the error and compile the app it works fine.</p>
  
  <p>This happens in a standard unejected Create React App with latest TypeScript and react-scripts:</p>
  
  <pre><code>$ npm list -dev -depth 0
  frontend@0.1.0 
  ├── eslint-plugin-flowtype@3.13.0
  ├── react-hot-loader@4.12.19
  ├── react-scripts@3.4.0
  └── typescript@3.8.2
  </code></pre>
  
  <p>AFAIK there are no configuration files besides autogenerated <code>tsconfig.json</code>:</p>
  
  <pre><code>{
    "compilerOptions": {
      "target": "es5",
      "lib": [
        "dom",
        "dom.iterable",
        "esnext"
      ],
      "allowJs": true,
      "skipLibCheck": true,
      "esModuleInterop": true,
      "allowSyntheticDefaultImports": true,
      "strict": true,
      "forceConsistentCasingInFileNames": true,
      "module": "esnext",
      "moduleResolution": "node",
      "resolveJsonModule": true,
      "isolatedModules": true,
      "noEmit": true,
      "jsx": "react"
    },
    "include": [
      "src"
    ]
  }
  </code></pre>
  
  <p>Any ideas why this happens?</p>