Skip to content

Ugly formatting for interface extends with long type parameters #8941

@sosukesuzuki

Description

@sosukesuzuki

from: https://github.com/sosukesuzuki/typescript-eslint/pull/1/files#diff-9d24728f5005799a507ba4b6eba78863R60-R64

Prettier pr-8821(Current master)
Playground link

--parser typescript

Input:

interface Foo<
  loooooooooooooooooooooooooooooooooong,
  loooooooooooooooooooooooooooooooooong
> extends SomeType {
  foo: string;
}

Output:

interface Foo<
    loooooooooooooooooooooooooooooooooong,
    loooooooooooooooooooooooooooooooooong
  >
  extends SomeType {
  foo: string;
}

Expected behavior(2.0.5 output):

interface Foo<
  loooooooooooooooooooooooooooooooooong,
  loooooooooooooooooooooooooooooooooong
> extends SomeType {
  foo: string;
}

Metadata

Metadata

Assignees

Labels

lang:typescriptIssues affecting TypeScript-specific constructs (not general JS issues)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions