{"action":"created","issue":{"url":"https://api.github.com/repos/jamespamplin/eslint-config-idiomatic/issues/4","repository_url":"https://api.github.com/repos/jamespamplin/eslint-config-idiomatic","labels_url":"https://api.github.com/repos/jamespamplin/eslint-config-idiomatic/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/jamespamplin/eslint-config-idiomatic/issues/4/comments","events_url":"https://api.github.com/repos/jamespamplin/eslint-config-idiomatic/issues/4/events","html_url":"https://github.com/jamespamplin/eslint-config-idiomatic/issues/4","id":133599501,"number":4,"title":"`space-in-parens` exceptions","user":{"login":"demrks","id":5760429,"avatar_url":"https://avatars.githubusercontent.com/u/5760429?v=3","gravatar_id":"","url":"https://api.github.com/users/demrks","html_url":"https://github.com/demrks","followers_url":"https://api.github.com/users/demrks/followers","following_url":"https://api.github.com/users/demrks/following{/other_user}","gists_url":"https://api.github.com/users/demrks/gists{/gist_id}","starred_url":"https://api.github.com/users/demrks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demrks/subscriptions","organizations_url":"https://api.github.com/users/demrks/orgs","repos_url":"https://api.github.com/users/demrks/repos","events_url":"https://api.github.com/users/demrks/events{/privacy}","received_events_url":"https://api.github.com/users/demrks/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-15T01:08:02Z","updated_at":"2016-02-15T11:29:46Z","closed_at":null,"body":"You are currently using `\"space-in-parens\": [2, \"always\"]`, which enforces spaces inside all parens. Since [idomatic.js](https://github.com/rwaldron/idiomatic.js/) has some exceptions, you should probably consider adding some of these too:\r\n\r\n```\r\n// 2.C.1.1\r\n// Functions with callbacks\r\nfoo(function() {\r\n  // Note there is no extra space between the first paren\r\n  // of the executing function call and the word \"function\"\r\n});\r\n\r\n// Function accepting an array, no space\r\nfoo([ \"alpha\", \"beta\" ]);\r\n\r\n// 2.C.1.2\r\n// Function accepting an object, no space\r\nfoo({\r\n  a: \"alpha\",\r\n  b: \"beta\"\r\n});\r\n\r\n// Single argument string literal, no space\r\nfoo(\"bar\");\r\n\r\n// Inner grouping parens, no space\r\nif ( !(\"foo\" in obj) ) {\r\n\r\n}\r\n```\r\n\r\nI already asked [eslint](https://github.com/eslint/eslint) if they could add support for _single argument string literal_, _functions with callbacks_ and _inner grouping parens_. But _function accepting an object_ and _function accepting an array_ is already possible, see https://github.com/eslint/eslint/blob/master/docs/rules/space-in-parens.md:\r\n\r\n`\"space-in-parens\": [2, \"always\", { \"exceptions\": [\"{}\", \"[]\", \"()\", \"empty\"] }]`"},"comment":{"url":"https://api.github.com/repos/jamespamplin/eslint-config-idiomatic/issues/comments/184174571","html_url":"https://github.com/jamespamplin/eslint-config-idiomatic/issues/4#issuecomment-184174571","issue_url":"https://api.github.com/repos/jamespamplin/eslint-config-idiomatic/issues/4","id":184174571,"user":{"login":"demrks","id":5760429,"avatar_url":"https://avatars.githubusercontent.com/u/5760429?v=3","gravatar_id":"","url":"https://api.github.com/users/demrks","html_url":"https://github.com/demrks","followers_url":"https://api.github.com/users/demrks/followers","following_url":"https://api.github.com/users/demrks/following{/other_user}","gists_url":"https://api.github.com/users/demrks/gists{/gist_id}","starred_url":"https://api.github.com/users/demrks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demrks/subscriptions","organizations_url":"https://api.github.com/users/demrks/orgs","repos_url":"https://api.github.com/users/demrks/repos","events_url":"https://api.github.com/users/demrks/events{/privacy}","received_events_url":"https://api.github.com/users/demrks/received_events","type":"User","site_admin":false},"created_at":"2016-02-15T11:29:46Z","updated_at":"2016-02-15T11:29:46Z","body":"@jamespamplin  It doesn't unfortunately, but it's slightly better than without `exceptions` IMO. At least you are allowed to write something like `foo([ \"alpha\", \"beta\" ]);` (2.C.1.1).\r\n\r\nYou'd have to write `elements.push( matches[ idx ]); ` instead of`elements.push( matches[ idx ] ); ` (6.A.2.1) though. Not great, but ok-ish, I guess."}}