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

Bug 461321

Summary: [eslint] no-shadow-global does not warn about builtins
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: JS ToolsAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Michael_Rennie
Version: 8.0   
Target Milestone: 9.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Mark Macdonald CLA 2015-03-03 10:59:22 EST
The following code does not generate any no-shadow-global warnings:

/*eslint no-unused-vars:0*/
function shadow() { 
    var Math, Object; // shadowing
}

Perhaps it should.
Comment 1 Michael Rennie CLA 2015-03-04 12:14:47 EST
Fix + tests:

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=04868d3ae3d15169e6b0074f7e1251523fb2cc16

while scoping the checks to only check against the environment registered for the source file I clumsily forgot to always include 'builtin'. 

Good catch Mark.