{"action":"created","comment":{"url":"https://api.github.com/repos/eslint/eslint/pulls/comments/61891519","id":61891519,"diff_hunk":"@@ -1058,5 +1058,217 @@ ruleTester.run(\"key-spacing\", rule, {\n             { message: \"Missing space before value for key 'a'.\", line: 1, column: 6, type: \"Identifier\" },\n             { message: \"Extra space after key 'c'.\", line: 1, column: 20, type: \"Identifier\" }\n         ]\n+    },\n+\n+    // https://github.com/eslint/eslint/issues/5613\n+    {\n+        code: [\n+            \"({\",\n+            \"    longName : 1,\",\n+            \"    small :    2,\",\n+            \"    xs :       3\",\n+            \"})\"\n+        ].join(\"\\n\"),\n+        options: [{\n+            multiLine: {\n+                align: {\n+                    on: \"value\",\n+                    beforeColon: true,\n+                    afterColon: true\n+                }\n+            }\n+        }],\n+        parserOptions: { ecmaVersion: 6, ecmaFeatures: { experimentalObjectRestSpread: true } },\n+        errors: []","path":"tests/lib/rules/key-spacing.js","position":25,"original_position":25,"commit_id":"dee0aae4852c069e1e58bc96e05dfab9786ec5a4","original_commit_id":"dee0aae4852c069e1e58bc96e05dfab9786ec5a4","user":{"login":"Kyle-Mendes","id":6400039,"avatar_url":"https://avatars.githubusercontent.com/u/6400039?v=3","gravatar_id":"","url":"https://api.github.com/users/Kyle-Mendes","html_url":"https://github.com/Kyle-Mendes","followers_url":"https://api.github.com/users/Kyle-Mendes/followers","following_url":"https://api.github.com/users/Kyle-Mendes/following{/other_user}","gists_url":"https://api.github.com/users/Kyle-Mendes/gists{/gist_id}","starred_url":"https://api.github.com/users/Kyle-Mendes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kyle-Mendes/subscriptions","organizations_url":"https://api.github.com/users/Kyle-Mendes/orgs","repos_url":"https://api.github.com/users/Kyle-Mendes/repos","events_url":"https://api.github.com/users/Kyle-Mendes/events{/privacy}","received_events_url":"https://api.github.com/users/Kyle-Mendes/received_events","type":"User","site_admin":false},"body":"Good catch. I completely overlooked that. Whoops!","created_at":"2016-05-03T14:35:53Z","updated_at":"2016-05-03T14:35:53Z","html_url":"https://github.com/eslint/eslint/pull/5907#discussion_r61891519","pull_request_url":"https://api.github.com/repos/eslint/eslint/pulls/5907","_links":{"self":{"href":"https://api.github.com/repos/eslint/eslint/pulls/comments/61891519"},"html":{"href":"https://github.com/eslint/eslint/pull/5907#discussion_r61891519"},"pull_request":{"href":"https://api.github.com/repos/eslint/eslint/pulls/5907"}}},"pull_request":{"url":"https://api.github.com/repos/eslint/eslint/pulls/5907","id":67095067,"html_url":"https://github.com/eslint/eslint/pull/5907","diff_url":"https://github.com/eslint/eslint/pull/5907.diff","patch_url":"https://github.com/eslint/eslint/pull/5907.patch","issue_url":"https://api.github.com/repos/eslint/eslint/issues/5907","number":5907,"state":"open","locked":false,"title":"New: Adding new key-space config (fixes #5613)","user":{"login":"Kyle-Mendes","id":6400039,"avatar_url":"https://avatars.githubusercontent.com/u/6400039?v=3","gravatar_id":"","url":"https://api.github.com/users/Kyle-Mendes","html_url":"https://github.com/Kyle-Mendes","followers_url":"https://api.github.com/users/Kyle-Mendes/followers","following_url":"https://api.github.com/users/Kyle-Mendes/following{/other_user}","gists_url":"https://api.github.com/users/Kyle-Mendes/gists{/gist_id}","starred_url":"https://api.github.com/users/Kyle-Mendes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kyle-Mendes/subscriptions","organizations_url":"https://api.github.com/users/Kyle-Mendes/orgs","repos_url":"https://api.github.com/users/Kyle-Mendes/repos","events_url":"https://api.github.com/users/Kyle-Mendes/events{/privacy}","received_events_url":"https://api.github.com/users/Kyle-Mendes/received_events","type":"User","site_admin":false},"body":"This configuration allows specifying how spacing should work when aligning values via a new `alignment` property.\r\n\r\nExample Configuration using the new `alignment` property:\r\n\r\n```json\r\n\"key-spacing\": [2, {\r\n    \"singleLine\": {\r\n        \"beforeColon\": false,\r\n        \"afterColon\": true\r\n    },\r\n    \"multiLine\": {\r\n        \"beforeColon\": false,\r\n        \"afterColon\": true,\r\n        \"align\": \"colon\"\r\n    },\r\n    \"align\": {\r\n        \"beforeColon\": true,\r\n        \"afterColon\": true\r\n    }\r\n}]\r\n```\r\n\r\nThe following alignment would throw no errors: \r\n```js\r\nvar obj = {\r\n    _origin  : 0,\r\n    _x       : 1,\r\n    callback : function(cb) {\r\n        cb();\r\n    },\r\n    a  : 1,\r\n    bc : 2\r\n    d  : function() {\r\n        //...\r\n    },\r\n    o: {\r\n        internal : true,\r\n        int      : 1\r\n    }\r\n};\r\n```\r\n\r\n\r\nTests were added showing that it should work with both `align: colon` and `align: value` .\r\n\r\n------------------------------------------------------------\r\n\r\n### Why\r\n\r\nThis allows eslint users (like myself) more granular control over the styling of their alignment.  I specifically chose to add a new configuration property to allow separate styling between `singleLine`, `multiLine` and `alignment` if the user so chooses.\r\n\r\nThe `alignment` options are initialized as null to maintain backwards compatibility and ensure that no hidden configurations are forced on the user without them realizing. ","created_at":"2016-04-19T21:43:24Z","updated_at":"2016-05-03T14:35:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8efffe59cc882eea87fa4b663370dccb41a37f5e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/eslint/eslint/pulls/5907/commits","review_comments_url":"https://api.github.com/repos/eslint/eslint/pulls/5907/comments","review_comment_url":"https://api.github.com/repos/eslint/eslint/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/5907/comments","statuses_url":"https://api.github.com/repos/eslint/eslint/statuses/dee0aae4852c069e1e58bc96e05dfab9786ec5a4","head":{"label":"Kyle-Mendes:issue5613","ref":"issue5613","sha":"dee0aae4852c069e1e58bc96e05dfab9786ec5a4","user":{"login":"Kyle-Mendes","id":6400039,"avatar_url":"https://avatars.githubusercontent.com/u/6400039?v=3","gravatar_id":"","url":"https://api.github.com/users/Kyle-Mendes","html_url":"https://github.com/Kyle-Mendes","followers_url":"https://api.github.com/users/Kyle-Mendes/followers","following_url":"https://api.github.com/users/Kyle-Mendes/following{/other_user}","gists_url":"https://api.github.com/users/Kyle-Mendes/gists{/gist_id}","starred_url":"https://api.github.com/users/Kyle-Mendes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kyle-Mendes/subscriptions","organizations_url":"https://api.github.com/users/Kyle-Mendes/orgs","repos_url":"https://api.github.com/users/Kyle-Mendes/repos","events_url":"https://api.github.com/users/Kyle-Mendes/events{/privacy}","received_events_url":"https://api.github.com/users/Kyle-Mendes/received_events","type":"User","site_admin":false},"repo":{"id":56627921,"name":"eslint","full_name":"Kyle-Mendes/eslint","owner":{"login":"Kyle-Mendes","id":6400039,"avatar_url":"https://avatars.githubusercontent.com/u/6400039?v=3","gravatar_id":"","url":"https://api.github.com/users/Kyle-Mendes","html_url":"https://github.com/Kyle-Mendes","followers_url":"https://api.github.com/users/Kyle-Mendes/followers","following_url":"https://api.github.com/users/Kyle-Mendes/following{/other_user}","gists_url":"https://api.github.com/users/Kyle-Mendes/gists{/gist_id}","starred_url":"https://api.github.com/users/Kyle-Mendes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kyle-Mendes/subscriptions","organizations_url":"https://api.github.com/users/Kyle-Mendes/orgs","repos_url":"https://api.github.com/users/Kyle-Mendes/repos","events_url":"https://api.github.com/users/Kyle-Mendes/events{/privacy}","received_events_url":"https://api.github.com/users/Kyle-Mendes/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Kyle-Mendes/eslint","description":"A fully pluggable tool for identifying and reporting on patterns in JavaScript.","fork":true,"url":"https://api.github.com/repos/Kyle-Mendes/eslint","forks_url":"https://api.github.com/repos/Kyle-Mendes/eslint/forks","keys_url":"https://api.github.com/repos/Kyle-Mendes/eslint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Kyle-Mendes/eslint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Kyle-Mendes/eslint/teams","hooks_url":"https://api.github.com/repos/Kyle-Mendes/eslint/hooks","issue_events_url":"https://api.github.com/repos/Kyle-Mendes/eslint/issues/events{/number}","events_url":"https://api.github.com/repos/Kyle-Mendes/eslint/events","assignees_url":"https://api.github.com/repos/Kyle-Mendes/eslint/assignees{/user}","branches_url":"https://api.github.com/repos/Kyle-Mendes/eslint/branches{/branch}","tags_url":"https://api.github.com/repos/Kyle-Mendes/eslint/tags","blobs_url":"https://api.github.com/repos/Kyle-Mendes/eslint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Kyle-Mendes/eslint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Kyle-Mendes/eslint/git/refs{/sha}","trees_url":"https://api.github.com/repos/Kyle-Mendes/eslint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Kyle-Mendes/eslint/statuses/{sha}","languages_url":"https://api.github.com/repos/Kyle-Mendes/eslint/languages","stargazers_url":"https://api.github.com/repos/Kyle-Mendes/eslint/stargazers","contributors_url":"https://api.github.com/repos/Kyle-Mendes/eslint/contributors","subscribers_url":"https://api.github.com/repos/Kyle-Mendes/eslint/subscribers","subscription_url":"https://api.github.com/repos/Kyle-Mendes/eslint/subscription","commits_url":"https://api.github.com/repos/Kyle-Mendes/eslint/commits{/sha}","git_commits_url":"https://api.github.com/repos/Kyle-Mendes/eslint/git/commits{/sha}","comments_url":"https://api.github.com/repos/Kyle-Mendes/eslint/comments{/number}","issue_comment_url":"https://api.github.com/repos/Kyle-Mendes/eslint/issues/comments{/number}","contents_url":"https://api.github.com/repos/Kyle-Mendes/eslint/contents/{+path}","compare_url":"https://api.github.com/repos/Kyle-Mendes/eslint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Kyle-Mendes/eslint/merges","archive_url":"https://api.github.com/repos/Kyle-Mendes/eslint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Kyle-Mendes/eslint/downloads","issues_url":"https://api.github.com/repos/Kyle-Mendes/eslint/issues{/number}","pulls_url":"https://api.github.com/repos/Kyle-Mendes/eslint/pulls{/number}","milestones_url":"https://api.github.com/repos/Kyle-Mendes/eslint/milestones{/number}","notifications_url":"https://api.github.com/repos/Kyle-Mendes/eslint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Kyle-Mendes/eslint/labels{/name}","releases_url":"https://api.github.com/repos/Kyle-Mendes/eslint/releases{/id}","deployments_url":"https://api.github.com/repos/Kyle-Mendes/eslint/deployments","created_at":"2016-04-19T20:02:59Z","updated_at":"2016-04-19T20:03:05Z","pushed_at":"2016-05-02T20:51:51Z","git_url":"git://github.com/Kyle-Mendes/eslint.git","ssh_url":"git@github.com:Kyle-Mendes/eslint.git","clone_url":"https://github.com/Kyle-Mendes/eslint.git","svn_url":"https://github.com/Kyle-Mendes/eslint","homepage":"http://eslint.org","size":11261,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"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":"4c2de6c3350ec8a9b3d8310fb8103cd6ae67645b","user":{"login":"eslint","id":6019716,"avatar_url":"https://avatars.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://avatars.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":"2016-05-03T13:03:37Z","pushed_at":"2016-05-03T08:42:27Z","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":15387,"stargazers_count":4794,"watchers_count":4794,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":937,"mirror_url":null,"open_issues_count":211,"forks":937,"open_issues":211,"watchers":4794,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eslint/eslint/pulls/5907"},"html":{"href":"https://github.com/eslint/eslint/pull/5907"},"issue":{"href":"https://api.github.com/repos/eslint/eslint/issues/5907"},"comments":{"href":"https://api.github.com/repos/eslint/eslint/issues/5907/comments"},"review_comments":{"href":"https://api.github.com/repos/eslint/eslint/pulls/5907/comments"},"review_comment":{"href":"https://api.github.com/repos/eslint/eslint/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eslint/eslint/pulls/5907/commits"},"statuses":{"href":"https://api.github.com/repos/eslint/eslint/statuses/dee0aae4852c069e1e58bc96e05dfab9786ec5a4"}}}}