{"action":"opened","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/4520","labels_url":"https://api.github.com/repos/eslint/eslint/issues/4520/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/4520/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/4520/events","html_url":"https://github.com/eslint/eslint/issues/4520","id":118301734,"number":4520,"title":"brace-style for object literal in if-else","user":{"login":"andy-hanson","id":5387404,"avatar_url":"https://avatars.githubusercontent.com/u/5387404?v=3","gravatar_id":"","url":"https://api.github.com/users/andy-hanson","html_url":"https://github.com/andy-hanson","followers_url":"https://api.github.com/users/andy-hanson/followers","following_url":"https://api.github.com/users/andy-hanson/following{/other_user}","gists_url":"https://api.github.com/users/andy-hanson/gists{/gist_id}","starred_url":"https://api.github.com/users/andy-hanson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andy-hanson/subscriptions","organizations_url":"https://api.github.com/users/andy-hanson/orgs","repos_url":"https://api.github.com/users/andy-hanson/repos","events_url":"https://api.github.com/users/andy-hanson/events{/privacy}","received_events_url":"https://api.github.com/users/andy-hanson/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":1,"created_at":"2015-11-23T00:40:39Z","updated_at":"2015-11-23T00:40:39Z","closed_at":null,"body":"Here's the code I'm linting:\r\n\r\n\tfunction f() {\r\n\t\tif (true)\r\n\t\t\treturn {x: 1}\r\n\t\telse {\r\n\t\t\tvar y = 2\r\n\t\t\treturn y\r\n\t\t}\r\n\t}\r\n\r\nHere's my package.json:\r\n\r\n\t{\r\n\t\t\"scripts\": {\r\n\t\t\t\"lint\": \"eslint src\"\r\n\t\t},\r\n\t\t\"devDependencies\": {\r\n\t\t\t\"eslint\": \"1.10.1\"\r\n\t\t},\r\n\t\t\"eslintConfig\": {\r\n\t\t\t\"rules\": {\r\n\t\t\t\t\"brace-style\": 1\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\nI get the following output:\r\n\r\n\t/home/andy/git/ESLINT/src/foo.js\r\n\t  4:7  warning  Closing curly brace does not appear on the same line as the subsequent block  brace-style\r\n\r\nThis shouldn't be considered an error because the closing brace is for the object literal, not for `if`.\r\n"}}