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.

Class body has invalid range that breaks brace-style rule #152

Closed
@soda0289

Description

@soda0289

I noticed on the newer version of eslint (3.14) that the brace style rule fails on exported classes. The opening brace variable used in the rule is incorrect since it is pointing to the identifier 'hello'. I believe the class body node's range is wrong and is still including the identifier. Have not tested on typescript 2.0.3. Will try and submit pr with fix.

What version of TypeScript are you using?
2.1.3

What version of typescript-eslint-parser are you using?
ts-2.1

What code were you trying to parse?

export class hello {

    hello () {

    }
}

What did you expect to happen?
Should parse correctly with brace-style 1tbs

What happened?
Failed with error:
2:14 error Statement inside of curly braces should be on next line brace-style

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