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

Bug 489155

Summary: [eslint] Using /* eslint-disable */ does not prevent unnecessary-nls warnings
Product: [ECD] Orion Reporter: Michael Rennie <Michael_Rennie>
Component: JS ToolsAssignee: Curtis Windatt <curtis.windatt.public>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: curtis.windatt.public, Olivier_Thomann
Version: 11.0   
Target Milestone: 12.0   
Hardware: All   
OS: All   
Whiteboard:

Description Michael Rennie CLA 2016-03-07 12:17:02 EST
Steps:

1. Open your favorite JS file that has unnecessary NLS comments in it (I used globalCommands.js)
2. add /* eslint-disable */ at the top of the file and save.
3. watch as all other lint problems go away, except for unnecessary-nls ones.
Comment 1 Curtis Windatt CLA 2016-03-07 15:29:59 EST
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=6eccab26f440321a8fa7d00e4211ee749962aad1
Fix with tests

We don't have a proper AST node for the annotation because it is a substring of a comment.  So we fake the contents of a node.  The fake node didn't include the line/col, only range.  We use range in our tooling, but ESLint uses line/col for the inline eslint-disable comments.