{"action":"closed","number":8714,"pull_request":{"url":"https://api.github.com/repos/eslint/eslint/pulls/8714","id":125143328,"html_url":"https://github.com/eslint/eslint/pull/8714","diff_url":"https://github.com/eslint/eslint/pull/8714.diff","patch_url":"https://github.com/eslint/eslint/pull/8714.patch","issue_url":"https://api.github.com/repos/eslint/eslint/issues/8714","number":8714,"state":"closed","locked":false,"title":"Chore: indent bug proof to allow block relative disable [regression]","user":{"login":"Slamdunk","id":152236,"avatar_url":"https://avatars3.githubusercontent.com/u/152236?v=3","gravatar_id":"","url":"https://api.github.com/users/Slamdunk","html_url":"https://github.com/Slamdunk","followers_url":"https://api.github.com/users/Slamdunk/followers","following_url":"https://api.github.com/users/Slamdunk/following{/other_user}","gists_url":"https://api.github.com/users/Slamdunk/gists{/gist_id}","starred_url":"https://api.github.com/users/Slamdunk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Slamdunk/subscriptions","organizations_url":"https://api.github.com/users/Slamdunk/orgs","repos_url":"https://api.github.com/users/Slamdunk/repos","events_url":"https://api.github.com/users/Slamdunk/events{/privacy}","received_events_url":"https://api.github.com/users/Slamdunk/received_events","type":"User","site_admin":false},"body":"**What is the purpose of this pull request? (put an \"X\" next to item)**\r\n\r\n[X] Other, please explain: bug proof\r\n\r\n**What changes did you make? (Give an overview)**\r\n\r\nThis is a bug proof, I added the same test to both `indent-legacy` and `indent` to prove a regression was done on v4.0.0.\r\n\r\nThe build *intentionally* fails.\r\n\r\nI have no idea on how to fix this bug, but hope the tests are clear enough for you to understand the issue.\r\n\r\n**Is there anything you'd like reviewers to focus on?**\r\n\r\nWhen writing for example a jQuery plugin it is common to wrap everything around a lambda. It is handy to **relativly** disable indentation check for the main inside block, in order to reduce indentation overhead:\r\n```js\r\n(function($){\r\n// eslint-disable-next-line indent\r\n$(function(){\r\n  var a = 1;\r\n  function test() {\r\n    var b = 2;\r\n  }\r\n});\r\n})(jQuery);\r\n```\r\nHere you can see that indentation check is mandatory and useful for internal code, but for the main `$(function(){});` it would just add 2 spaces everywere without benefits.\r\n\r\nThis behaviour was present in `indent-legacy`, but missing in new v4 `indent`","created_at":"2017-06-12T14:00:06Z","updated_at":"2017-06-15T06:52:34Z","closed_at":"2017-06-15T06:52:33Z","merged_at":null,"merge_commit_sha":"2407e73ae24aa08d27a72c949878abd6a16e9dc2","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/eslint/eslint/pulls/8714/commits","review_comments_url":"https://api.github.com/repos/eslint/eslint/pulls/8714/comments","review_comment_url":"https://api.github.com/repos/eslint/eslint/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/8714/comments","statuses_url":"https://api.github.com/repos/eslint/eslint/statuses/5111bcb0462f737b7d03f98ba34bc4b9d9038adf","head":{"label":"Slamdunk:indent_disable","ref":"indent_disable","sha":"5111bcb0462f737b7d03f98ba34bc4b9d9038adf","user":{"login":"Slamdunk","id":152236,"avatar_url":"https://avatars3.githubusercontent.com/u/152236?v=3","gravatar_id":"","url":"https://api.github.com/users/Slamdunk","html_url":"https://github.com/Slamdunk","followers_url":"https://api.github.com/users/Slamdunk/followers","following_url":"https://api.github.com/users/Slamdunk/following{/other_user}","gists_url":"https://api.github.com/users/Slamdunk/gists{/gist_id}","starred_url":"https://api.github.com/users/Slamdunk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Slamdunk/subscriptions","organizations_url":"https://api.github.com/users/Slamdunk/orgs","repos_url":"https://api.github.com/users/Slamdunk/repos","events_url":"https://api.github.com/users/Slamdunk/events{/privacy}","received_events_url":"https://api.github.com/users/Slamdunk/received_events","type":"User","site_admin":false},"repo":{"id":94094203,"name":"eslint","full_name":"Slamdunk/eslint","owner":{"login":"Slamdunk","id":152236,"avatar_url":"https://avatars3.githubusercontent.com/u/152236?v=3","gravatar_id":"","url":"https://api.github.com/users/Slamdunk","html_url":"https://github.com/Slamdunk","followers_url":"https://api.github.com/users/Slamdunk/followers","following_url":"https://api.github.com/users/Slamdunk/following{/other_user}","gists_url":"https://api.github.com/users/Slamdunk/gists{/gist_id}","starred_url":"https://api.github.com/users/Slamdunk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Slamdunk/subscriptions","organizations_url":"https://api.github.com/users/Slamdunk/orgs","repos_url":"https://api.github.com/users/Slamdunk/repos","events_url":"https://api.github.com/users/Slamdunk/events{/privacy}","received_events_url":"https://api.github.com/users/Slamdunk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Slamdunk/eslint","description":"A fully pluggable tool for identifying and reporting on patterns in JavaScript.","fork":true,"url":"https://api.github.com/repos/Slamdunk/eslint","forks_url":"https://api.github.com/repos/Slamdunk/eslint/forks","keys_url":"https://api.github.com/repos/Slamdunk/eslint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Slamdunk/eslint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Slamdunk/eslint/teams","hooks_url":"https://api.github.com/repos/Slamdunk/eslint/hooks","issue_events_url":"https://api.github.com/repos/Slamdunk/eslint/issues/events{/number}","events_url":"https://api.github.com/repos/Slamdunk/eslint/events","assignees_url":"https://api.github.com/repos/Slamdunk/eslint/assignees{/user}","branches_url":"https://api.github.com/repos/Slamdunk/eslint/branches{/branch}","tags_url":"https://api.github.com/repos/Slamdunk/eslint/tags","blobs_url":"https://api.github.com/repos/Slamdunk/eslint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Slamdunk/eslint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Slamdunk/eslint/git/refs{/sha}","trees_url":"https://api.github.com/repos/Slamdunk/eslint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Slamdunk/eslint/statuses/{sha}","languages_url":"https://api.github.com/repos/Slamdunk/eslint/languages","stargazers_url":"https://api.github.com/repos/Slamdunk/eslint/stargazers","contributors_url":"https://api.github.com/repos/Slamdunk/eslint/contributors","subscribers_url":"https://api.github.com/repos/Slamdunk/eslint/subscribers","subscription_url":"https://api.github.com/repos/Slamdunk/eslint/subscription","commits_url":"https://api.github.com/repos/Slamdunk/eslint/commits{/sha}","git_commits_url":"https://api.github.com/repos/Slamdunk/eslint/git/commits{/sha}","comments_url":"https://api.github.com/repos/Slamdunk/eslint/comments{/number}","issue_comment_url":"https://api.github.com/repos/Slamdunk/eslint/issues/comments{/number}","contents_url":"https://api.github.com/repos/Slamdunk/eslint/contents/{+path}","compare_url":"https://api.github.com/repos/Slamdunk/eslint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Slamdunk/eslint/merges","archive_url":"https://api.github.com/repos/Slamdunk/eslint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Slamdunk/eslint/downloads","issues_url":"https://api.github.com/repos/Slamdunk/eslint/issues{/number}","pulls_url":"https://api.github.com/repos/Slamdunk/eslint/pulls{/number}","milestones_url":"https://api.github.com/repos/Slamdunk/eslint/milestones{/number}","notifications_url":"https://api.github.com/repos/Slamdunk/eslint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Slamdunk/eslint/labels{/name}","releases_url":"https://api.github.com/repos/Slamdunk/eslint/releases{/id}","deployments_url":"https://api.github.com/repos/Slamdunk/eslint/deployments","created_at":"2017-06-12T12:33:06Z","updated_at":"2017-06-12T12:33:11Z","pushed_at":"2017-06-12T13:47:59Z","git_url":"git://github.com/Slamdunk/eslint.git","ssh_url":"git@github.com:Slamdunk/eslint.git","clone_url":"https://github.com/Slamdunk/eslint.git","svn_url":"https://github.com/Slamdunk/eslint","homepage":"http://eslint.org","size":15690,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"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":"eslint:master","ref":"master","sha":"c61194f9440981d6c858525273e5c469bdd98290","user":{"login":"eslint","id":6019716,"avatar_url":"https://avatars0.githubusercontent.com/u/6019716?v=3","gravatar_id":"","url":"https://api.github.com/users/eslint","html_url":"https://github.com/eslint","followers_url":"https://api.github.com/users/eslint/followers","following_url":"https://api.github.com/users/eslint/following{/other_user}","gists_url":"https://api.github.com/users/eslint/gists{/gist_id}","starred_url":"https://api.github.com/users/eslint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eslint/subscriptions","organizations_url":"https://api.github.com/users/eslint/orgs","repos_url":"https://api.github.com/users/eslint/repos","events_url":"https://api.github.com/users/eslint/events{/privacy}","received_events_url":"https://api.github.com/users/eslint/received_events","type":"Organization","site_admin":false},"repo":{"id":11061773,"name":"eslint","full_name":"eslint/eslint","owner":{"login":"eslint","id":6019716,"avatar_url":"https://avatars0.githubusercontent.com/u/6019716?v=3","gravatar_id":"","url":"https://api.github.com/users/eslint","html_url":"https://github.com/eslint","followers_url":"https://api.github.com/users/eslint/followers","following_url":"https://api.github.com/users/eslint/following{/other_user}","gists_url":"https://api.github.com/users/eslint/gists{/gist_id}","starred_url":"https://api.github.com/users/eslint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eslint/subscriptions","organizations_url":"https://api.github.com/users/eslint/orgs","repos_url":"https://api.github.com/users/eslint/repos","events_url":"https://api.github.com/users/eslint/events{/privacy}","received_events_url":"https://api.github.com/users/eslint/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eslint/eslint","description":"A fully pluggable tool for identifying and reporting on patterns in JavaScript.","fork":false,"url":"https://api.github.com/repos/eslint/eslint","forks_url":"https://api.github.com/repos/eslint/eslint/forks","keys_url":"https://api.github.com/repos/eslint/eslint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eslint/eslint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eslint/eslint/teams","hooks_url":"https://api.github.com/repos/eslint/eslint/hooks","issue_events_url":"https://api.github.com/repos/eslint/eslint/issues/events{/number}","events_url":"https://api.github.com/repos/eslint/eslint/events","assignees_url":"https://api.github.com/repos/eslint/eslint/assignees{/user}","branches_url":"https://api.github.com/repos/eslint/eslint/branches{/branch}","tags_url":"https://api.github.com/repos/eslint/eslint/tags","blobs_url":"https://api.github.com/repos/eslint/eslint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eslint/eslint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eslint/eslint/git/refs{/sha}","trees_url":"https://api.github.com/repos/eslint/eslint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eslint/eslint/statuses/{sha}","languages_url":"https://api.github.com/repos/eslint/eslint/languages","stargazers_url":"https://api.github.com/repos/eslint/eslint/stargazers","contributors_url":"https://api.github.com/repos/eslint/eslint/contributors","subscribers_url":"https://api.github.com/repos/eslint/eslint/subscribers","subscription_url":"https://api.github.com/repos/eslint/eslint/subscription","commits_url":"https://api.github.com/repos/eslint/eslint/commits{/sha}","git_commits_url":"https://api.github.com/repos/eslint/eslint/git/commits{/sha}","comments_url":"https://api.github.com/repos/eslint/eslint/comments{/number}","issue_comment_url":"https://api.github.com/repos/eslint/eslint/issues/comments{/number}","contents_url":"https://api.github.com/repos/eslint/eslint/contents/{+path}","compare_url":"https://api.github.com/repos/eslint/eslint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eslint/eslint/merges","archive_url":"https://api.github.com/repos/eslint/eslint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eslint/eslint/downloads","issues_url":"https://api.github.com/repos/eslint/eslint/issues{/number}","pulls_url":"https://api.github.com/repos/eslint/eslint/pulls{/number}","milestones_url":"https://api.github.com/repos/eslint/eslint/milestones{/number}","notifications_url":"https://api.github.com/repos/eslint/eslint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eslint/eslint/labels{/name}","releases_url":"https://api.github.com/repos/eslint/eslint/releases{/id}","deployments_url":"https://api.github.com/repos/eslint/eslint/deployments","created_at":"2013-06-29T23:59:48Z","updated_at":"2017-06-15T06:52:13Z","pushed_at":"2017-06-15T04:02:04Z","git_url":"git://github.com/eslint/eslint.git","ssh_url":"git@github.com:eslint/eslint.git","clone_url":"https://github.com/eslint/eslint.git","svn_url":"https://github.com/eslint/eslint","homepage":"http://eslint.org","size":15748,"stargazers_count":7818,"watchers_count":7818,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1505,"mirror_url":null,"open_issues_count":250,"forks":1505,"open_issues":250,"watchers":7818,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eslint/eslint/pulls/8714"},"html":{"href":"https://github.com/eslint/eslint/pull/8714"},"issue":{"href":"https://api.github.com/repos/eslint/eslint/issues/8714"},"comments":{"href":"https://api.github.com/repos/eslint/eslint/issues/8714/comments"},"review_comments":{"href":"https://api.github.com/repos/eslint/eslint/pulls/8714/comments"},"review_comment":{"href":"https://api.github.com/repos/eslint/eslint/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eslint/eslint/pulls/8714/commits"},"statuses":{"href":"https://api.github.com/repos/eslint/eslint/statuses/5111bcb0462f737b7d03f98ba34bc4b9d9038adf"}},"merged":false,"mergeable":true,"rebaseable":true,"mergeable_state":"unstable","merged_by":null,"comments":7,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":46,"deletions":0,"changed_files":2}}
{"actor":{"display_login":"not-an-aardvark"}}