TypeError: Cannot read property 'loc' of undefined #1759
Closed
Description
I am using Eslint in webstorm (an IDE) and I get this error.
Eslint works on the js files that contain my node/express code but not on my client side js file
Any idea what is causing this issue or how I could debug it ?
/usr/local/lib/node_modules/eslint/lib/eslint.js:693
location = node.loc.start;
^
TypeError: Cannot read property 'loc' of undefined
at EventEmitter.module.exports.api.report (/usr/local/lib/node_modules/eslint/lib/eslint.js:693:28)
at RuleContext.report (/usr/local/lib/node_modules/eslint/lib/rule-context.js:93:16)
at /usr/local/lib/node_modules/eslint/lib/rules/no-shadow.js:38:25
at Array.forEach (native)
at checkShadowsInScope (/usr/local/lib/node_modules/eslint/lib/rules/no-shadow.js:36:19)
at EventEmitter.checkForShadows (/usr/local/lib/node_modules/eslint/lib/rules/no-shadow.js:54:13)
at EventEmitter.emit (events.js:117:20)
at Controller.controller.traverse.enter (/usr/local/lib/node_modules/eslint/lib/eslint.js:646:25)
at Controller.__execute (/usr/local/lib/node_modules/eslint/node_modules/estraverse/estraverse.js:397:31)
at Controller.traverse (/usr/local/lib/node_modules/eslint/node_modules/estraverse/estraverse.js:495:28)
at EventEmitter.module.exports.api.verify (/usr/local/lib/node_modules/eslint/lib/eslint.js:639:24)
Process finished with exit code 8
Activity