{"action":"closed","number":335,"pull_request":{"url":"https://api.github.com/repos/palantir/tslint/pulls/335","id":29942374,"html_url":"https://github.com/palantir/tslint/pull/335","diff_url":"https://github.com/palantir/tslint/pull/335.diff","patch_url":"https://github.com/palantir/tslint/pull/335.patch","issue_url":"https://api.github.com/repos/palantir/tslint/issues/335","number":335,"state":"closed","locked":false,"title":"Oneline rule: allow exception for multiline expression.","user":{"login":"thmiceli","id":10776478,"avatar_url":"https://avatars.githubusercontent.com/u/10776478?v=3","gravatar_id":"","url":"https://api.github.com/users/thmiceli","html_url":"https://github.com/thmiceli","followers_url":"https://api.github.com/users/thmiceli/followers","following_url":"https://api.github.com/users/thmiceli/following{/other_user}","gists_url":"https://api.github.com/users/thmiceli/gists{/gist_id}","starred_url":"https://api.github.com/users/thmiceli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thmiceli/subscriptions","organizations_url":"https://api.github.com/users/thmiceli/orgs","repos_url":"https://api.github.com/users/thmiceli/repos","events_url":"https://api.github.com/users/thmiceli/events{/privacy}","received_events_url":"https://api.github.com/users/thmiceli/received_events","type":"User","site_admin":false},"body":"This is a change to the one-line rule that fits the coding style standard at my work place.\r\nI don't think it is an uncommon pattern since it is the second company where I have seen this. So, here it is in case you want to integrate it in tslint in some way.\r\n\r\nFor an 'if', 'while' or 'for' statement when the expression spans over multiple lines it may be difficult to see where the expression ends. For example with an 'if' statement and a 4 space identation the expression and the 'then' statements are aligned. Example:\r\n\r\nif (cond1 &&\r\n    cond2 &&\r\n    cond3 &&) {\r\n    blah;\r\n}\r\n\r\nIn this situation it is desirable to tolerate the placement of the opening brace on a different line aligned with the start of the statement:\r\n\r\nif (cond1 &&\r\n    cond2 &&\r\n    cond3 &&) \r\n{\r\n    foo();\r\n}\n\n<!-- Reviewable:start -->\n[<img src=\"https://reviewable.io/review_button.png\" height=40 alt=\"Review on Reviewable\"/>](https://reviewable.io/reviews/palantir/tslint/335)\n<!-- Reviewable:end -->\n","created_at":"2015-02-24T22:27:15Z","updated_at":"2015-07-22T03:41:24Z","closed_at":"2015-07-22T03:41:24Z","merged_at":null,"merge_commit_sha":"a9d1767ef4737734640d0b5b7eebee2c32bb663d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/palantir/tslint/pulls/335/commits","review_comments_url":"https://api.github.com/repos/palantir/tslint/pulls/335/comments","review_comment_url":"https://api.github.com/repos/palantir/tslint/pulls/comments{/number}","comments_url":"https://api.github.com/repos/palantir/tslint/issues/335/comments","statuses_url":"https://api.github.com/repos/palantir/tslint/statuses/2f1924ab16a37e9d87c4b9e5091f68e990c8006b","head":{"label":"thmiceli:brace-placement","ref":"brace-placement","sha":"2f1924ab16a37e9d87c4b9e5091f68e990c8006b","user":{"login":"thmiceli","id":10776478,"avatar_url":"https://avatars.githubusercontent.com/u/10776478?v=3","gravatar_id":"","url":"https://api.github.com/users/thmiceli","html_url":"https://github.com/thmiceli","followers_url":"https://api.github.com/users/thmiceli/followers","following_url":"https://api.github.com/users/thmiceli/following{/other_user}","gists_url":"https://api.github.com/users/thmiceli/gists{/gist_id}","starred_url":"https://api.github.com/users/thmiceli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thmiceli/subscriptions","organizations_url":"https://api.github.com/users/thmiceli/orgs","repos_url":"https://api.github.com/users/thmiceli/repos","events_url":"https://api.github.com/users/thmiceli/events{/privacy}","received_events_url":"https://api.github.com/users/thmiceli/received_events","type":"User","site_admin":false},"repo":{"id":31221081,"name":"tslint","full_name":"thmiceli/tslint","owner":{"login":"thmiceli","id":10776478,"avatar_url":"https://avatars.githubusercontent.com/u/10776478?v=3","gravatar_id":"","url":"https://api.github.com/users/thmiceli","html_url":"https://github.com/thmiceli","followers_url":"https://api.github.com/users/thmiceli/followers","following_url":"https://api.github.com/users/thmiceli/following{/other_user}","gists_url":"https://api.github.com/users/thmiceli/gists{/gist_id}","starred_url":"https://api.github.com/users/thmiceli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thmiceli/subscriptions","organizations_url":"https://api.github.com/users/thmiceli/orgs","repos_url":"https://api.github.com/users/thmiceli/repos","events_url":"https://api.github.com/users/thmiceli/events{/privacy}","received_events_url":"https://api.github.com/users/thmiceli/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thmiceli/tslint","description":"A linter for the TypeScript language.","fork":true,"url":"https://api.github.com/repos/thmiceli/tslint","forks_url":"https://api.github.com/repos/thmiceli/tslint/forks","keys_url":"https://api.github.com/repos/thmiceli/tslint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thmiceli/tslint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thmiceli/tslint/teams","hooks_url":"https://api.github.com/repos/thmiceli/tslint/hooks","issue_events_url":"https://api.github.com/repos/thmiceli/tslint/issues/events{/number}","events_url":"https://api.github.com/repos/thmiceli/tslint/events","assignees_url":"https://api.github.com/repos/thmiceli/tslint/assignees{/user}","branches_url":"https://api.github.com/repos/thmiceli/tslint/branches{/branch}","tags_url":"https://api.github.com/repos/thmiceli/tslint/tags","blobs_url":"https://api.github.com/repos/thmiceli/tslint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thmiceli/tslint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thmiceli/tslint/git/refs{/sha}","trees_url":"https://api.github.com/repos/thmiceli/tslint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thmiceli/tslint/statuses/{sha}","languages_url":"https://api.github.com/repos/thmiceli/tslint/languages","stargazers_url":"https://api.github.com/repos/thmiceli/tslint/stargazers","contributors_url":"https://api.github.com/repos/thmiceli/tslint/contributors","subscribers_url":"https://api.github.com/repos/thmiceli/tslint/subscribers","subscription_url":"https://api.github.com/repos/thmiceli/tslint/subscription","commits_url":"https://api.github.com/repos/thmiceli/tslint/commits{/sha}","git_commits_url":"https://api.github.com/repos/thmiceli/tslint/git/commits{/sha}","comments_url":"https://api.github.com/repos/thmiceli/tslint/comments{/number}","issue_comment_url":"https://api.github.com/repos/thmiceli/tslint/issues/comments{/number}","contents_url":"https://api.github.com/repos/thmiceli/tslint/contents/{+path}","compare_url":"https://api.github.com/repos/thmiceli/tslint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thmiceli/tslint/merges","archive_url":"https://api.github.com/repos/thmiceli/tslint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thmiceli/tslint/downloads","issues_url":"https://api.github.com/repos/thmiceli/tslint/issues{/number}","pulls_url":"https://api.github.com/repos/thmiceli/tslint/pulls{/number}","milestones_url":"https://api.github.com/repos/thmiceli/tslint/milestones{/number}","notifications_url":"https://api.github.com/repos/thmiceli/tslint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thmiceli/tslint/labels{/name}","releases_url":"https://api.github.com/repos/thmiceli/tslint/releases{/id}","created_at":"2015-02-23T17:54:45Z","updated_at":"2015-02-23T18:04:33Z","pushed_at":"2015-03-09T17:23:27Z","git_url":"git://github.com/thmiceli/tslint.git","ssh_url":"git@github.com:thmiceli/tslint.git","clone_url":"https://github.com/thmiceli/tslint.git","svn_url":"https://github.com/thmiceli/tslint","homepage":null,"size":8464,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"palantir:master","ref":"master","sha":"799649153a5dd2fd86a6ed31eee262a29914cbbf","user":{"login":"palantir","id":303157,"avatar_url":"https://avatars.githubusercontent.com/u/303157?v=3","gravatar_id":"","url":"https://api.github.com/users/palantir","html_url":"https://github.com/palantir","followers_url":"https://api.github.com/users/palantir/followers","following_url":"https://api.github.com/users/palantir/following{/other_user}","gists_url":"https://api.github.com/users/palantir/gists{/gist_id}","starred_url":"https://api.github.com/users/palantir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palantir/subscriptions","organizations_url":"https://api.github.com/users/palantir/orgs","repos_url":"https://api.github.com/users/palantir/repos","events_url":"https://api.github.com/users/palantir/events{/privacy}","received_events_url":"https://api.github.com/users/palantir/received_events","type":"Organization","site_admin":false},"repo":{"id":11672345,"name":"tslint","full_name":"palantir/tslint","owner":{"login":"palantir","id":303157,"avatar_url":"https://avatars.githubusercontent.com/u/303157?v=3","gravatar_id":"","url":"https://api.github.com/users/palantir","html_url":"https://github.com/palantir","followers_url":"https://api.github.com/users/palantir/followers","following_url":"https://api.github.com/users/palantir/following{/other_user}","gists_url":"https://api.github.com/users/palantir/gists{/gist_id}","starred_url":"https://api.github.com/users/palantir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palantir/subscriptions","organizations_url":"https://api.github.com/users/palantir/orgs","repos_url":"https://api.github.com/users/palantir/repos","events_url":"https://api.github.com/users/palantir/events{/privacy}","received_events_url":"https://api.github.com/users/palantir/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/palantir/tslint","description":"A linter for the TypeScript language.","fork":false,"url":"https://api.github.com/repos/palantir/tslint","forks_url":"https://api.github.com/repos/palantir/tslint/forks","keys_url":"https://api.github.com/repos/palantir/tslint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/palantir/tslint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/palantir/tslint/teams","hooks_url":"https://api.github.com/repos/palantir/tslint/hooks","issue_events_url":"https://api.github.com/repos/palantir/tslint/issues/events{/number}","events_url":"https://api.github.com/repos/palantir/tslint/events","assignees_url":"https://api.github.com/repos/palantir/tslint/assignees{/user}","branches_url":"https://api.github.com/repos/palantir/tslint/branches{/branch}","tags_url":"https://api.github.com/repos/palantir/tslint/tags","blobs_url":"https://api.github.com/repos/palantir/tslint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/palantir/tslint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/palantir/tslint/git/refs{/sha}","trees_url":"https://api.github.com/repos/palantir/tslint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/palantir/tslint/statuses/{sha}","languages_url":"https://api.github.com/repos/palantir/tslint/languages","stargazers_url":"https://api.github.com/repos/palantir/tslint/stargazers","contributors_url":"https://api.github.com/repos/palantir/tslint/contributors","subscribers_url":"https://api.github.com/repos/palantir/tslint/subscribers","subscription_url":"https://api.github.com/repos/palantir/tslint/subscription","commits_url":"https://api.github.com/repos/palantir/tslint/commits{/sha}","git_commits_url":"https://api.github.com/repos/palantir/tslint/git/commits{/sha}","comments_url":"https://api.github.com/repos/palantir/tslint/comments{/number}","issue_comment_url":"https://api.github.com/repos/palantir/tslint/issues/comments{/number}","contents_url":"https://api.github.com/repos/palantir/tslint/contents/{+path}","compare_url":"https://api.github.com/repos/palantir/tslint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/palantir/tslint/merges","archive_url":"https://api.github.com/repos/palantir/tslint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/palantir/tslint/downloads","issues_url":"https://api.github.com/repos/palantir/tslint/issues{/number}","pulls_url":"https://api.github.com/repos/palantir/tslint/pulls{/number}","milestones_url":"https://api.github.com/repos/palantir/tslint/milestones{/number}","notifications_url":"https://api.github.com/repos/palantir/tslint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/palantir/tslint/labels{/name}","releases_url":"https://api.github.com/repos/palantir/tslint/releases{/id}","created_at":"2013-07-25T22:19:18Z","updated_at":"2015-07-21T12:43:16Z","pushed_at":"2015-07-21T03:33:00Z","git_url":"git://github.com/palantir/tslint.git","ssh_url":"git@github.com:palantir/tslint.git","clone_url":"https://github.com/palantir/tslint.git","svn_url":"https://github.com/palantir/tslint","homepage":null,"size":11864,"stargazers_count":303,"watchers_count":303,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":78,"mirror_url":null,"open_issues_count":74,"forks":78,"open_issues":74,"watchers":303,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/palantir/tslint/pulls/335"},"html":{"href":"https://github.com/palantir/tslint/pull/335"},"issue":{"href":"https://api.github.com/repos/palantir/tslint/issues/335"},"comments":{"href":"https://api.github.com/repos/palantir/tslint/issues/335/comments"},"review_comments":{"href":"https://api.github.com/repos/palantir/tslint/pulls/335/comments"},"review_comment":{"href":"https://api.github.com/repos/palantir/tslint/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/palantir/tslint/pulls/335/commits"},"statuses":{"href":"https://api.github.com/repos/palantir/tslint/statuses/2f1924ab16a37e9d87c4b9e5091f68e990c8006b"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":2,"review_comments":0,"commits":1,"additions":89,"deletions":7,"changed_files":3}}