Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

asExpression unwanted error #563

Closed
AdrienLemaire opened this issue Nov 22, 2018 · 1 comment
Closed

asExpression unwanted error #563

AdrienLemaire opened this issue Nov 22, 2018 · 1 comment
Labels

Comments

@AdrienLemaire
Copy link

AdrienLemaire commented Nov 22, 2018

Related to #25

What version of TypeScript are you using?
3.1.6

What version of typescript-eslint-parser are you using?
21.0.1

What code were you trying to parse?

interface CustomWindow extends Window {
  gtmDataLayer?: any;
}


      (window as CustomWindow).gtmDataLayer.push({
        event: "Registration started",
        provider,
      });

What did you expect to happen?
No error shown in vim, similarly to tsc reportt

$ yarn type-check
yarn run v1.12.3
$ tsc --project tsconfig.json
Done in 3.81s.

What happened?

I spent hours thinking that the code above was incorrect because of that error before realizing that tsc didn't raise errors on this code.

The problem is that my git hook fails with the eslint error, and that's not an error I can eslint-disable..

@AdrienLemaire
Copy link
Author

Sorry about that. We're not using the typescript-eslint-parser but babel-eslint

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant