Jshint: Support for optional chaining?

Created on 8 Feb 2020  ·  7Comments  ·  Source: jshint/jshint

It would be nice to have this feature incorporated:

https://github.com/tc39/proposal-optional-chaining

Proposal

Most helpful comment

Is there an update on this?

All 7 comments

Thanks for the reminder! We would accept a patch for this.

(Before implementing new language features, we require them to have reached "Stage 2" of TC-39's standardization process. Because "optional chaining" has reached "Stage 4", it qualifies for implementation in JSHint. Here's a blog post explaining the policy: A Formal Commitment to New Language Features)

Both optional chaining and Nullish coalescing operators gives the same error message in VSC:
"Expected an identifier and instead saw '?'. (E030)jshint(E030)"
Very annoying… Is there a temporary fix?
Thanks

You can use the ignore:start/ignore:end or ignore:line directives to cause JSHint to pass over any syntax it doesn't recognize.

https://jshint.com/docs/

Is there an update on this?

Is this issue being worked on?

Looks like there is a fix in the works for this. For anyone interested, here is the pull request so you can watch it: https://github.com/jshint/jshint/pull/3486.

JSHint version 2.13.0, released today, introduces support for optional chaining. Be sure to update your configuration to opt in to the new language feature via esversion: 11 or later.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

damyanpetev picture damyanpetev  ·  4Comments

Guichaguri picture Guichaguri  ·  8Comments

NemoStein picture NemoStein  ·  7Comments

mcandre picture mcandre  ·  3Comments

nzakas picture nzakas  ·  10Comments