{"action":"created","issue":{"url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/issues/10","labels_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/issues/10/comments","events_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/issues/10/events","html_url":"https://github.com/SonarCommunity/sonar-javascript/pull/10","id":17987883,"number":10,"title":"JSLint and JSHint directives should not be flagged as commented out code","user":{"login":"david-owens-akqa","id":2188209,"avatar_url":"https://avatars.githubusercontent.com/u/2188209?v=3","gravatar_id":"","url":"https://api.github.com/users/david-owens-akqa","html_url":"https://github.com/david-owens-akqa","followers_url":"https://api.github.com/users/david-owens-akqa/followers","following_url":"https://api.github.com/users/david-owens-akqa/following{/other_user}","gists_url":"https://api.github.com/users/david-owens-akqa/gists{/gist_id}","starred_url":"https://api.github.com/users/david-owens-akqa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-owens-akqa/subscriptions","organizations_url":"https://api.github.com/users/david-owens-akqa/orgs","repos_url":"https://api.github.com/users/david-owens-akqa/repos","events_url":"https://api.github.com/users/david-owens-akqa/events{/privacy}","received_events_url":"https://api.github.com/users/david-owens-akqa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2013-08-13T09:48:57Z","updated_at":"2015-09-16T06:54:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/pulls/10","html_url":"https://github.com/SonarCommunity/sonar-javascript/pull/10","diff_url":"https://github.com/SonarCommunity/sonar-javascript/pull/10.diff","patch_url":"https://github.com/SonarCommunity/sonar-javascript/pull/10.patch"},"body":"The current version of the sonar-javascript plugin flags JSLint and JSHint directives as commented out code in some instances.\r\n\r\nThis pull request addresses these false positive in the same way that JSDoc comment blocks are currently handled.\r\n\r\nI have updated the unit tests to cover these new checks. The directives I have included in the test are taken from our developer guidelines and match the base ruleset that we use in production.\r\n\r\nBackground\r\n\r\nIt may be desirable to include a JSLint or JSHint directive at the top of a JavaScript file.\r\n\r\nhttp://www.jslint.com/lint.html#options\r\nhttp://www.jshint.com/docs/config/\r\n\r\nThese allow an IDE to provide feedback during development and increase code portability.\r\n\r\nThe directives look like JavaScript code, especially when they contain keywords, and trigger the \"Sections of code should not be \"commented out\" rule."},"comment":{"url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/issues/comments/140647828","html_url":"https://github.com/SonarCommunity/sonar-javascript/pull/10#issuecomment-140647828","issue_url":"https://api.github.com/repos/SonarCommunity/sonar-javascript/issues/10","id":140647828,"user":{"login":"weblogixx","id":757613,"avatar_url":"https://avatars.githubusercontent.com/u/757613?v=3","gravatar_id":"","url":"https://api.github.com/users/weblogixx","html_url":"https://github.com/weblogixx","followers_url":"https://api.github.com/users/weblogixx/followers","following_url":"https://api.github.com/users/weblogixx/following{/other_user}","gists_url":"https://api.github.com/users/weblogixx/gists{/gist_id}","starred_url":"https://api.github.com/users/weblogixx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weblogixx/subscriptions","organizations_url":"https://api.github.com/users/weblogixx/orgs","repos_url":"https://api.github.com/users/weblogixx/repos","events_url":"https://api.github.com/users/weblogixx/events{/privacy}","received_events_url":"https://api.github.com/users/weblogixx/received_events","type":"User","site_admin":false},"created_at":"2015-09-16T06:54:15Z","updated_at":"2015-09-16T06:54:15Z","body":"Same should be true for esLint I think."}}