{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/4575","labels_url":"https://api.github.com/repos/eslint/eslint/issues/4575/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/4575/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/4575/events","html_url":"https://github.com/eslint/eslint/issues/4575","id":119436844,"number":4575,"title":"space-before-function-paren.js:67 / TypeError: Cannot read property 'value' of undefined","user":{"login":"balupton","id":61148,"avatar_url":"https://avatars.githubusercontent.com/u/61148?v=3","gravatar_id":"","url":"https://api.github.com/users/balupton","html_url":"https://github.com/balupton","followers_url":"https://api.github.com/users/balupton/followers","following_url":"https://api.github.com/users/balupton/following{/other_user}","gists_url":"https://api.github.com/users/balupton/gists{/gist_id}","starred_url":"https://api.github.com/users/balupton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balupton/subscriptions","organizations_url":"https://api.github.com/users/balupton/orgs","repos_url":"https://api.github.com/users/balupton/repos","events_url":"https://api.github.com/users/balupton/events{/privacy}","received_events_url":"https://api.github.com/users/balupton/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":2,"created_at":"2015-11-30T07:45:23Z","updated_at":"2015-11-30T07:56:34Z","closed_at":null,"body":"**What version are you using?**\r\n\r\n```\r\n15:41:27:balupton@balmac.lan:/Users/balupton/Projects/active/projectz:master\r\n$ /Users/balupton/Projects/active/projectz/node_modules/.bin/eslint --version\r\nv1.10.2\r\n```\r\n\r\nUsing `\"babel-eslint\": \"^5.0.0-beta4\",`\r\n\r\n**What did you do?**\r\n\r\nRule file:\r\nhttps://github.com/bevry/base/blob/68cbd95f76eedfc183e59db1c3d8f63728a9a8aa/.eslintrc.js\r\n\r\nFile in question:\r\nhttps://github.com/bevry/projectz/blob/d2fc8ba9705d80d798670d7b1df4a45a484dc198/esnext/lib/person.js\r\n\r\n```\r\n15:42:29:balupton@balmac.lan:/Users/balupton/Projects/active/projectz:master\r\n$ /Users/balupton/Projects/active/projectz/node_modules/.bin/eslint esnext/lib/person.js \r\n/Users/balupton/Projects/active/projectz/node_modules/eslint/lib/rules/space-before-function-paren.js:67\r\n        while (rightToken.value !== \"(\") {\r\n                         ^\r\n\r\nTypeError: Cannot read property 'value' of undefined\r\n    at EventEmitter.validateSpacingBeforeParentheses (/Users/balupton/Projects/active/projectz/node_modules/eslint/lib/rules/space-before-function-paren.js:67:26)\r\n    at emitOne (events.js:82:20)\r\n    at EventEmitter.emit (events.js:169:7)\r\n    at NodeEventGenerator.enterNode (/Users/balupton/Projects/active/projectz/node_modules/eslint/lib/util/node-event-generator.js:42:22)\r\n    at CommentEventGenerator.enterNode (/Users/balupton/Projects/active/projectz/node_modules/eslint/lib/util/comment-event-generator.js:98:23)\r\n    at Controller.controller.traverse.enter (/Users/balupton/Projects/active/projectz/node_modules/eslint/lib/eslint.js:767:36)\r\n    at Controller.__execute (/Users/balupton/Projects/active/projectz/node_modules/estraverse/estraverse.js:397:31)\r\n    at Controller.traverse (/Users/balupton/Projects/active/projectz/node_modules/estraverse/estraverse.js:495:28)\r\n    at EventEmitter.module.exports.api.verify (/Users/balupton/Projects/active/projectz/node_modules/eslint/lib/eslint.js:764:24)\r\n    at processText (/Users/balupton/Projects/active/projectz/node_modules/eslint/lib/cli-engine.js:230:27)\r\n```\r\n\r\nCommenting out the failed rule provides:\r\n\r\n```\r\n$ /Users/balupton/Projects/active/projectz/node_modules/.bin/eslint esnext/lib/person.js \r\n/Users/balupton/Projects/active/projectz/node_modules/eslint/lib/rules/space-before-keywords.js:187\r\n            if (right.type !== \"Keyword\") {\r\n                     ^\r\n\r\nTypeError: Cannot read property 'type' of undefined\r\n    at EventEmitter.FunctionExpression (/Users/balupton/Projects/active/projectz/node_modules/eslint/lib/rules/space-before-keywords.js:187:22)\r\n    at emitOne (events.js:82:20)\r\n    at EventEmitter.emit (events.js:169:7)\r\n    at NodeEventGenerator.enterNode (/Users/balupton/Projects/active/projectz/node_modules/eslint/lib/util/node-event-generator.js:42:22)\r\n    at CommentEventGenerator.enterNode (/Users/balupton/Projects/active/projectz/node_modules/eslint/lib/util/comment-event-generator.js:98:23)\r\n    at Controller.controller.traverse.enter (/Users/balupton/Projects/active/projectz/node_modules/eslint/lib/eslint.js:767:36)\r\n    at Controller.__execute (/Users/balupton/Projects/active/projectz/node_modules/estraverse/estraverse.js:397:31)\r\n    at Controller.traverse (/Users/balupton/Projects/active/projectz/node_modules/estraverse/estraverse.js:495:28)\r\n    at EventEmitter.module.exports.api.verify (/Users/balupton/Projects/active/projectz/node_modules/eslint/lib/eslint.js:764:24)\r\n    at processText (/Users/balupton/Projects/active/projectz/node_modules/eslint/lib/cli-engine.js:230:27)\r\n15:49:57:balupton@balmac.lan:/Users/balupton/Projects/active/projectz:master\r\n```\r\n\r\nCommenting out the failed rule provides:\r\n\r\n```\r\n$ /Users/balupton/Projects/active/projectz/node_modules/.bin/eslint esnext/lib/person.js \r\n/Users/balupton/Projects/active/projectz/node_modules/eslint/lib/rules/indent.js:175\r\n        var src = context.getSource(token, token.loc.start.column);\r\n                                                ^\r\n\r\nTypeError: Cannot read property 'loc' of undefined\r\n    at getNodeIndent (/Users/balupton/Projects/active/projectz/node_modules/eslint/lib/rules/indent.js:175:49)\r\n    at checkIndentInFunctionBlock (/Users/balupton/Projects/active/projectz/node_modules/eslint/lib/rules/indent.js:327:22)\r\n    at EventEmitter.blockIndentationCheck (/Users/balupton/Projects/active/projectz/node_modules/eslint/lib/rules/indent.js:493:13)\r\n    at emitOne (events.js:82:20)\r\n    at EventEmitter.emit (events.js:169:7)\r\n    at NodeEventGenerator.enterNode (/Users/balupton/Projects/active/projectz/node_modules/eslint/lib/util/node-event-generator.js:42:22)\r\n    at CommentEventGenerator.enterNode (/Users/balupton/Projects/active/projectz/node_modules/eslint/lib/util/comment-event-generator.js:98:23)\r\n    at Controller.controller.traverse.enter (/Users/balupton/Projects/active/projectz/node_modules/eslint/lib/eslint.js:767:36)\r\n    at Controller.__execute (/Users/balupton/Projects/active/projectz/node_modules/estraverse/estraverse.js:397:31)\r\n    at Controller.traverse (/Users/balupton/Projects/active/projectz/node_modules/estraverse/estraverse.js:495:28)\r\n```\r\n\r\nStill fails with:\r\n\r\n``` javascript\r\nclass Person {\r\n\tset a (v) { }\r\n}\r\n```\r\n\r\nDoesn't fail with:\r\n\r\n```\r\nclass Person { }\r\n```\r\n\r\n**What happened?**\r\n\r\nIt threw an error that doesn't help me in understanding what went wrong.\r\n\r\n**What did you expect to happen?**\r\n\r\nExpected it to run successfully or tell me where and why the rule failed."},"comment":{"url":"https://api.github.com/repos/eslint/eslint/issues/comments/160548367","html_url":"https://github.com/eslint/eslint/issues/4575#issuecomment-160548367","issue_url":"https://api.github.com/repos/eslint/eslint/issues/4575","id":160548367,"user":{"login":"balupton","id":61148,"avatar_url":"https://avatars.githubusercontent.com/u/61148?v=3","gravatar_id":"","url":"https://api.github.com/users/balupton","html_url":"https://github.com/balupton","followers_url":"https://api.github.com/users/balupton/followers","following_url":"https://api.github.com/users/balupton/following{/other_user}","gists_url":"https://api.github.com/users/balupton/gists{/gist_id}","starred_url":"https://api.github.com/users/balupton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balupton/subscriptions","organizations_url":"https://api.github.com/users/balupton/orgs","repos_url":"https://api.github.com/users/balupton/repos","events_url":"https://api.github.com/users/balupton/events{/privacy}","received_events_url":"https://api.github.com/users/balupton/received_events","type":"User","site_admin":false},"created_at":"2015-11-30T07:56:34Z","updated_at":"2015-11-30T07:56:34Z","body":"Downgrading to `\"babel-eslint\": \"^4.1.6\",` appears to work. Will cross-post."}}