-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Open
Labels
lang:typescriptIssues affecting TypeScript-specific constructs (not general JS issues)Issues affecting TypeScript-specific constructs (not general JS issues)
Description
Prettier pr-18091
Playground link
--parser typescriptInput:
export interface TSAbstractMethodDefinitionNonComputedName
// this does not extend ClassMethodDefinitionNonComputedNameBase because abstract private names are not allowed
extends MethodDefinitionNonComputedNameBase {
type: AST_NODE_TYPES.TSAbstractMethodDefinition;
}Output:
export interface TSAbstractMethodDefinitionNonComputedName
// this does not extend ClassMethodDefinitionNonComputedNameBase because abstract private names are not allowed
extends MethodDefinitionNonComputedNameBase {
type: AST_NODE_TYPES.TSAbstractMethodDefinition;
}Expected output:
export interface TSAbstractMethodDefinitionNonComputedName
// this does not extend ClassMethodDefinitionNonComputedNameBase because abstract private names are not allowed
extends MethodDefinitionNonComputedNameBase {
type: AST_NODE_TYPES.TSAbstractMethodDefinition;
}Why?
The previous version does look nice.
This is a real-world case https://github.com/typescript-eslint/typescript-eslint/blob/bb451a1d342f169bc9b697ad97db5dfe2eb288c3/packages/ast-spec/src/element/TSAbstractMethodDefinition/spec.ts#L12C1-L16C2
Metadata
Metadata
Assignees
Labels
lang:typescriptIssues affecting TypeScript-specific constructs (not general JS issues)Issues affecting TypeScript-specific constructs (not general JS issues)