This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 461321 - [eslint] no-shadow-global does not warn about builtins
Summary: [eslint] no-shadow-global does not warn about builtins
Status: RESOLVED FIXED
Alias: None
Product: Orion (Archived)
Classification: ECD
Component: JS Tools (show other bugs)
Version: 8.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 9.0   Edit
Assignee: Michael Rennie CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-03 10:59 EST by Mark Macdonald CLA
Modified: 2015-03-04 12:14 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.