{"action":"closed","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/5801","repository_url":"https://api.github.com/repos/eslint/eslint","labels_url":"https://api.github.com/repos/eslint/eslint/issues/5801/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/5801/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/5801/events","html_url":"https://github.com/eslint/eslint/issues/5801","id":146360926,"number":5801,"title":"Feature: Alert when an inline disable comment can be removed","user":{"login":"hzoo","id":588473,"avatar_url":"https://avatars.githubusercontent.com/u/588473?v=3","gravatar_id":"","url":"https://api.github.com/users/hzoo","html_url":"https://github.com/hzoo","followers_url":"https://api.github.com/users/hzoo/followers","following_url":"https://api.github.com/users/hzoo/following{/other_user}","gists_url":"https://api.github.com/users/hzoo/gists{/gist_id}","starred_url":"https://api.github.com/users/hzoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hzoo/subscriptions","organizations_url":"https://api.github.com/users/hzoo/orgs","repos_url":"https://api.github.com/users/hzoo/repos","events_url":"https://api.github.com/users/hzoo/events{/privacy}","received_events_url":"https://api.github.com/users/hzoo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eslint/eslint/labels/cli","name":"cli","color":"eb6420"},{"url":"https://api.github.com/repos/eslint/eslint/labels/evaluating","name":"evaluating","color":"fef2c0"},{"url":"https://api.github.com/repos/eslint/eslint/labels/feature","name":"feature","color":"bfd4f2"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-04-06T16:08:13Z","updated_at":"2016-04-11T17:08:52Z","closed_at":"2016-04-11T17:08:52Z","body":"Example:\r\n\r\n```js\r\ntry {\r\n  func();\r\n} catch (e) {} // eslint-disable-line no-empty\r\n```\r\n\r\nThis could be a separate command (say `eslint --check-disabled-comments`, or something crazier like after updating to a new version given an eslintrc). After running, it will iterate over every disable comment (like `// eslint-disable-line`, etc) and then try to try the file with the rule/rules specified and see if it doesn't error anymore. If it doesn't then it will tell the user that the comment can be removed now. If the rule has multiple options, then it can try each option and tell the user the option that passes.\r\n\r\nAs an example for https://github.com/eslint/eslint/issues/5800 - if we decide to add an exception for the empty catch block, then running the command would tell the user that you can remove the comment + change the rule to use the new option.\r\n\r\nThe point of this is to allow more of the consumers code to be linted by removing the disabled comments when possible."}}