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

Bug 495744

Summary: [eslint][es6] Variable 'undefined' shadows a global member
Product: [ECD] Orion Reporter: Muhammad Mousa <mmousa>
Component: JS ToolsAssignee: Olivier Thomann <Olivier_Thomann>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: curtis.windatt.public, Michael_Rennie, Olivier_Thomann
Version: 12.0Flags: Michael_Rennie: review+
Target Milestone: 12.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Muhammad Mousa CLA 2016-06-08 15:21:08 EDT
Examples of ES6 features that cause the warning "Variable 'undefined' shadows a global member." to be thrown:

// list matching
var [r, , s] = [1,2,3];

// object matching
var { letter: name } = { letter: "b" };

// object matching shorthand
// binds `op`, `lhs` and `rhs` in scope
var {op, lhs, rhs} = () => {};

// Fail-soft destructuring
var [f] = [];

// Fail-soft destructuring with defaults
var [q = 1] = [];
Comment 1 Olivier Thomann CLA 2016-06-08 15:39:24 EDT
Should be easy to fix.
Comment 2 Olivier Thomann CLA 2016-06-09 15:39:16 EDT
Same kind of issues arise with the 'variable is not read' error. Will fix all in the same fix.
Comment 3 Olivier Thomann CLA 2016-06-10 13:20:34 EDT
Fixed as commit 9f82e99e74e1f09ede38b0f93c00b39bf8a51604.