#20166·prettier

`abstract export class` loses `export`

Author: leonidazCreated Sep 28, 2026Updated Sep 28, 2026

Prettier 3.9.9 Playground link

bash
--parser typescript

Input:

typescript
abstract export class A {}

Output:

typescript
abstract class A {}

Expected output:

typescript
abstract export class A {}

Why?

The class is no longer exported. TypeScript reports TS1029 ('export' modifier must precede 'abstract' modifier) for the input, but Prettier formats it and silently drops the modifier. It should either keep export or throw, as it does for other misplaced modifiers.

Also reproduces on main (88d8e96).