{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/espree/issues/31","labels_url":"https://api.github.com/repos/eslint/espree/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/eslint/espree/issues/31/comments","events_url":"https://api.github.com/repos/eslint/espree/issues/31/events","html_url":"https://github.com/eslint/espree/pull/31","id":53307993,"number":31,"title":"New: Add support for duplicate object literal properties","user":{"login":"FredKSchott","id":622227,"avatar_url":"https://avatars.githubusercontent.com/u/622227?v=3","gravatar_id":"","url":"https://api.github.com/users/FredKSchott","html_url":"https://github.com/FredKSchott","followers_url":"https://api.github.com/users/FredKSchott/followers","following_url":"https://api.github.com/users/FredKSchott/following{/other_user}","gists_url":"https://api.github.com/users/FredKSchott/gists{/gist_id}","starred_url":"https://api.github.com/users/FredKSchott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FredKSchott/subscriptions","organizations_url":"https://api.github.com/users/FredKSchott/orgs","repos_url":"https://api.github.com/users/FredKSchott/repos","events_url":"https://api.github.com/users/FredKSchott/events{/privacy}","received_events_url":"https://api.github.com/users/FredKSchott/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-03T16:15:02Z","updated_at":"2015-01-03T22:47:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/eslint/espree/pulls/31","html_url":"https://github.com/eslint/espree/pull/31","diff_url":"https://github.com/eslint/espree/pull/31.diff","patch_url":"https://github.com/eslint/espree/pull/31.patch"},"body":"- Adds support for duplicate object properties in ES 6 with the `duplicateObjectLiteralProperties` feature. \r\n- Continues to forbid duplicate object literals in strict mode otherwise\r\n- Special rules for the `__proto__` property\r\n\r\nThis feature doesn't exist in esprima-fb yet, so we couldn't use it to help generate tests. Instead all tests were created by this branch and then verified by me. It looks good to me, but a few more pairs of eyes couldn't hurt."},"comment":{"url":"https://api.github.com/repos/eslint/espree/issues/comments/68612705","html_url":"https://github.com/eslint/espree/pull/31#issuecomment-68612705","issue_url":"https://api.github.com/repos/eslint/espree/issues/31","id":68612705,"user":{"login":"FredKSchott","id":622227,"avatar_url":"https://avatars.githubusercontent.com/u/622227?v=3","gravatar_id":"","url":"https://api.github.com/users/FredKSchott","html_url":"https://github.com/FredKSchott","followers_url":"https://api.github.com/users/FredKSchott/followers","following_url":"https://api.github.com/users/FredKSchott/following{/other_user}","gists_url":"https://api.github.com/users/FredKSchott/gists{/gist_id}","starred_url":"https://api.github.com/users/FredKSchott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FredKSchott/subscriptions","organizations_url":"https://api.github.com/users/FredKSchott/orgs","repos_url":"https://api.github.com/users/FredKSchott/repos","events_url":"https://api.github.com/users/FredKSchott/events{/privacy}","received_events_url":"https://api.github.com/users/FredKSchott/received_events","type":"User","site_admin":false},"created_at":"2015-01-03T22:47:42Z","updated_at":"2015-01-03T22:47:42Z","body":"Agreed, tests should be added for different kinds of property names. But I'm not sure if the ES 6 spec matches the behavior you're describing. See: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.__proto__\r\n\r\nFor ***\"\\_\\_proto\\_\\_ Property Names in Object Initializers\"*** it says:\r\n> It is a Syntax Error if PropertyNameList of PropertyDefinitionList contains any duplicate entries for \"\\_\\_proto\\_\\_\" and at least two of those entries were obtained from productions of the form `PropertyName : AssignmentExpression` .\r\n\r\nWhere `PropertyName` can be a `LiteralPropertyName` defined as:\r\n```\r\nPropertyName[Yield,GeneratorParameter] :\r\n  LiteralPropertyName\r\n  [+GeneratorParameter] ComputedPropertyName\r\n  [~GeneratorParameter] ComputedPropertyName[?Yield]\r\n\r\nLiteralPropertyName :\r\n  IdentifierName\r\n  StringLiteral\r\n  NumericLiteral\r\n```\r\n\r\nSo judging by the spec, `__proto__` duplicates will result in a syntax error if duplicates are defined as IdentifierName, StringLiteral, or ComputedPropertyName."}}