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
[no-undef] False positive for Interfaces #342
Comments
Temporary disabling this rule for `.ts` files because, it throws an error for exporting interfaces, and we can safely disable it since TypeScript will fail to compile with undefined vars, more info: * typescript-eslint/typescript-eslint#342 * eslint/typescript-eslint-parser#437 (comment)
Slightly more minimal repro case:
Non-default exports also trigger it:
Type aliases are affected too:
I'm going to try to figure this out because it's affecting me, but don't really know what I'm doing so any help's appreciated. |
We've got plans to fix the scope analysis, but it's a big job because of the complexities that the type system introduces, so there's no ETA on that. A workaround is to not use the |
Any news here? Thanks in advance! |
Just disable it eslint/typescript-eslint-parser#437 |
Merging into #1856 |
Repro
Paste the below code into a file and lint it.
Expected Result
ESLint should not produce any errors
Actual Result
ESLint produces a
no-undef
error.Additional Info
Oddly, it also complains about me using
new Map<T, U>()
with the same rule. I am not sure if it is the same root cause, but I figured it was worth noting.Versions
@typescript-eslint/eslint-plugin
1.4.2
@typescript-eslint/parser
1.4.2
TypeScript
3.3.3333
ESLint
5.15.1
node
8.15.0
npm
*6.4.1
yarn
*1.12.3
* I use Yarn instead of NPM
The text was updated successfully, but these errors were encountered: