babel-plugin-tester
Version:
Utilities for testing babel plugins
27 lines • 997 B
TypeScript
import type { Options as PrettierOptions } from 'prettier';
import type { ResultFormatter } from "../index.js";
export type { PrettierOptions };
/**
* A prettier-based formatter used to normalize babel output.
*
* If no `filepath` is given, it will be set to `${cwd}/dummy.js` by
* default. This is useful to leverage prettier's extension-based parser
* inference (which usually ends up triggering babel).
*
* @see https://prettier.io/docs/en/options.html#file-path
*/
export declare const prettierFormatter: ResultFormatter<{
/**
* Options passed directly to prettier, allowing you to override the defaults.
*/
prettierOptions: MaybePrettierOptions;
/**
* If this deprecated parameter is given as an argument, treat it as the value
* of `prettierOptions`. Otherwise, it should not be used.
*
* @deprecated Use `prettierOptions` instead.
*/
config: MaybePrettierOptions;
}>;
export default prettierFormatter;
type MaybePrettierOptions = PrettierOptions | null;