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

Bug 429808

Summary: [eslint] no-dupe-key rule incorrectly flags prototypal key as a dupe
Product: [ECD] Orion Reporter: Michael Rennie <Michael_Rennie>
Component: JS ToolsAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 6.0 M1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Michael Rennie CLA 2014-03-06 13:28:45 EST
Consider the following snippet:

var o  = {
  toString: function() {
    var mine = 4;
  }
}

toString will be flagged as a dupe because of the bogus cache / check for already seen properties - toString is in the prototype and we should be using #hasOwnProperty().