{"action":"created","issue":{"url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/579","labels_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/579/labels{/name}","comments_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/579/comments","events_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/579/events","html_url":"https://github.com/jscs-dev/node-jscs/pull/579","id":40691989,"number":579,"title":"Update requireMultipleVarDecl rule to support one var per declaration","user":{"login":"kilemensi","id":1779590,"avatar_url":"https://avatars.githubusercontent.com/u/1779590?v=3","gravatar_id":"","url":"https://api.github.com/users/kilemensi","html_url":"https://github.com/kilemensi","followers_url":"https://api.github.com/users/kilemensi/followers","following_url":"https://api.github.com/users/kilemensi/following{/other_user}","gists_url":"https://api.github.com/users/kilemensi/gists{/gist_id}","starred_url":"https://api.github.com/users/kilemensi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kilemensi/subscriptions","organizations_url":"https://api.github.com/users/kilemensi/orgs","repos_url":"https://api.github.com/users/kilemensi/repos","events_url":"https://api.github.com/users/kilemensi/events{/privacy}","received_events_url":"https://api.github.com/users/kilemensi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jscs-dev/node-jscs/labels/new%20rule%20value","name":"new rule value","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2014-08-20T12:14:03Z","updated_at":"2015-06-11T15:34:41Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/579","html_url":"https://github.com/jscs-dev/node-jscs/pull/579","diff_url":"https://github.com/jscs-dev/node-jscs/pull/579.diff","patch_url":"https://github.com/jscs-dev/node-jscs/pull/579.patch"},"body":"`requireMultipleVarDecl` only supported one `var` per function scope and\r\nconsecutive `var` checks. It was not possible to check that each declaration\r\nstatement had it's own `var` terminated by a semicolon such as in the Felix's Node.js Style Guide. [Example.](Seravo/js-winning-style/blob/master/README.md#variable-declarations)\r\n\r\nThis means the original `requireMultipleVarDecl` option of boolean true for\r\nconsectutive `var` check is now changed to a string type aptly named\r\n`\"nonconsecutive\"`, and a new option of `\"onedecl\"` is introduced for the new\r\ncheck.\r\n\r\nWith\r\n```js\r\n\"requireMultipleVarDecl\": \"onedecl\"\r\n```\r\nthe variable declaration style of\r\n```js\r\nvar x = 1;\r\nvar y = 2; var z = 3;\r\n```\r\nwill pass the style checks while that of\r\n```js\r\nvar x = 1,\r\n    y = 2;\r\n```\r\nwill fail."},"comment":{"url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/comments/111175154","html_url":"https://github.com/jscs-dev/node-jscs/pull/579#issuecomment-111175154","issue_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/579","id":111175154,"user":{"login":"markelog","id":945528,"avatar_url":"https://avatars.githubusercontent.com/u/945528?v=3","gravatar_id":"","url":"https://api.github.com/users/markelog","html_url":"https://github.com/markelog","followers_url":"https://api.github.com/users/markelog/followers","following_url":"https://api.github.com/users/markelog/following{/other_user}","gists_url":"https://api.github.com/users/markelog/gists{/gist_id}","starred_url":"https://api.github.com/users/markelog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markelog/subscriptions","organizations_url":"https://api.github.com/users/markelog/orgs","repos_url":"https://api.github.com/users/markelog/repos","events_url":"https://api.github.com/users/markelog/events{/privacy}","received_events_url":"https://api.github.com/users/markelog/received_events","type":"User","site_admin":false},"created_at":"2015-06-11T15:34:41Z","updated_at":"2015-06-11T15:34:41Z","body":"Could you also add docs for this?"}}