Skip to content

Commit

Permalink
fix: augment Prettier Options types with internal PluginConfig
Browse files Browse the repository at this point in the history
- Add TypeScript module augmentation for the `prettier` module in `types/index.d.ts` to add the `PluginConfig` interface to the `Options` interface to support proper typing of plugin options in IDEs and during type-checking
  • Loading branch information
jeremy-code committed Jun 6, 2024
1 parent 135b6e5 commit a9aec61
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,7 @@ export interface PluginConfig {
}

export type PrettierConfig = PluginConfig & Config;

declare module 'prettier' {
interface Options extends PluginConfig {}
}

0 comments on commit a9aec61

Please sign in to comment.