Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

misplaced opening brace for long class definitions #637

Closed
pgrm opened this issue Sep 4, 2015 · 2 comments
Closed

misplaced opening brace for long class definitions #637

pgrm opened this issue Sep 4, 2015 · 2 comments

Comments

@pgrm
Copy link

pgrm commented Sep 4, 2015

If I have long class definitions over 2 lines, I get the misplaced opening brace error even though I think I shouldn't. Here an example:

export class LongDescriptiveClassName<T extends ISomeInterface<number>, S>
    extends SomeAbstractBaseClass<T, S> implements IImportantInterface<T, S> {
    // class implementation
}

The opening brace isn't in the first line, so the error is technically correct, but it's in the same line, where the definition ends.

@jkillian
Copy link
Contributor

jkillian commented Sep 4, 2015

Thanks for the bug report, agree this could be improved. For now, I'd just disable the rule in that one spot:

// tslint:disable:one-line 
export class LongDescriptiveClassName<T extends ISomeInterface<number>, S>
    extends SomeAbstractBaseClass<T, S> implements IImportantInterface<T, S> {
    // tslint:enable:one-line
}

@pgrm
Copy link
Author

pgrm commented Sep 5, 2015

that was quick, thx 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants