Skip to content

Commit

Permalink
feat: update ImportOrderParserPlugin type name
Browse files Browse the repository at this point in the history
  • Loading branch information
leomotors committed Oct 22, 2022
1 parent 39718ec commit 3e00641
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions types/index.d.ts
@@ -1,7 +1,9 @@
import { ParserPlugin as BaseParserPlugin } from '@babel/parser';
import { ParserPlugin } from '@babel/parser';
import { Config } from 'prettier';

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

export interface PluginConfig {
/**
Expand Down Expand Up @@ -89,7 +91,7 @@ used to order imports within each match group.
*
* @default ["typescript", "jsx"]
*/
importOrderParserPlugins?: ParserPlugin[];
importOrderParserPlugins?: ImportOrderParserPlugin[];
}

export type PrettierConfig = PluginConfig & Config;

0 comments on commit 3e00641

Please sign in to comment.