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
Optional Chaining and Nullish coalescing Operator arrived at Stage 4 #12642
Comments
When can we hope to get this? optional chaining is a highly desirable feature, and since we dropped Babel we're waiting for Acorn to support this, so webpack can support it as well :) |
We're currently also waiting for Acorn to support this (our default parser, Espree, wraps Acorn), and that work is currently blocked by estree/estree#204. |
Unfortunately, it looks like there wasn't enough interest from the team Thanks for contributing to ESLint and we appreciate your understanding. |
As I understand, we are waiting for Optional Chaining syntax to be added to ESTree to merge this PR. |
As commented by dreyks (#13196 (comment))
Does it means that both Optional Chaining and Nullish coalescing Operator is part of ESLint now and this issue can be closed? |
Not yet. This will be closed when we integrate these upstream changes into ESLint core. |
Right, makes sense... |
The ESTree spec was just finalized yesterday, so it's going to take a little bit of time to get everything updated downstream. Hopefully we'll be able to get it out in the next release.
Nullish coalescing operator was included in the latest release (v7.2.0). |
* update deps (to branch) * trivial fix for debug output * update code path analysis * update accessor-pairs * update array-callback-return * add tests for camelcase * add tests for computed-property-spacing * update dot-location * update dot-notation * update func-name-matching * update global-require * update indent * add tests for getter-return * update new-cap * update newline-per-chained-call * update no-alert * update no-extend-native * update no-extra-bind * update no-extra-parens * update no-eval * update no-implicit-coercion * update eslint-utils * update no-implied-eval * update no-import-assign * update no-magic-numbers * update no-obj-calls * update no-prototype-builtins * add tests for no-restricted-syntax * update no-self-assign * update no-setter-return * update no-unexpected-multiline * update no-unused-expression * update no-useless-call * update no-whitespace-before-property * update operator-assignment * update padding-line-between-statements * update prefer-arrow-callback * add tests for prefer-destructuring * update prefer-exponentiation-operator * update prefer-numeric-literals * update prefer-promise-reject-errors * update prefer-regex-literals * update prefer-spread * update use-isnan * update yoda * update wrap-iife * remove __proto__ * fix no-import-assign for delete op * update eslint-visitor-keys * fix no-unexpected-multiline to just ignore optional chaining * update func-call-spacing * update constructor-super * update dot-location for unstable sort * update no-extra-boolean-cast * update func-call-spacing * update no-extra-parens for false positive on IIFE * update array-callback-return * update no-invalid-this (astUtils.isDefaultThisBinding) * update radix * update a comment in no-implicit-coercion * update comments in no-extra-bind * remove unnecessary change from array-callback-return * update dot-notation for autofix about `let?.[` * update new-cap * update wrap-iife * update prefer-arrow-callback * change isSameReference to handle `a.b` and `a?.b` are same * fix code path analysis for `node.arguments.length == 0` case * update `astUtils.couldBeError` * update `astUtils.isMethodWhichHasThisArg` * improve coverage * fix isMethodWhichHasThisArg * update no-self-assign * Upgrade: espree@7.2.0 Co-authored-by: Kai Cataldo <kai@kaicataldo.com>
Shouldn't this issue remain open? While Nullish coalescing may be supported, I have confirmed that Optional Chaining is not supported in (the latest) eslint 7.6.0. |
@Lonniebiz It works in the online demo. What input code are you using and which warning or error do you see? |
Earlier, I tested some code that looked like this:
I got some error griping about |
Good afternoon! Have you added support for optional chaining to eslint? If not added, which version will support it? Thanks! |
Support for optional chaining was added in v7.5.0 |
Thank you very much! |
The version of ESLint you are using.
6.7
The problem you want to solve.
Support two new ES features: Optional Chaining and Nullish coalescing Operator.
Your take on the correct solution to problem.
ChainExpression
node eslint-visitor-keys#12??
operator,import.meta
, andexport * as ns
espree#441 and Update: support optional chaining espree#446??
operator, import.meta, andexport * as ns
#13196 and Update: optional chaining support (fixes #12642) #13416(Template inspired by Issue 12629)
The text was updated successfully, but these errors were encountered: