{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/4376","repository_url":"https://api.github.com/repos/eslint/eslint","labels_url":"https://api.github.com/repos/eslint/eslint/issues/4376/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/4376/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/4376/events","html_url":"https://github.com/eslint/eslint/issues/4376","id":116079271,"number":4376,"title":"Rule for parenthesis in multiline conditions","user":{"login":"evilebottnawi","id":4567934,"avatar_url":"https://avatars.githubusercontent.com/u/4567934?v=3","gravatar_id":"","url":"https://api.github.com/users/evilebottnawi","html_url":"https://github.com/evilebottnawi","followers_url":"https://api.github.com/users/evilebottnawi/followers","following_url":"https://api.github.com/users/evilebottnawi/following{/other_user}","gists_url":"https://api.github.com/users/evilebottnawi/gists{/gist_id}","starred_url":"https://api.github.com/users/evilebottnawi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evilebottnawi/subscriptions","organizations_url":"https://api.github.com/users/evilebottnawi/orgs","repos_url":"https://api.github.com/users/evilebottnawi/repos","events_url":"https://api.github.com/users/evilebottnawi/events{/privacy}","received_events_url":"https://api.github.com/users/evilebottnawi/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/feature","name":"feature","color":"bfd4f2"},{"url":"https://api.github.com/repos/eslint/eslint/labels/help%20wanted","name":"help wanted","color":"eb6420"},{"url":"https://api.github.com/repos/eslint/eslint/labels/rule","name":"rule","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2015-11-10T10:31:28Z","updated_at":"2016-05-24T21:53:28Z","closed_at":"2016-04-09T14:06:22Z","body":"First code style (parenthesis on line with end condition):\r\n```javascript\r\nvar a = 1;\r\nvar b = 2;\r\n\r\nif (a === 1\r\n    && b === 2) { // <-- Here `)`\r\n    // Code\r\n}\r\n```\r\nSecond code style (parenthesis on new line):\r\n```javascript\r\nvar a = 1;\r\nvar b = 2;\r\n\r\nif (a === 1\r\n    && b === 2\r\n) {     // <-- Here `)`\r\n    // Code\r\n}\r\n```\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/28121761-rule-for-parenthesis-in-multiline-conditions?utm_campaign=plugin&utm_content=tracker%2F282608&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F282608&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/eslint/eslint/issues/comments/221413059","html_url":"https://github.com/eslint/eslint/issues/4376#issuecomment-221413059","issue_url":"https://api.github.com/repos/eslint/eslint/issues/4376","id":221413059,"user":{"login":"mczepiel","id":2964,"avatar_url":"https://avatars.githubusercontent.com/u/2964?v=3","gravatar_id":"","url":"https://api.github.com/users/mczepiel","html_url":"https://github.com/mczepiel","followers_url":"https://api.github.com/users/mczepiel/followers","following_url":"https://api.github.com/users/mczepiel/following{/other_user}","gists_url":"https://api.github.com/users/mczepiel/gists{/gist_id}","starred_url":"https://api.github.com/users/mczepiel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mczepiel/subscriptions","organizations_url":"https://api.github.com/users/mczepiel/orgs","repos_url":"https://api.github.com/users/mczepiel/repos","events_url":"https://api.github.com/users/mczepiel/events{/privacy}","received_events_url":"https://api.github.com/users/mczepiel/received_events","type":"User","site_admin":false},"created_at":"2016-05-24T21:53:28Z","updated_at":"2016-05-24T21:53:28Z","body":"FWIW, I'd really prefer if you could just switch to `allman` style for multi-line conditionals, leaving the closing parent on the conditional instead of bringing it to the new line.\r\n\r\n```\r\nif (foo &&\r\n  bar &&\r\n  baz)\r\n{\r\n  body\r\n}\r\n```\r\n\r\nSeems like it might be more acceptable to have the existing rule vary between already existing  strategies based on the conditional being a single or multi-line  as opposed to a new rule.\r\n\r\nBut yeah, I'm not sure how receptive everybody is to altering existing options and if you really insist on having the closing paren and the opening brace on the same line it looks like you'll need a new rule."}}
{"actor":{"display_login":"mczepiel"}}