[no-use-before-define] Typescript Optional Chaining False Positive #1182
Labels
duplicate
This issue or pull request already exists
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
Repro
Expected Result
This should not throw an error as it is valid syntax.
Actual Result
It throws a false positive error thinking that the
language
variable is being used but its actually a property call using the new Typescript optional chaining in 3.7 version.Additional Info
46:50 error 'language' was used before it was defined @typescript-eslint/no-use-before-define ✖ 1 problem (1 error, 0 warnings)
Versions
@typescript-eslint/eslint-plugin
2.6.1
@typescript-eslint/parser
2.6.1
TypeScript
3.7.2
ESLint
6.5.1
node
12.13.0
npm
6.12.0
The text was updated successfully, but these errors were encountered: