-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[no-undef] False positive with optional chaining #1116
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
Comments
Until this gets fixed, for what it's worth, downgrading the @typescript-eslint/eslint-plugin module to version 2.3.2 seems to work OK for me alongside TS 3.7. That version of the plugin does throw out a big typescript-estree banner about the TS version not being supported, but at least it doesn't emit the no-undef errors. |
We have undefined behaviour for new syntax on old versions - the parser shouldn't crash, but linting may not work as expected, as the AST structure may not be correct.. Happy to accept a PR to fix it. |
I just disabled the |
@rhyek is right, just disable |
Hi there,
Just trying the latest eslint-plugin (2.4.0) with optional chaining and this code:
Gives a no-undef error on
.z
Versions
@typescript-eslint/eslint-plugin
2.4.0
@typescript-eslint/parser
2..4.0
eslint-config-airbnb
18.0.1
TypeScript
3.7.0-beta
ESLint
6.5.1
node
10.16.2
npm
6.10.3
The text was updated successfully, but these errors were encountered: