{"action":"created","comment":{"url":"https://api.github.com/repos/airbnb/javascript/pulls/comments/51659142","id":51659142,"diff_hunk":"@@ -1237,6 +1237,48 @@ Other Style Guides\n \n   - [15.4](#15.4) <a name='15.4'></a> For more information see [Truth Equality and JavaScript](http://javascriptweblog.wordpress.com/2011/02/07/truth-equality-and-javascript/#more-2108) by Angus Croll.\n \n+  - [15.5](#15.5) <a name='16.1'></a> Avoid lexical declarations (e.g. `let`, `const`, `function`, and `class`) in `case` and `default` clauses.","path":"README.md","position":4,"original_position":4,"commit_id":"310e6c0d4e9d86a7b97eeb23f63e97959ba0df39","original_commit_id":"310e6c0d4e9d86a7b97eeb23f63e97959ba0df39","user":{"login":"lencioni","id":195534,"avatar_url":"https://avatars.githubusercontent.com/u/195534?v=3","gravatar_id":"","url":"https://api.github.com/users/lencioni","html_url":"https://github.com/lencioni","followers_url":"https://api.github.com/users/lencioni/followers","following_url":"https://api.github.com/users/lencioni/following{/other_user}","gists_url":"https://api.github.com/users/lencioni/gists{/gist_id}","starred_url":"https://api.github.com/users/lencioni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lencioni/subscriptions","organizations_url":"https://api.github.com/users/lencioni/orgs","repos_url":"https://api.github.com/users/lencioni/repos","events_url":"https://api.github.com/users/lencioni/events{/privacy}","received_events_url":"https://api.github.com/users/lencioni/received_events","type":"User","site_admin":false},"body":"I pushed a new revision that addresses both of these comments.","created_at":"2016-02-03T00:10:00Z","updated_at":"2016-02-03T00:10:00Z","html_url":"https://github.com/airbnb/javascript/pull/712#discussion_r51659142","pull_request_url":"https://api.github.com/repos/airbnb/javascript/pulls/712","_links":{"self":{"href":"https://api.github.com/repos/airbnb/javascript/pulls/comments/51659142"},"html":{"href":"https://github.com/airbnb/javascript/pull/712#discussion_r51659142"},"pull_request":{"href":"https://api.github.com/repos/airbnb/javascript/pulls/712"}}},"pull_request":{"url":"https://api.github.com/repos/airbnb/javascript/pulls/712","id":58068538,"html_url":"https://github.com/airbnb/javascript/pull/712","diff_url":"https://github.com/airbnb/javascript/pull/712.diff","patch_url":"https://github.com/airbnb/javascript/pull/712.patch","issue_url":"https://api.github.com/repos/airbnb/javascript/issues/712","number":712,"state":"open","locked":false,"title":"Avoid lexical declarations in case/default clauses","user":{"login":"lencioni","id":195534,"avatar_url":"https://avatars.githubusercontent.com/u/195534?v=3","gravatar_id":"","url":"https://api.github.com/users/lencioni","html_url":"https://github.com/lencioni","followers_url":"https://api.github.com/users/lencioni/followers","following_url":"https://api.github.com/users/lencioni/following{/other_user}","gists_url":"https://api.github.com/users/lencioni/gists{/gist_id}","starred_url":"https://api.github.com/users/lencioni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lencioni/subscriptions","organizations_url":"https://api.github.com/users/lencioni/orgs","repos_url":"https://api.github.com/users/lencioni/repos","events_url":"https://api.github.com/users/lencioni/events{/privacy}","received_events_url":"https://api.github.com/users/lencioni/received_events","type":"User","site_admin":false},"body":"This commit adds guidance warning people to avoid lexical declarations\r\nin case/default clauses and enables the corresponding ESLint rule.\r\n\r\n  http://eslint.org/docs/rules/no-case-declarations.html\r\n\r\nWe didn't have a section on switch statements yet, so I thought about\r\nstarting one. It seemed like it would best fit between section 15\r\n(Comparison Operators & Equality) and section 16 (Blocks), but I didn't\r\nwant to mess up all of the following numberings, since people probably\r\nhave references to them. I considered adding this near the end to\r\nminimize this effect, but it really seemed to belong near these other\r\nthings. I landed on appending it to Section 15 (Comparison Operators &\r\nEquality) and I think it sorta fits there since switch statements are a\r\nrelated concept.","created_at":"2016-02-02T23:34:30Z","updated_at":"2016-02-03T00:10:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/airbnb/javascript/pulls/712/commits","review_comments_url":"https://api.github.com/repos/airbnb/javascript/pulls/712/comments","review_comment_url":"https://api.github.com/repos/airbnb/javascript/pulls/comments{/number}","comments_url":"https://api.github.com/repos/airbnb/javascript/issues/712/comments","statuses_url":"https://api.github.com/repos/airbnb/javascript/statuses/310e6c0d4e9d86a7b97eeb23f63e97959ba0df39","head":{"label":"lencioni:no-case-declarations","ref":"no-case-declarations","sha":"310e6c0d4e9d86a7b97eeb23f63e97959ba0df39","user":{"login":"lencioni","id":195534,"avatar_url":"https://avatars.githubusercontent.com/u/195534?v=3","gravatar_id":"","url":"https://api.github.com/users/lencioni","html_url":"https://github.com/lencioni","followers_url":"https://api.github.com/users/lencioni/followers","following_url":"https://api.github.com/users/lencioni/following{/other_user}","gists_url":"https://api.github.com/users/lencioni/gists{/gist_id}","starred_url":"https://api.github.com/users/lencioni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lencioni/subscriptions","organizations_url":"https://api.github.com/users/lencioni/orgs","repos_url":"https://api.github.com/users/lencioni/repos","events_url":"https://api.github.com/users/lencioni/events{/privacy}","received_events_url":"https://api.github.com/users/lencioni/received_events","type":"User","site_admin":false},"repo":{"id":48450471,"name":"javascript","full_name":"lencioni/javascript","owner":{"login":"lencioni","id":195534,"avatar_url":"https://avatars.githubusercontent.com/u/195534?v=3","gravatar_id":"","url":"https://api.github.com/users/lencioni","html_url":"https://github.com/lencioni","followers_url":"https://api.github.com/users/lencioni/followers","following_url":"https://api.github.com/users/lencioni/following{/other_user}","gists_url":"https://api.github.com/users/lencioni/gists{/gist_id}","starred_url":"https://api.github.com/users/lencioni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lencioni/subscriptions","organizations_url":"https://api.github.com/users/lencioni/orgs","repos_url":"https://api.github.com/users/lencioni/repos","events_url":"https://api.github.com/users/lencioni/events{/privacy}","received_events_url":"https://api.github.com/users/lencioni/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lencioni/javascript","description":"JavaScript Style Guide","fork":true,"url":"https://api.github.com/repos/lencioni/javascript","forks_url":"https://api.github.com/repos/lencioni/javascript/forks","keys_url":"https://api.github.com/repos/lencioni/javascript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lencioni/javascript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lencioni/javascript/teams","hooks_url":"https://api.github.com/repos/lencioni/javascript/hooks","issue_events_url":"https://api.github.com/repos/lencioni/javascript/issues/events{/number}","events_url":"https://api.github.com/repos/lencioni/javascript/events","assignees_url":"https://api.github.com/repos/lencioni/javascript/assignees{/user}","branches_url":"https://api.github.com/repos/lencioni/javascript/branches{/branch}","tags_url":"https://api.github.com/repos/lencioni/javascript/tags","blobs_url":"https://api.github.com/repos/lencioni/javascript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lencioni/javascript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lencioni/javascript/git/refs{/sha}","trees_url":"https://api.github.com/repos/lencioni/javascript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lencioni/javascript/statuses/{sha}","languages_url":"https://api.github.com/repos/lencioni/javascript/languages","stargazers_url":"https://api.github.com/repos/lencioni/javascript/stargazers","contributors_url":"https://api.github.com/repos/lencioni/javascript/contributors","subscribers_url":"https://api.github.com/repos/lencioni/javascript/subscribers","subscription_url":"https://api.github.com/repos/lencioni/javascript/subscription","commits_url":"https://api.github.com/repos/lencioni/javascript/commits{/sha}","git_commits_url":"https://api.github.com/repos/lencioni/javascript/git/commits{/sha}","comments_url":"https://api.github.com/repos/lencioni/javascript/comments{/number}","issue_comment_url":"https://api.github.com/repos/lencioni/javascript/issues/comments{/number}","contents_url":"https://api.github.com/repos/lencioni/javascript/contents/{+path}","compare_url":"https://api.github.com/repos/lencioni/javascript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lencioni/javascript/merges","archive_url":"https://api.github.com/repos/lencioni/javascript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lencioni/javascript/downloads","issues_url":"https://api.github.com/repos/lencioni/javascript/issues{/number}","pulls_url":"https://api.github.com/repos/lencioni/javascript/pulls{/number}","milestones_url":"https://api.github.com/repos/lencioni/javascript/milestones{/number}","notifications_url":"https://api.github.com/repos/lencioni/javascript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lencioni/javascript/labels{/name}","releases_url":"https://api.github.com/repos/lencioni/javascript/releases{/id}","deployments_url":"https://api.github.com/repos/lencioni/javascript/deployments","created_at":"2015-12-22T19:40:29Z","updated_at":"2015-12-22T19:40:30Z","pushed_at":"2016-02-02T23:33:57Z","git_url":"git://github.com/lencioni/javascript.git","ssh_url":"git@github.com:lencioni/javascript.git","clone_url":"https://github.com/lencioni/javascript.git","svn_url":"https://github.com/lencioni/javascript","homepage":null,"size":1035,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"airbnb:master","ref":"master","sha":"206e13b1855647c7c66e0a3809f5a8a0b93e54f1","user":{"login":"airbnb","id":698437,"avatar_url":"https://avatars.githubusercontent.com/u/698437?v=3","gravatar_id":"","url":"https://api.github.com/users/airbnb","html_url":"https://github.com/airbnb","followers_url":"https://api.github.com/users/airbnb/followers","following_url":"https://api.github.com/users/airbnb/following{/other_user}","gists_url":"https://api.github.com/users/airbnb/gists{/gist_id}","starred_url":"https://api.github.com/users/airbnb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airbnb/subscriptions","organizations_url":"https://api.github.com/users/airbnb/orgs","repos_url":"https://api.github.com/users/airbnb/repos","events_url":"https://api.github.com/users/airbnb/events{/privacy}","received_events_url":"https://api.github.com/users/airbnb/received_events","type":"Organization","site_admin":false},"repo":{"id":6498492,"name":"javascript","full_name":"airbnb/javascript","owner":{"login":"airbnb","id":698437,"avatar_url":"https://avatars.githubusercontent.com/u/698437?v=3","gravatar_id":"","url":"https://api.github.com/users/airbnb","html_url":"https://github.com/airbnb","followers_url":"https://api.github.com/users/airbnb/followers","following_url":"https://api.github.com/users/airbnb/following{/other_user}","gists_url":"https://api.github.com/users/airbnb/gists{/gist_id}","starred_url":"https://api.github.com/users/airbnb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airbnb/subscriptions","organizations_url":"https://api.github.com/users/airbnb/orgs","repos_url":"https://api.github.com/users/airbnb/repos","events_url":"https://api.github.com/users/airbnb/events{/privacy}","received_events_url":"https://api.github.com/users/airbnb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/airbnb/javascript","description":"JavaScript Style Guide","fork":false,"url":"https://api.github.com/repos/airbnb/javascript","forks_url":"https://api.github.com/repos/airbnb/javascript/forks","keys_url":"https://api.github.com/repos/airbnb/javascript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/airbnb/javascript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/airbnb/javascript/teams","hooks_url":"https://api.github.com/repos/airbnb/javascript/hooks","issue_events_url":"https://api.github.com/repos/airbnb/javascript/issues/events{/number}","events_url":"https://api.github.com/repos/airbnb/javascript/events","assignees_url":"https://api.github.com/repos/airbnb/javascript/assignees{/user}","branches_url":"https://api.github.com/repos/airbnb/javascript/branches{/branch}","tags_url":"https://api.github.com/repos/airbnb/javascript/tags","blobs_url":"https://api.github.com/repos/airbnb/javascript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/airbnb/javascript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/airbnb/javascript/git/refs{/sha}","trees_url":"https://api.github.com/repos/airbnb/javascript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/airbnb/javascript/statuses/{sha}","languages_url":"https://api.github.com/repos/airbnb/javascript/languages","stargazers_url":"https://api.github.com/repos/airbnb/javascript/stargazers","contributors_url":"https://api.github.com/repos/airbnb/javascript/contributors","subscribers_url":"https://api.github.com/repos/airbnb/javascript/subscribers","subscription_url":"https://api.github.com/repos/airbnb/javascript/subscription","commits_url":"https://api.github.com/repos/airbnb/javascript/commits{/sha}","git_commits_url":"https://api.github.com/repos/airbnb/javascript/git/commits{/sha}","comments_url":"https://api.github.com/repos/airbnb/javascript/comments{/number}","issue_comment_url":"https://api.github.com/repos/airbnb/javascript/issues/comments{/number}","contents_url":"https://api.github.com/repos/airbnb/javascript/contents/{+path}","compare_url":"https://api.github.com/repos/airbnb/javascript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/airbnb/javascript/merges","archive_url":"https://api.github.com/repos/airbnb/javascript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/airbnb/javascript/downloads","issues_url":"https://api.github.com/repos/airbnb/javascript/issues{/number}","pulls_url":"https://api.github.com/repos/airbnb/javascript/pulls{/number}","milestones_url":"https://api.github.com/repos/airbnb/javascript/milestones{/number}","notifications_url":"https://api.github.com/repos/airbnb/javascript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/airbnb/javascript/labels{/name}","releases_url":"https://api.github.com/repos/airbnb/javascript/releases{/id}","deployments_url":"https://api.github.com/repos/airbnb/javascript/deployments","created_at":"2012-11-01T23:13:50Z","updated_at":"2016-02-03T00:07:45Z","pushed_at":"2016-02-02T23:34:30Z","git_url":"git://github.com/airbnb/javascript.git","ssh_url":"git@github.com:airbnb/javascript.git","clone_url":"https://github.com/airbnb/javascript.git","svn_url":"https://github.com/airbnb/javascript","homepage":null,"size":2381,"stargazers_count":29418,"watchers_count":29418,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5490,"mirror_url":null,"open_issues_count":61,"forks":5490,"open_issues":61,"watchers":29418,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/airbnb/javascript/pulls/712"},"html":{"href":"https://github.com/airbnb/javascript/pull/712"},"issue":{"href":"https://api.github.com/repos/airbnb/javascript/issues/712"},"comments":{"href":"https://api.github.com/repos/airbnb/javascript/issues/712/comments"},"review_comments":{"href":"https://api.github.com/repos/airbnb/javascript/pulls/712/comments"},"review_comment":{"href":"https://api.github.com/repos/airbnb/javascript/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/airbnb/javascript/pulls/712/commits"},"statuses":{"href":"https://api.github.com/repos/airbnb/javascript/statuses/310e6c0d4e9d86a7b97eeb23f63e97959ba0df39"}}}}