This repository was archived by the owner on Jan 19, 2019. It is now read-only.
This repository was archived by the owner on Jan 19, 2019. It is now read-only.
Interface keys can falsely violate no-use-before-define
#435
Closed
Description
What version of TypeScript are you using?
2.6.2
What version of typescript-eslint-parser
are you using?
11.0.0
What code were you trying to parse?
interface Foo {
bar: string
}
const bar = 'blah'
What did you expect to happen?
The code to be considered valid from the perspective of no-use-before-define
, or the README to call out that this is an unsupported case.
What happened?
The key bar
in the interface on line 2 was flagged as being used before defined. If I removed the later const bar...
assignment, the lint error went away.