[no-unused-vars] Exception hit with default parameter in v.4.0.0-alpha.5 #2369
Labels
bug
Something isn't working
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
Milestone
Repro
Expected Result
No errors.
Actual Result
None - error is hit:
"Cannot read property 'type' of undefined Occurred while linting .../test.ts:1"
Additional Info
In previous versions of typescript-eslint, the function
Optional
is incorrectly reported as an unused var.Removing the default parameter (
= []
) causes the rule to parse & the file to pass linting checks as expected (this was true in previous versions too).Versions
@typescript-eslint/eslint-plugin
4.0.0-alpha.5
@typescript-eslint/parser
4.0.0-alpha.5
TypeScript
3.7.5
ESLint
7.6.0
node
12.13.0
npm
6.12.0
Debug details from flagged run
The text was updated successfully, but these errors were encountered: