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

Bug 485232

Summary: Need to improve error reporting when eslint directive is defined with a wrong format
Product: [ECD] Orion Reporter: Olivier Thomann <Olivier_Thomann>
Component: JS ToolsAssignee: Olivier Thomann <Olivier_Thomann>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: curtis.windatt.public, Michael_Rennie
Version: 10.0   
Target Milestone: 11.0   
Hardware: PC   
OS: Windows 7   
See Also: https://git.eclipse.org/r/63587
https://git.eclipse.org/r/63588
https://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=bd4695f07930f07678709f8a9b1f9f60a176deb6
Whiteboard:

Description Olivier Thomann CLA 2016-01-05 15:13:52 EST
In your source file, you can define an eslint directive using:
/* eslint .... */
What comes after "eslint" is expected to be proper JSON.

In the file inlineSearchResultExplorer.js, there is the current line:
/*eslint forin:true regexp:false sub:true*/

And we report that range is not a known property of undefined at the first line of the file.
Comment 1 Eclipse Genie CLA 2016-01-05 15:17:06 EST
New Gerrit change created: https://git.eclipse.org/r/63587
Comment 2 Olivier Thomann CLA 2016-01-05 15:18:24 EST
Just to be clear, eslint expects a problem to be reported. We just did a poor job at reporting the actual problem on the right line.
Comment 3 Eclipse Genie CLA 2016-01-05 15:38:58 EST
New Gerrit change created: https://git.eclipse.org/r/63588
Comment 5 Michael Rennie CLA 2016-01-05 16:30:56 EST
Merged. Thanks Olivier!