Closed pburkindine closed 5 years ago
@chinchiheather Is there any update on this?
Hi @pburkindine , sorry I've been a bit MIA the last few months, I'll have a look into it, shouldn't be too difficult to fix I think
I have implemented the fix and released 1.3.2
@chinchiheather Thanks, it's much improved! However I'm still seeing the issue in some scenarios involving generics:
Prettier breaks a generic type param onto its own line:
export class VeryVeryVeryVeryLongClassName extends VeryVerVeryLongBaseClassName<
SomeType
> {
constructor() {
super('foo);
}
Generic-typed interface split across lines:
class VeryVeryVeryVeryLongClassName
implements VeryVeryVeryVeryLongInterface<SomeType> {
constructor() {}
Nested generic:
export abstract class VeryVeryVeryVeryLongClassName<
T extends Model<T>
> extends VeryVerVeryLongBaseClassName<T> {
constructor() {
super('foo);
}
When prettier cleans up a class declaration to span multiple lines (or if you do so manually), the rule will decide here that constructor is missing a leading blank line (which, unfortunately, prettier will then remove)