Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.19.1 - Cannot read property 'value' of null #1559

Closed
Alex-Verevkine opened this issue Dec 9, 2019 · 11 comments
Closed

2.19.1 - Cannot read property 'value' of null #1559

Alex-Verevkine opened this issue Dec 9, 2019 · 11 comments

Comments

@Alex-Verevkine
Copy link

Description

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)

@ljharb
Copy link
Member

ljharb commented Dec 9, 2019

Any idea what code this is warning on?

@ljharb
Copy link
Member

ljharb commented Dec 9, 2019

#1049 / cc @marcusdarmstrong
#1436 / cc @schmidsi

@marcusdarmstrong
Copy link

Assuredly my changes. I'll have a PR up momentarily.

@marcusdarmstrong
Copy link

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.

@ljharb
Copy link
Member

ljharb commented Dec 9, 2019

@marcusdarmstrong in one of the 4 visitors yes - but it's still causing issues, hence this OP :-)

@ljharb
Copy link
Member

ljharb commented Dec 9, 2019

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.

@marcusdarmstrong
Copy link

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

@ljharb
Copy link
Member

ljharb commented Dec 9, 2019

I added a test case here that covers the fix here, but that's included in v2.19.1, and this issue is happening in v2.19.1 :-/

@marcusdarmstrong
Copy link

Can't say I can really see a codepath for that—the dereference is immediately following the check. Do we have a reproduction on 2.19.1?

@marcusdarmstrong
Copy link

Indeed, eslint-plugin-import/lib/rules/no-extraneous-dependencies.js:210 in the release version of 2.19.1 corresponds to the if statement—Whereas it would refer to the rereference in 2.19.0. So I'd expect this is a misreporting on the version?

@ljharb
Copy link
Member

ljharb commented Dec 9, 2019

@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.

@ljharb ljharb closed this as completed Dec 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants