{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/6069","repository_url":"https://api.github.com/repos/eslint/eslint","labels_url":"https://api.github.com/repos/eslint/eslint/issues/6069/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/6069/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/6069/events","html_url":"https://github.com/eslint/eslint/issues/6069","id":152927509,"number":6069,"title":"Rule Proposal: lines-around-directive","user":{"login":"mysticatea","id":1937871,"avatar_url":"https://avatars.githubusercontent.com/u/1937871?v=3","gravatar_id":"","url":"https://api.github.com/users/mysticatea","html_url":"https://github.com/mysticatea","followers_url":"https://api.github.com/users/mysticatea/followers","following_url":"https://api.github.com/users/mysticatea/following{/other_user}","gists_url":"https://api.github.com/users/mysticatea/gists{/gist_id}","starred_url":"https://api.github.com/users/mysticatea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysticatea/subscriptions","organizations_url":"https://api.github.com/users/mysticatea/orgs","repos_url":"https://api.github.com/users/mysticatea/repos","events_url":"https://api.github.com/users/mysticatea/events{/privacy}","received_events_url":"https://api.github.com/users/mysticatea/received_events","type":"User","site_admin":false},"labels":[{"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"},{"url":"https://api.github.com/repos/eslint/eslint/labels/rule","name":"rule","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/eslint/eslint/milestones/15","html_url":"https://github.com/eslint/eslint/milestones/JSCS%20Compatibility","labels_url":"https://api.github.com/repos/eslint/eslint/milestones/15/labels","id":1707375,"number":15,"title":"JSCS Compatibility","description":"","creator":{"login":"nzakas","id":38546,"avatar_url":"https://avatars.githubusercontent.com/u/38546?v=3","gravatar_id":"","url":"https://api.github.com/users/nzakas","html_url":"https://github.com/nzakas","followers_url":"https://api.github.com/users/nzakas/followers","following_url":"https://api.github.com/users/nzakas/following{/other_user}","gists_url":"https://api.github.com/users/nzakas/gists{/gist_id}","starred_url":"https://api.github.com/users/nzakas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nzakas/subscriptions","organizations_url":"https://api.github.com/users/nzakas/orgs","repos_url":"https://api.github.com/users/nzakas/repos","events_url":"https://api.github.com/users/nzakas/events{/privacy}","received_events_url":"https://api.github.com/users/nzakas/received_events","type":"User","site_admin":false},"open_issues":23,"closed_issues":2,"state":"open","created_at":"2016-04-14T18:09:38Z","updated_at":"2016-05-04T04:34:55Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-05-04T04:34:55Z","updated_at":"2016-05-04T04:39:08Z","closed_at":null,"body":"From [requirePaddingNewLinesAfterUseStrict] and [disallowPaddingNewLinesAfterUseStrict].\r\n\r\nThis rule will require/disallow blank lines before/after a chunk of directive prologues.\r\n\r\n```js\r\n{\r\n    \"lines-around-directive\": [\"error\", \"always\" or \"never\"],\r\n    // or\r\n    \"lines-around-directive\": [\"error\", {\r\n        \"after\": \"always\" or \"never\",\r\n        \"before\": \"always\" or \"never\"\r\n    }]\r\n}\r\n```\r\n\r\n**Valid:**\r\n\r\n```js\r\n/*eslint lines-around-directive: [\"error\", \"always\"]*/\r\n\r\nfoo();\r\n\r\n\"use strict\";\r\n\r\nfoo();\r\n\r\nfunction foo() {\r\n    \"use strict\";  // ignore at the head of block. this is warned by padded-blocks.\r\n    \"use asm\";     // ignore between directives.\r\n\r\n    foo();\r\n}\r\n```\r\n\r\n```js\r\n/*eslint lines-around-directive: [\"error\", \"never\"]*/\r\n\r\nfoo();\r\n\"use strict\";\r\nfoo();\r\n\r\nfunction foo() {\r\n\r\n    \"use strict\";  // ignore at the head of block. this is warned by padded-blocks.\r\n    \"use asm\";     // ignore between directives.\r\n    foo();\r\n}\r\n```\r\n\r\n**Invalid:**\r\n\r\n```js\r\n/*eslint lines-around-directive: [\"error\", \"always\"]*/\r\n\r\nfoo();\r\n\"use strict\";\r\nfoo();\r\n\r\nfunction foo() {\r\n    \"use strict\";\r\n    foo();\r\n}\r\n```\r\n\r\n```js\r\n/*eslint lines-around-directive: [\"error\", \"never\"]*/\r\n\r\nfoo();\r\n\r\n\"use strict\";\r\n\r\nfoo();\r\n\r\nfunction foo() {\r\n    \"use strict\";\r\n\r\n    foo();\r\n}\r\n```\r\n\r\n[requirePaddingNewLinesAfterUseStrict]: http://jscs.info/rule/requirePaddingNewLinesAfterUseStrict\r\n[disallowPaddingNewLinesAfterUseStrict]: http://jscs.info/rule/disallowPaddingNewLinesAfterUseStrict"},"comment":{"url":"https://api.github.com/repos/eslint/eslint/issues/comments/216740747","html_url":"https://github.com/eslint/eslint/issues/6069#issuecomment-216740747","issue_url":"https://api.github.com/repos/eslint/eslint/issues/6069","id":216740747,"user":{"login":"mysticatea","id":1937871,"avatar_url":"https://avatars.githubusercontent.com/u/1937871?v=3","gravatar_id":"","url":"https://api.github.com/users/mysticatea","html_url":"https://github.com/mysticatea","followers_url":"https://api.github.com/users/mysticatea/followers","following_url":"https://api.github.com/users/mysticatea/following{/other_user}","gists_url":"https://api.github.com/users/mysticatea/gists{/gist_id}","starred_url":"https://api.github.com/users/mysticatea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysticatea/subscriptions","organizations_url":"https://api.github.com/users/mysticatea/orgs","repos_url":"https://api.github.com/users/mysticatea/repos","events_url":"https://api.github.com/users/mysticatea/events{/privacy}","received_events_url":"https://api.github.com/users/mysticatea/received_events","type":"User","site_admin":false},"created_at":"2016-05-04T04:39:08Z","updated_at":"2016-05-04T04:39:08Z","body":"I'm idiot! `before` is nothing."}}