-
-
Notifications
You must be signed in to change notification settings - Fork 75
Class fields cause false positive no-undef #471
Comments
@ackvf DId You manage to resolve this issue? |
No, I had to turn the rule off. It still reports false errors with latest |
I'm also experiencing this ( Unfortunately, seems like we'll simply need to revert to |
@lostfictions @todorone The undef property is still covered by tslint if you use both (like I do). |
@ackvf Thanks for the hint. I don't want to introduce |
Check
Edit: Fixed my comment based on @lostfictions answer. |
@timche sounds like you might be thinking of @ackvf It's true that In the end we set up a second eslint config file that turns these rules off for only the TS files and keeps it on for JS files (with a different parser). But having multiple config files means we lose ESLint editor integration for TS files, which is a big blow to productivity. So we may still switch to TSLint, since at least TSLint and ESLint can run side-by-side in VS Code, whereas there doesn't seem to be a way to make |
@lostfictions You are right, I'm confusing it with There are currently two rules I've disabled in ESLint:
Both are causing false-positives in ESLint with By deactivating them, we now let
|
@timche |
* Update: add proper scope analysis (fixes #535) * add computed-properties-in-type fixture * add computed-properties-in-interface fixture * add function-overload fixture * add method-overload fixture * add class-properties fixture * add decorators fixture * update visitor-keys * add declare-global fixture * fix typo * add test for typeof in array destructuring * add namespace fixture * add declare-module fixture * fix crash * add declare-function.ts fixture * add abstract-class fixture * add typeof-in-call-signature fixture * add test for #416 * add test for #435 * add test for #437 * add test for #443 * add test for #459 * add test for #466 * add test for #471 * add test for #487 * add test for #535 * add test for #536 * add test for #476 * fix test to use `expect()`
What version of TypeScript are you using?
2.7.2
,2.8.1
What version of
typescript-eslint-parser
are you using?15.0.0
What code were you trying to parse?
What did you expect to happen?
I did not expect any error
What happened?
I get
[eslint] 'field' is not defined. (no-undef)
The text was updated successfully, but these errors were encountered: