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.
[no-unused-vars] Crash when running ESLint #171
Description
Repro
{
"rules": {
"no-unused-vars": [1, {"vars": "all", "args": "none"}],
"typescript/no-unused-vars": "warn"
}
}
I cannot hunt down the code where it breaks
Expected Result
ESLint should pass.
Actual Result
Warning: Cannot read property 'type' of undefined Use --force to continue.
TypeError: Cannot read property 'type' of undefined
at isForInRef (F:\github\quadre\node_modules\eslint\lib\rules\no-unused-vars.js:406:24)
at variable.references.some.ref (F:\github\quadre\node_modules\eslint\lib\rules\no-unused-vars.js:443:21)
at Array.some (<anonymous>)
at isUsedVariable (F:\github\quadre\node_modules\eslint\lib\rules\no-unused-vars.js:442:40)
at collectUnusedVariables (F:\github\quadre\node_modules\eslint\lib\rules\no-unused-vars.js:565:26)
at collectUnusedVariables (F:\github\quadre\node_modules\eslint\lib\rules\no-unused-vars.js:572:17)
at collectUnusedVariables (F:\github\quadre\node_modules\eslint\lib\rules\no-unused-vars.js:572:17)
at Program:exit (F:\github\quadre\node_modules\eslint\lib\rules\no-unused-vars.js:617:36)
at listeners.(anonymous function).forEach.listener (F:\github\quadre\node_modules\eslint\lib\util\safe-emitter.js:47:58)
at Array.forEach (<anonymous>)
Additional Info
At the moment I cannot update ESLint to version 5.*
See also eslint/typescript-eslint-parser#553
See quadre-code/quadre#103 where I upgraded typescript-eslint-parser, when I got this error.
Trying to use this plugin didn't fix the crash.
To see the error on my project I run grunt eslint --stack --debug.
Versions
package | version |
---|---|
eslint-plugin-typescript |
0.13.0 |
typescript-eslint-parser |
21.0.1 |
typescript |
3.1.6 |
eslint |
4.19.1 |
Metadata
Metadata
Assignees
Labels
No labels