Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for optional chaining? #3448

Closed
stefanuddenberg opened this issue Feb 8, 2020 · 7 comments
Closed

Support for optional chaining? #3448

stefanuddenberg opened this issue Feb 8, 2020 · 7 comments
Labels

Comments

@stefanuddenberg
Copy link

It would be nice to have this feature incorporated:

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

@jugglinmike
Copy link
Member

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)

@jguillod
Copy link

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

@jugglinmike
Copy link
Member

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/

@rodrigoehlers
Copy link

Is there an update on this?

@JoshMayberry
Copy link

Is this issue being worked on?

@JoshMayberry
Copy link

JoshMayberry commented Mar 15, 2021

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

@jugglinmike
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants