{"action":"created","issue":{"url":"https://api.github.com/repos/airbnb/javascript/issues/898","repository_url":"https://api.github.com/repos/airbnb/javascript","labels_url":"https://api.github.com/repos/airbnb/javascript/issues/898/labels{/name}","comments_url":"https://api.github.com/repos/airbnb/javascript/issues/898/comments","events_url":"https://api.github.com/repos/airbnb/javascript/issues/898/events","html_url":"https://github.com/airbnb/javascript/issues/898","id":157547397,"number":898,"title":"How to avoid no-param-reassign?","user":{"login":"icetbr","id":1111617,"avatar_url":"https://avatars.githubusercontent.com/u/1111617?v=3","gravatar_id":"","url":"https://api.github.com/users/icetbr","html_url":"https://github.com/icetbr","followers_url":"https://api.github.com/users/icetbr/followers","following_url":"https://api.github.com/users/icetbr/following{/other_user}","gists_url":"https://api.github.com/users/icetbr/gists{/gist_id}","starred_url":"https://api.github.com/users/icetbr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icetbr/subscriptions","organizations_url":"https://api.github.com/users/icetbr/orgs","repos_url":"https://api.github.com/users/icetbr/repos","events_url":"https://api.github.com/users/icetbr/events{/privacy}","received_events_url":"https://api.github.com/users/icetbr/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/airbnb/javascript/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-05-30T19:23:48Z","updated_at":"2016-05-30T20:16:31Z","closed_at":null,"body":"Hi, could I get some directions in the following scenarios? Reading similar questions, I don't get how copying the properties to a new object (Object.assign) is appropriate.\r\n\r\n```\r\nusers.forEach(user => {\r\n      if (user.age > 21) {\r\n        user.canDrink = true;\r\n      }\r\n});\r\n\r\ndecks.forEach(deck => {\r\n      deck.cards = utils.sort(deck.cards, myArrayWithCustomSortingRules);\r\n});\r\n```\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/airbnb/javascript/issues/comments/222549491","html_url":"https://github.com/airbnb/javascript/issues/898#issuecomment-222549491","issue_url":"https://api.github.com/repos/airbnb/javascript/issues/898","id":222549491,"user":{"login":"ljharb","id":45469,"avatar_url":"https://avatars.githubusercontent.com/u/45469?v=3","gravatar_id":"","url":"https://api.github.com/users/ljharb","html_url":"https://github.com/ljharb","followers_url":"https://api.github.com/users/ljharb/followers","following_url":"https://api.github.com/users/ljharb/following{/other_user}","gists_url":"https://api.github.com/users/ljharb/gists{/gist_id}","starred_url":"https://api.github.com/users/ljharb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ljharb/subscriptions","organizations_url":"https://api.github.com/users/ljharb/orgs","repos_url":"https://api.github.com/users/ljharb/repos","events_url":"https://api.github.com/users/ljharb/events{/privacy}","received_events_url":"https://api.github.com/users/ljharb/received_events","type":"User","site_admin":false},"created_at":"2016-05-30T20:16:31Z","updated_at":"2016-05-30T20:16:31Z","body":"Oh, oops - the first argument to those `Object.assign`'s should be an empty object `{}` :-) that is what avoids the mutation."}}
{"actor":{"display_login":"ljharb"}}