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

Bug 489146

Summary: The quick fix for "no-sparse-array" provides wrong fix
Product: [ECD] Orion Reporter: Troy Tao <troytao>
Component: JS ToolsAssignee: Troy Tao <troytao>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Michael_Rennie
Version: 11.0   
Target Milestone: 12.0   
Hardware: PC   
OS: Windows 7   
See Also: https://git.eclipse.org/r/67904
https://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=bf5420a4f313c2b841c8c912b885c381cb88cbcf
Whiteboard:

Description Troy Tao CLA 2016-03-07 10:31:56 EST
To reproduce this bug, start with:

/*eslint-env node */
var items = [,,];
console.log(items);

after clicking the quick fix:

/*eslint-env node */
var items = [[,,]];
console.log(items);

should be:

/*eslint-env node */
var items = [];
console.log(items);
Comment 1 Eclipse Genie CLA 2016-03-07 10:51:30 EST
New Gerrit change created: https://git.eclipse.org/r/67904
Comment 3 Michael Rennie CLA 2016-03-14 16:39:11 EDT
Thanks for the fix Troy!