Skip to content

Commit

Permalink
feat: use ParserPlugin types for importOrderParserPlugins
Browse files Browse the repository at this point in the history
  • Loading branch information
leomotors committed Oct 22, 2022
1 parent 7c342f3 commit 39718ec
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { ParserPlugin as BaseParserPlugin } from '@babel/parser';
import { Config } from 'prettier';

type ParserPlugin = Extract<BaseParserPlugin, string> | `[${string},${string}]`;

export interface PluginConfig {
/**
* A collection of Regular expressions in string format.
Expand Down Expand Up @@ -86,7 +89,7 @@ used to order imports within each match group.
*
* @default ["typescript", "jsx"]
*/
importOrderParserPlugins?: string[];
importOrderParserPlugins?: ParserPlugin[];
}

export type PrettierConfig = PluginConfig & Config;

0 comments on commit 39718ec

Please sign in to comment.