{"action":"created","issue":{"url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/issues/2251","labels_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/issues/2251/labels{/name}","comments_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/issues/2251/comments","events_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/issues/2251/events","html_url":"https://github.com/Zarel/Pokemon-Showdown/pull/2251","id":115495464,"number":2251,"title":"Use strict mode and let and const instead of var","user":{"login":"Joimer","id":3244216,"avatar_url":"https://avatars.githubusercontent.com/u/3244216?v=3","gravatar_id":"","url":"https://api.github.com/users/Joimer","html_url":"https://github.com/Joimer","followers_url":"https://api.github.com/users/Joimer/followers","following_url":"https://api.github.com/users/Joimer/following{/other_user}","gists_url":"https://api.github.com/users/Joimer/gists{/gist_id}","starred_url":"https://api.github.com/users/Joimer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Joimer/subscriptions","organizations_url":"https://api.github.com/users/Joimer/orgs","repos_url":"https://api.github.com/users/Joimer/repos","events_url":"https://api.github.com/users/Joimer/events{/privacy}","received_events_url":"https://api.github.com/users/Joimer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-11-06T12:24:07Z","updated_at":"2015-11-07T02:01:21Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/pulls/2251","html_url":"https://github.com/Zarel/Pokemon-Showdown/pull/2251","diff_url":"https://github.com/Zarel/Pokemon-Showdown/pull/2251.diff","patch_url":"https://github.com/Zarel/Pokemon-Showdown/pull/2251.patch"},"body":"This commit also fixes some duplicated variable declarations.\r\nIt also removes the slow let hack for jshint.\r\n\r\nTested with iojs 2.3.3, node 4.1.0 and node 5.0.0.\r\n\r\nIt's about time we start running on strict mode, using let and const instead of var, declaring variables outside of switches, and overall moving to a better syntax."},"comment":{"url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/issues/comments/154597614","html_url":"https://github.com/Zarel/Pokemon-Showdown/pull/2251#issuecomment-154597614","issue_url":"https://api.github.com/repos/Zarel/Pokemon-Showdown/issues/2251","id":154597614,"user":{"login":"Slayer95","id":4925744,"avatar_url":"https://avatars.githubusercontent.com/u/4925744?v=3","gravatar_id":"","url":"https://api.github.com/users/Slayer95","html_url":"https://github.com/Slayer95","followers_url":"https://api.github.com/users/Slayer95/followers","following_url":"https://api.github.com/users/Slayer95/following{/other_user}","gists_url":"https://api.github.com/users/Slayer95/gists{/gist_id}","starred_url":"https://api.github.com/users/Slayer95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Slayer95/subscriptions","organizations_url":"https://api.github.com/users/Slayer95/orgs","repos_url":"https://api.github.com/users/Slayer95/repos","events_url":"https://api.github.com/users/Slayer95/events{/privacy}","received_events_url":"https://api.github.com/users/Slayer95/received_events","type":"User","site_admin":false},"created_at":"2015-11-07T02:01:21Z","updated_at":"2015-11-07T02:01:21Z","body":"This is hurting readibility in some cases... See e.g.\r\nhttps://github.com/Joimer/Pokemon-Showdown/blob/use-let/data/scripts.js#L1178-L1182\r\nhttps://github.com/Joimer/Pokemon-Showdown/blob/use-let/battle-engine.js#L3884-L3890"}}