houndci / hound

Automated code review for GitHub pull requests.
https://houndci.com
MIT License
1.95k stars 401 forks source link

TypeScript 3.7 optional chaining operator is not supported #1829

Open AngusGMorrison opened 3 years ago

AngusGMorrison commented 3 years ago

Hound is throwing up TypeScript parsing errors for the optional chaining operator, ?., which was added in TypeScript 3.7. For example:

wrapper?.update()
// => Parsing error: Expression expected

These errors are not reproduced locally.

Hound is configured to use eslint, and the errors occur using both eslint 6.8.0 and 7.7.0. Locally we run TypeScript through eslint using @typescript-eslint v4.12 (the problem also occurs using v2.33).

eslint:
  enabled: true
  config_file: .eslintrc
  version: 6.8.0

Could this be an issue with Hound TypeScript support, or is there additional configuration required?

josh08h commented 3 years ago

@gylaz Hi, are you able to chime in on this one? We are unable to use the optional chaining feature of TS since Hound errors with the following: image

We are using the "@typescript-eslint" esling plugin alongside the @typescript-eslint/parser parser. Both of which support optional chaining.

I'm unsure as to where the error is being thrown on Hound's side. Are you using an outdated version of @typescript-eslint?

GoudekettingRM commented 3 years ago

I'm having the same issue.

GoudekettingRM commented 2 years ago

@gylaz @josh08h Is there an update on this? Experiencing this still. We're just ignoring the hound warnings, as the code transpiles fine, but it is kinda annoying haha

GoudekettingRM commented 2 years ago

@AngusGMorrison Did you happen to find a solution for this, I've been hitting this error every so often and I keep ending up at this issue...

josh08h commented 2 years ago

@GoudekettingRM hi, we migrated off Hound & went with reviewdog instead