Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

TypeError: Cannot read property 'value' of undefined - When parsing with rule space-before-function-paren #123

Closed
@soda0289

Description

@soda0289

What version of TypeScript are you using?
2.0.10

What version of typescript-eslint-parser are you using?
1.0.0

What code were you trying to parse?

export class Example {
    render () {
    }
}

What did you expect to happen?
It should pass validation

What happened?
Uncaught Exception

Cannot read property 'value' of undefined
TypeError: Cannot read property 'value' of undefined
    at EventEmitter.validateSpacingBeforeParentheses (/usr/lib/node_modules/eslint/lib/rules/space-before-function-paren.js:128:30)
    at emitOne (events.js:82:20)
    at EventEmitter.emit (events.js:169:7)
    at NodeEventGenerator.enterNode (/usr/lib/node_modules/eslint/lib/util/node-event-generator.js:40:22)
    at CodePathAnalyzer.enterNode (/usr/lib/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:608:23)
    at CommentEventGenerator.enterNode (/usr/lib/node_modules/eslint/lib/util/comment-event-generator.js:97:23)
    at Controller.enter (/usr/lib/node_modules/eslint/lib/eslint.js:925:36)
    at Controller.__execute (/usr/lib/node_modules/eslint/node_modules/estraverse/estraverse.js:397:31)
    at Controller.traverse (/usr/lib/node_modules/eslint/node_modules/estraverse/estraverse.js:501:28)
    at Controller.Traverser.controller.traverse (/usr/lib/node_modules/eslint/lib/util/traverser.js:36:33)

Eslint file

{
    "parser": "typescript-eslint-parser",
    "rules": {
        "space-before-function-paren": [
            "error",
            "always"
        ]
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions