-
-
Notifications
You must be signed in to change notification settings - Fork 208
how to do that can babel-eslint support @babel/plugin-proposal-optional-chaining #767
Comments
@pandaCure: could you post your eslint & babel config? hear hear. .eslintrc.js:
babel.config.js:
|
Hello, any updates? |
Same issue here, any updates? |
any updates? |
I have fixed by disabling the Typescript checking that VS Code performs. Apparently (for me) this causes the issue. This is my VS Code configuration in the file
Hope it helps! |
@andrese03 @1014156094 your settings work, but what do we lose deactivating those options? |
I think this error has nothing to do with @JJBocanegra Perhaps when Typescript officially supports this operator targeted in milestone 3.7.0, the error should definitely go away. Until then, For my team which is using ESLint already for validation, this hack/fix doesn't cause too much of an issue. If you are relying on that default validation and do not have ESLint or some equivalent setup, then I think it will be a problem. I guess since we are here on |
Adding to @nicholascm's (and a few others) answer, this is definitely a VS Code issue and not an eslint issue. I was able to get the linting in our react project to work properly in VS Code by adding the following config to to
I'm not sure what you lose by disabling You can remove all of the Suggestions welcome! |
@bhardy thanks for details solution. |
So this happened: microsoft/TypeScript#33294 When will babel-eslint be updated to support it? |
@r8rsfans75 I don’t think there’s anything to do here - The typescript error mentioned in this issue will disappear as soon as the TS version is released with this change and your local VSCode is using it for validations. |
To my knowledge, optional chaining with assignment is not yet (and may never be) supported: tc39/proposal-optional-chaining#18 |
This issue has nothing to do with VSCode. I have the same issue in WebStorm and I don't have any settings for VSCode in the project. |
If the Typescript file is open, you can change it by selecting the option on the bottom blue bar (you can find the VS Code version number on the right-side). |
So, as of today, babel-eslint still yells at you if you use optional chaining? |
This will be supported in ESLint core soon and we will be working on updating the new |
While it isn't on ESLint core yet, you should add https://dev.to/ismail9k/use-javascript-optional-chaining-today-2ech |
Thank you for the issue. Now that |
error
i use vs code, i want to use babel new feature but eslint always show errors
The text was updated successfully, but these errors were encountered: