Closed balupton closed 5 years ago
Thank you for this report.
Looks like a bug about function declarations which don't have their body.
typescript-eslint-parser
should make the function scope and parameter's variables even if the body is nothing, but not.
FYI, this happens with index signatures in class properties as well:
export default class Foo {
[key: string]: any;
}
2:6 error 'key' is not defined no-undef
This issue has been migrated to the new project here: typescript-eslint/typescript-eslint#18
Thanks!
What version of TypeScript are you using? 3.1.6
What version of
typescript-eslint-parser
are you using? 21.0.1What code were you trying to parse?
What did you expect to happen? Just get back:
What happened?
Got back no-undef errors:
Here is the .eslintrc:
The dev deps:
And the eslint run: