{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/2668","labels_url":"https://api.github.com/repos/eslint/eslint/issues/2668/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/2668/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/2668/events","html_url":"https://github.com/eslint/eslint/issues/2668","id":84068673,"number":2668,"title":"Allow key-spacing to align separated groups as well","user":{"login":"apierzch","id":4123582,"avatar_url":"https://avatars.githubusercontent.com/u/4123582?v=3","gravatar_id":"","url":"https://api.github.com/users/apierzch","html_url":"https://github.com/apierzch","followers_url":"https://api.github.com/users/apierzch/followers","following_url":"https://api.github.com/users/apierzch/following{/other_user}","gists_url":"https://api.github.com/users/apierzch/gists{/gist_id}","starred_url":"https://api.github.com/users/apierzch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apierzch/subscriptions","organizations_url":"https://api.github.com/users/apierzch/orgs","repos_url":"https://api.github.com/users/apierzch/repos","events_url":"https://api.github.com/users/apierzch/events{/privacy}","received_events_url":"https://api.github.com/users/apierzch/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eslint/eslint/labels/triage","name":"triage","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-06-02T15:18:36Z","updated_at":"2015-08-30T07:05:49Z","closed_at":null,"body":"Currently example in documentation says that separated groups will not align:\r\n```\r\nvar obj = {\r\n    a:    value,\r\n    bcde: 42,\r\n\r\n    fg: foo(),\r\n    h:  function() {\r\n        return this.a;\r\n    },\r\n    ijkl: 'Non-consecutive lines form a new group'\r\n};\r\n```\r\n\r\nIt would be useful to have option that would enforce or allow such alignment, so that I can have: \r\n```\r\nvar obj = {\r\n    a:    value,\r\n    bcde: 42,\r\n\r\n    fg:   foo(),\r\n    h:    function() {\r\n        return this.a;\r\n    },\r\n    ijkl: 'Non-consecutive lines form a new group'\r\n};\r\n```\r\n\r\nSame for aligning on colon.\r\n\r\nI'll try to provide a PR if you agree with me."},"comment":{"url":"https://api.github.com/repos/eslint/eslint/issues/comments/136094087","html_url":"https://github.com/eslint/eslint/issues/2668#issuecomment-136094087","issue_url":"https://api.github.com/repos/eslint/eslint/issues/2668","id":136094087,"user":{"login":"zyklus","id":320562,"avatar_url":"https://avatars.githubusercontent.com/u/320562?v=3","gravatar_id":"","url":"https://api.github.com/users/zyklus","html_url":"https://github.com/zyklus","followers_url":"https://api.github.com/users/zyklus/followers","following_url":"https://api.github.com/users/zyklus/following{/other_user}","gists_url":"https://api.github.com/users/zyklus/gists{/gist_id}","starred_url":"https://api.github.com/users/zyklus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zyklus/subscriptions","organizations_url":"https://api.github.com/users/zyklus/orgs","repos_url":"https://api.github.com/users/zyklus/repos","events_url":"https://api.github.com/users/zyklus/events{/privacy}","received_events_url":"https://api.github.com/users/zyklus/received_events","type":"User","site_admin":false},"created_at":"2015-08-30T07:05:49Z","updated_at":"2015-08-30T07:05:49Z","body":"@btmills - I think it would be easier to implement it at the same time though.  My basic suggestion is that if `groups: false` is set that the logic becomes:\r\n\r\n```js\r\nif (alignedToPrevGroup || alignedToNextGroup) {\r\n```\r\n\r\nPossibly more like: `groups = [all, any, neighbors]` (again, naming up for discussion but hopefully the meaning is clear enough?)"}}