{"action":"created","issue":{"url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1410","labels_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1410/labels{/name}","comments_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1410/comments","events_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1410/events","html_url":"https://github.com/jscs-dev/node-jscs/pull/1410","id":82180162,"number":1410,"title":"disallowCommaBeforeLineBreak: added ignoreFunction, lineBreak options","user":{"login":"dreef3","id":1104138,"avatar_url":"https://avatars.githubusercontent.com/u/1104138?v=3","gravatar_id":"","url":"https://api.github.com/users/dreef3","html_url":"https://github.com/dreef3","followers_url":"https://api.github.com/users/dreef3/followers","following_url":"https://api.github.com/users/dreef3/following{/other_user}","gists_url":"https://api.github.com/users/dreef3/gists{/gist_id}","starred_url":"https://api.github.com/users/dreef3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dreef3/subscriptions","organizations_url":"https://api.github.com/users/dreef3/orgs","repos_url":"https://api.github.com/users/dreef3/repos","events_url":"https://api.github.com/users/dreef3/events{/privacy}","received_events_url":"https://api.github.com/users/dreef3/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-29T00:05:01Z","updated_at":"2015-06-05T17:27:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/1410","html_url":"https://github.com/jscs-dev/node-jscs/pull/1410","diff_url":"https://github.com/jscs-dev/node-jscs/pull/1410.diff","patch_url":"https://github.com/jscs-dev/node-jscs/pull/1410.patch"},"body":"Hi,\r\n\r\nI needed to handle two corner cases in my project with disallowCommaBeforeLineBreak rule:\r\n1. I wanted to have a line break before comma only in simple objects without methods\r\n2. Fixed version would place a comma and both tokens before and after it on a single line while I wanted to have comma at the beginning of the next line\r\n\r\nSo I've added two options to the rule:\r\n```javascript\r\n{\r\n    mode: [\"all\", \"ignoreFunction\"],\r\n    lineBreak: [\"none\", \"beforeComma\"]\r\n}\r\n```\r\n\r\nBy default the rule would behave the same way as before (that is, accept `true` instead of options). Example for beforeComma:\r\n*Invalid:*\r\n```javascript\r\nvar y = { three: 3, four: 4};\r\n```\r\n*Valid:*\r\n```javascript\r\nvar y = {\r\n    three: 3\r\n    , four: 4\r\n};\r\n```"},"comment":{"url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/comments/109370209","html_url":"https://github.com/jscs-dev/node-jscs/pull/1410#issuecomment-109370209","issue_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1410","id":109370209,"user":{"login":"dreef3","id":1104138,"avatar_url":"https://avatars.githubusercontent.com/u/1104138?v=3","gravatar_id":"","url":"https://api.github.com/users/dreef3","html_url":"https://github.com/dreef3","followers_url":"https://api.github.com/users/dreef3/followers","following_url":"https://api.github.com/users/dreef3/following{/other_user}","gists_url":"https://api.github.com/users/dreef3/gists{/gist_id}","starred_url":"https://api.github.com/users/dreef3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dreef3/subscriptions","organizations_url":"https://api.github.com/users/dreef3/orgs","repos_url":"https://api.github.com/users/dreef3/repos","events_url":"https://api.github.com/users/dreef3/events{/privacy}","received_events_url":"https://api.github.com/users/dreef3/received_events","type":"User","site_admin":false},"created_at":"2015-06-05T17:27:39Z","updated_at":"2015-06-05T17:27:39Z","body":"Updated to use `allExcept`."}}