{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/6176","repository_url":"https://api.github.com/repos/eslint/eslint","labels_url":"https://api.github.com/repos/eslint/eslint/issues/6176/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/6176/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/6176/events","html_url":"https://github.com/eslint/eslint/issues/6176","id":154873546,"number":6176,"title":"Allow padding on simple returns for newline-before-return","user":{"login":"andrewvaughan","id":1119590,"avatar_url":"https://avatars.githubusercontent.com/u/1119590?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewvaughan","html_url":"https://github.com/andrewvaughan","followers_url":"https://api.github.com/users/andrewvaughan/followers","following_url":"https://api.github.com/users/andrewvaughan/following{/other_user}","gists_url":"https://api.github.com/users/andrewvaughan/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewvaughan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewvaughan/subscriptions","organizations_url":"https://api.github.com/users/andrewvaughan/orgs","repos_url":"https://api.github.com/users/andrewvaughan/repos","events_url":"https://api.github.com/users/andrewvaughan/events{/privacy}","received_events_url":"https://api.github.com/users/andrewvaughan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eslint/eslint/labels/accepted","name":"accepted","color":"0052cc"},{"url":"https://api.github.com/repos/eslint/eslint/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/eslint/eslint/labels/rule","name":"rule","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-05-14T20:14:40Z","updated_at":"2016-05-17T15:17:38Z","closed_at":null,"body":"**ESLint Version:** 2.10.1\r\n\r\n## Problem:\r\nUsing `newline-before-return` with `padded-blocks` causes a conflict, as `padded-blocks` insists on padded spacing for functions, and `newline-before-return` complains if there is a newline before a return statement by itself in a function.\r\n\r\n## Recommended Solution:\r\nAdd an option to `newline-before-return` to ignore scenarios where the only statement in a function block is the return statement.\r\n\r\nFor example:\r\n\r\n```js\r\n\"newline-before-return\": [\"error\", {\r\n    \"pad-getters\": true  // (New) Ensure getter returns are padded on either side by a newline\r\n}]\r\n```\r\n\r\nThis will allow ESLint to properly support it's built-in plugins without changing the default functionality of the `newline-before-return` rule.  With the above configuration:\r\n\r\n**This code would result in an error:**\r\n```js\r\nfunction getVar() {\r\n    return this.var;\r\n}\r\n```\r\n\r\n**This code would be valid with both plugins:**\r\n```js\r\nfunction getVar() {\r\n\r\n    return this.var;\r\n\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/eslint/eslint/issues/comments/219751132","html_url":"https://github.com/eslint/eslint/issues/6176#issuecomment-219751132","issue_url":"https://api.github.com/repos/eslint/eslint/issues/6176","id":219751132,"user":{"login":"markelog","id":945528,"avatar_url":"https://avatars.githubusercontent.com/u/945528?v=3","gravatar_id":"","url":"https://api.github.com/users/markelog","html_url":"https://github.com/markelog","followers_url":"https://api.github.com/users/markelog/followers","following_url":"https://api.github.com/users/markelog/following{/other_user}","gists_url":"https://api.github.com/users/markelog/gists{/gist_id}","starred_url":"https://api.github.com/users/markelog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markelog/subscriptions","organizations_url":"https://api.github.com/users/markelog/orgs","repos_url":"https://api.github.com/users/markelog/repos","events_url":"https://api.github.com/users/markelog/events{/privacy}","received_events_url":"https://api.github.com/users/markelog/received_events","type":"User","site_admin":false},"created_at":"2016-05-17T15:17:38Z","updated_at":"2016-05-17T15:17:38Z","body":"Can we document what should be considered as breaking change? See JSCS example https://github.com/jscs-dev/node-jscs/blob/master/OVERVIEW.md#user-content-versioning--semver for reference"}}