You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 19, 2019. It is now read-only.
Thanks for the report.
Unfortunately this is a known issue. Class properties are not part of the current ecma spec which means eslint, and its scoping tool eslint-scope, do not handle these nodes correctly. We are working on ways for this parser to inform the scope analysis tool how to handle typescript nodes properly and in the future hope to support all eslint rules. Check out this issue for more details: #77
A workaround is too disable rules: no-undef and no-unused-vars. The typescript parser has two compiler options that will detect unused variable and should warn about undefined variables:
I understand. I already set these compiler options, so I followed your suggestion and disabled the eslint rules. I did the same with no-fallthrough (replaced by typescript's noFallthroughCasesInSwitch). The rule no-empty also started to fail (doesn't recognize the // empty comments), and has no typescript equivalent, so I disabled that one.
We can close this issue, unless you want to keep it open.
What version of TypeScript are you using?
2.2.2
What version of
typescript-eslint-parser
are you using?2.1.0
What code were you trying to parse?
What did you expect to happen?
x
is identified as a member ofFoo
.What happened?
Thanks (I hope this wasn't reported before).
BTW, here is the es5 output, for anyone not familiar with this syntax:
The text was updated successfully, but these errors were encountered: