[no-use-before-define] False positive with optional chaining #1104
Labels
bug
Something isn't working
has pr
there is a PR raised to close this
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
scope analyser
Issues that are caused by bugs/incomplete cases in the scope analyser
Milestone
Repro
Expected Result
Would not produce any errors.
Actual Result
Produces an error:
// 'updatedAt' was used before it was defined. (@typescript-eslint/no-use-before-define)
Additional Info
This issue seems to only happen when the variable name is the same as the property name. For instance, the code below does not show the warning:
Versions
2.4.0
3.7.0-beta
(15 Oct 2019)6.5.1
12.11.1
6.11.3
1.19.1
The text was updated successfully, but these errors were encountered: