{"action":"created","issue":{"url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1955","labels_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1955/labels{/name}","comments_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1955/comments","events_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1955/events","html_url":"https://github.com/jscs-dev/node-jscs/issues/1955","id":114771703,"number":1955,"title":"new rule \"requireSpacesInGenerator\" not working as expected","user":{"login":"AuthorProxy","id":1407631,"avatar_url":"https://avatars.githubusercontent.com/u/1407631?v=3","gravatar_id":"","url":"https://api.github.com/users/AuthorProxy","html_url":"https://github.com/AuthorProxy","followers_url":"https://api.github.com/users/AuthorProxy/followers","following_url":"https://api.github.com/users/AuthorProxy/following{/other_user}","gists_url":"https://api.github.com/users/AuthorProxy/gists{/gist_id}","starred_url":"https://api.github.com/users/AuthorProxy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AuthorProxy/subscriptions","organizations_url":"https://api.github.com/users/AuthorProxy/orgs","repos_url":"https://api.github.com/users/AuthorProxy/repos","events_url":"https://api.github.com/users/AuthorProxy/events{/privacy}","received_events_url":"https://api.github.com/users/AuthorProxy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jscs-dev/node-jscs/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-11-03T09:03:43Z","updated_at":"2015-11-06T10:44:28Z","closed_at":null,"body":"Using sublime node-jscs 2.5.0\r\n\r\n```\r\nfunction* populateWithEmptyZones( usedTimezones) {\r\n    let zoneHours = [...new Array(24)].map((x, y) => y - 11);\r\n\r\n    for (let i of zoneHours) {\r\n      let usedTimezone =\r\n        usedTimezones.find(entry => entry.utcshift === i) ||\r\n        Object.assign({ utcshift: i }, defaultZone);\r\n\r\n      usedTimezone.utcshift = usedTimezone.utcshift > 0 ? `+${usedTimezone.utcshift}` : usedTimezone.utcshift;\r\n      yield usedTimezone;\r\n    }\r\n  }\r\n```\r\n\r\n\r\nGetting this in console:\r\n\r\n```\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<checkstyle version=\"4.3\">\r\n    <file name=\"c:\\users\\a5aa5~1.kos\\appdata\\local\\temp\\SublimeLinter3-a.kostukov\\details.js\">\r\n        <error line=\"1\" column=\"1\" severity=\"error\" message=\"internalError: Error running rule disallowUnusedParams: This is an issue with JSCS and not your codebase.\r\nPlease file an issue (with the stack trace below) at: https://github.com/jscs-dev/node-jscs/issues/new\r\nRangeError: Maximum call stack size exceeded\r\n    at keys (native)\r\n    at Referencer.Visitor.visitChildren (C:\\Users\\a.kostukov\\AppData\\Roaming\\npm\\node_modules\\jscs\\node_modules\\escope\\node_modules\\esrecurse\\esrecurse.js:78:24)\r\n    at Referencer.Visitor.visit (C:\\Users\\a.kostukov\\AppData\\Roaming\\npm\\node_modules\\jscs\\node_modules\\escope\\node_modules\\esrecurse\\esrecurse.js:112:14)\r\n    at Referencer.Visitor.visitChildren (C:\\Users\\a.kostukov\\AppData\\Roaming\\npm\\node_modules\\jscs\\node_modules\\escope\\node_modules\\esrecurse\\esrecurse.js:93:26)\r\n    at Referencer.Visitor.visit (C:\\Users\\a.kostukov\\AppData\\Roaming\\npm\\node_modules\\jscs\\node_modules\\escope\\node_modules\\esrecurse\\esrecurse.js:112:14)\r\n    at Referencer.Visitor.visitChildren (C:\\Users\\a.kostukov\\AppData\\Roaming\\npm\\node_modules\\jscs\\node_modules\\escope\\node_modules\\esrecurse\\esrecurse.js:93:26)\r\n    at Referencer.Visitor.visit (C:\\Users\\a.kostukov\\AppData\\Roaming\\npm\\node_modules\\jscs\\node_modules\\escope\\node_modules\\esrecurse\\esrecurse.js:112:14)\r\n    at Referencer.Visitor.visitChildren (C:\\Users\\a.kostukov\\AppData\\Roaming\\npm\\node_modules\\jscs\\node_modules\\escope\\node_modules\\esrecurse\\esrecurse.js:93:26)\r\n    at Referencer.Visitor.visit (C:\\Users\\a.kostukov\\AppData\\Roaming\\npm\\node_modules\\jscs\\node_modules\\escope\\node_modules\\esrecurse\\esrecurse.js:112:14)\r\n    at Referencer.Visitor.visitChildren (C:\\Users\\a.kostukov\\AppData\\Roaming\\npm\\node_modules\\jscs\\node_modules\\escope\\node_modules\\esrecurse\\esrecurse.js:93:26)\" source=\"jscs\" />\r\n        <error line=\"25\" column=\"36\" severity=\"error\" message=\"disallowSpacesInsideParentheses: Illegal space after opening round bracket\" source=\"jscs\" />\r\n    </file>\r\n</checkstyle> \r\n```\r\n\r\nthen after I use jscs autoformatter, it removes a space after first parenth (before usedTimezones param):\r\n```\r\nfunction* populateWithEmptyZones(usedTimezones) {\r\n```\r\n\r\nand notify me about new error:\r\n```\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<checkstyle version=\"4.3\">\r\n    <file name=\"c:\\users\\a5aa5~1.kos\\appdata\\local\\temp\\SublimeLinter3-a.kostukov\\details.js\">\r\n        <error line=\"1\" column=\"1\" severity=\"error\" message=\"internalError: Error running rule disallowUnusedParams: This is an issue with JSCS and not your codebase.\r\nPlease file an issue (with the stack trace below) at: https://github.com/jscs-dev/node-jscs/issues/new\r\nRangeError: Maximum call stack size exceeded\r\n    at keys (native)\r\n    at Referencer.Visitor.visitChildren (C:\\Users\\a.kostukov\\AppData\\Roaming\\npm\\node_modules\\jscs\\node_modules\\escope\\node_modules\\esrecurse\\esrecurse.js:78:24)\r\n    at Referencer.Visitor.visit (C:\\Users\\a.kostukov\\AppData\\Roaming\\npm\\node_modules\\jscs\\node_modules\\escope\\node_modules\\esrecurse\\esrecurse.js:112:14)\r\n    at Referencer.Visitor.visitChildren (C:\\Users\\a.kostukov\\AppData\\Roaming\\npm\\node_modules\\jscs\\node_modules\\escope\\node_modules\\esrecurse\\esrecurse.js:93:26)\r\n    at Referencer.Visitor.visit (C:\\Users\\a.kostukov\\AppData\\Roaming\\npm\\node_modules\\jscs\\node_modules\\escope\\node_modules\\esrecurse\\esrecurse.js:112:14)\r\n    at Referencer.Visitor.visitChildren (C:\\Users\\a.kostukov\\AppData\\Roaming\\npm\\node_modules\\jscs\\node_modules\\escope\\node_modules\\esrecurse\\esrecurse.js:93:26)\r\n    at Referencer.Visitor.visit (C:\\Users\\a.kostukov\\AppData\\Roaming\\npm\\node_modules\\jscs\\node_modules\\escope\\node_modules\\esrecurse\\esrecurse.js:112:14)\r\n    at Referencer.Visitor.visitChildren (C:\\Users\\a.kostukov\\AppData\\Roaming\\npm\\node_modules\\jscs\\node_modules\\escope\\node_modules\\esrecurse\\esrecurse.js:93:26)\r\n    at Referencer.Visitor.visit (C:\\Users\\a.kostukov\\AppData\\Roaming\\npm\\node_modules\\jscs\\node_modules\\escope\\node_modules\\esrecurse\\esrecurse.js:112:14)\r\n    at Referencer.Visitor.visitChildren (C:\\Users\\a.kostukov\\AppData\\Roaming\\npm\\node_modules\\jscs\\node_modules\\escope\\node_modules\\esrecurse\\esrecurse.js:93:26)\" source=\"jscs\" />\r\n        <error line=\"25\" column=\"36\" severity=\"error\" message=\"requireSpacesInGenerator: Missing space after star\" source=\"jscs\" />\r\n    </file>\r\n</checkstyle> \r\n```\r\n\r\nAnd if I again use autoformatter it put a space back as before:\r\n```\r\nfunction* populateWithEmptyZones( usedTimezones) {\r\n```\r\n\r\nand so on..\r\n\r\nMy config params:\r\n```\r\n\"disallowSpacesInsideParentheses\": true,\r\n\"requireSpaceBetweenArguments\": true,\r\n\"requireSpacesInGenerator\": {\r\n    \"afterStar\": true\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/27921371-new-rule-requirespacesingenerator-not-working-as-expected?utm_campaign=plugin&utm_content=tracker%2F281640&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F281640&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/comments/154376639","html_url":"https://github.com/jscs-dev/node-jscs/issues/1955#issuecomment-154376639","issue_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1955","id":154376639,"user":{"login":"hzoo","id":588473,"avatar_url":"https://avatars.githubusercontent.com/u/588473?v=3","gravatar_id":"","url":"https://api.github.com/users/hzoo","html_url":"https://github.com/hzoo","followers_url":"https://api.github.com/users/hzoo/followers","following_url":"https://api.github.com/users/hzoo/following{/other_user}","gists_url":"https://api.github.com/users/hzoo/gists{/gist_id}","starred_url":"https://api.github.com/users/hzoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hzoo/subscriptions","organizations_url":"https://api.github.com/users/hzoo/orgs","repos_url":"https://api.github.com/users/hzoo/repos","events_url":"https://api.github.com/users/hzoo/events{/privacy}","received_events_url":"https://api.github.com/users/hzoo/received_events","type":"User","site_admin":false},"created_at":"2015-11-06T10:44:28Z","updated_at":"2015-11-06T10:44:28Z","body":"No I have the PR for requireSpacesInGenerator since it's a bug - see if that works for you. "}}