Bug: [no-unused-vars] Used vars incorrectly reported in presence of static blocks #5577
Closed
4 tasks done
Labels
accepting prs
Go ahead, send a pull request that resolves this issue
bug
Something isn't working
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
Before You File a Bug Report Please Confirm You Have Done The Following...
Playground Link
Playground does not work
Repro Code
ESLint Config
tsconfig
No response
Expected Result
No report about unused variables.
Actual Result
The
foo
function is reported as unused even though it's used by theFoo
class.Additional Info
Removing the static block from
Foo
removes the report.Initially, I thought that this may be related to #5571, but this issue still persists after upgrading to 5.36.1.
Versions
@typescript-eslint/eslint-plugin
5.36.1
@typescript-eslint/parser
5.36.1
TypeScript
4.8.2
ESLint
8.23.0
node
18.8.0
The text was updated successfully, but these errors were encountered: