Linting scripts may throw the following error and exit:
[...]/node_modules/eslint/lib/rules/no-unused-vars.js:410
if (target.type === "VariableDeclarator") {
^
TypeError: Cannot read property 'type' of undefined
Possible Solution
Pin eslint to 4.13
Steps to Reproduce
Depending on the script, running npm i eslint@4.13.x and then linting should resolve as expected. But, running npm i eslint@4.14.x and then linting may throw the above mentioned error.
BUG REPORT
Expected Behavior
Linting should complete without error.
Actual Behavior
Linting scripts may throw the following error and exit:
Possible Solution
Pin
eslint
to 4.13Steps to Reproduce
Depending on the script, running
npm i eslint@4.13.x
and then linting should resolve as expected. But, runningnpm i eslint@4.14.x
and then linting may throw the above mentioned error.Environment
Node
is: 8.6.0npm
is: 5.3.0