Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 495169

Summary: [eslint] Exception linting import statement
Product: [ECD] Orion Reporter: Michael Rennie <Michael_Rennie>
Component: JS ToolsAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 12.0   
Target Milestone: 12.0   
Hardware: PC   
OS: Mac OS X   
Whiteboard:

Description Michael Rennie CLA 2016-06-01 09:54:27 EDT
Consider the following snippet:

// Common import syntax
import * as myModule from "./exports";

In a default project setup, you get the warning that sourceType is not 'module' (good) and one that reads:

"ESLint failed to validate this file because an error occurred: Cannot read property 'name' of undefined"
Comment 1 Michael Rennie CLA 2016-06-01 13:28:57 EDT
Fix + tests:

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=53783a5a644098f6ce2abcc3f0e3c2a441c3b619

The problem was that the linting rule had not been updated to handle import statements (which do not have id nodes).