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

Bug 429720

Summary: [eslint] Unexpected warning on last key in return statement 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-05 20:55:20 EST
Looks like a problem with the new rule from bug 428430.

Consider the snippet:

function test() {
	return {
		'one' : 1,
		'two' : 2
	}
}

'two' is flagged with the warning 'Duplicate object key 'undefined''
Comment 1 Michael Rennie CLA 2014-03-05 21:09:36 EST
That would be because I (foolishly) forgot that object properties that are literals do not have a name for their key, but instead have a value.

Pushed fix + additional tests to: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=ee59fcfc3c2814910d824b2b10bcbf8b3895eba8