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
[eslint-config] Support optional chaining #1223
Comments
Just realized |
Babel is about to release optional chaining support by default, I wonder if we get this out of the box then? |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
Unfortunately, we will not get this out of the box, until eslint supports this by default. As mentioned by @doplumi, we can use/add babel's eslint plugin ( I just tested this today in my project and it works great (only 3 extra deps) It would be even better though our |
Doesnt eslint do stage 4 by default? But lets use babel eslint then. |
Yes, they are working on it: eslint/eslint#12642, but they are blocked for now. Also, some teams might not be able to upgrade to the latest eslint yet. The bug will probably only be fixed in one of the upcoming 7.x releases. |
As of right now, eslint erroneously shows a
no-unused-expression
error on optional chaining function calls / field access.In
eslint-config/index.js
there's this rule:Why was
no-unused-expressions
disabled for those cases? I'm trying to evaluate the best workaround to support optional chaining. Right now the best option seems to be eslint/eslint#11045 (comment) but it would add a dependency oneslint-plugin-babel
The text was updated successfully, but these errors were encountered: