eslint broken after update
But it works with the older version 2.18.2.
Cannot read property 'value' of null
TypeError: Cannot read property 'value' of null
at ExportNamedDeclaration (/node_modules/eslint-plugin-import/lib/rules/no-extraneous-dependencies.js:210:71)
at listeners.(anonymous function).forEach.listener (/node_modules/eslint/lib/util/safe-emitter.js:47:58)
at Array.forEach (<anonymous>)
at Object.emit (/node_modules/eslint/lib/util/safe-emitter.js:47:38)
at NodeEventGenerator.applySelector (/node_modules/eslint/lib/util/node-event-generator.js:251:26)
at NodeEventGenerator.applySelectors (/node_modules/eslint/lib/util/node-event-generator.js:280:22)
at NodeEventGenerator.enterNode (/node_modules/eslint/lib/util/node-event-generator.js:294:14)
at CodePathAnalyzer.enterNode (/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:608:23)
at Traverser.enter [as _enter] (/node_modules/eslint/lib/linter.js:865:28)
at Traverser._traverse (/node_modules/eslint/lib/util/traverser.js:132:14)
Any idea what code this is warning on?
Assuredly my changes. I'll have a PR up momentarily.
Oh, I'm sorry, I was totally out of the loop here: Seems like you already fixed my awfully broken assumption in 2.19.1.
@marcusdarmstrong in one of the 4 visitors yes - but it's still causing issues, hence this OP :-)
Basically, the same fix probably needs to go on all 4, but I want a failing test case that covers all bugfixes first, and that's what I'm hoping you can help with.
Happy to add a testcase for the ExportNamedDeclaration case, but the others should be safe, per spec, as it's the only node type of the four with a nullable source: https://github.com/estree/estree/blob/master/es2015.md#exportnameddeclaration
Can't say I can really see a codepath for that鈥攖he dereference is immediately following the check. Do we have a reproduction on 2.19.1?
Indeed, eslint-plugin-import/lib/rules/no-extraneous-dependencies.js:210 in the release version of 2.19.1 corresponds to the if statement鈥擶hereas it would refer to the rereference in 2.19.0. So I'd expect this is a misreporting on the version?
@Alex-Verevkine can you confirm that you're using v2.19.0, or v2.19.1? Closing for now, but will reopen if v2.19.1 is confirmed.