UNPKG

@rightcapital/php-parser

Version:

TypeScript types for PHP Parser JSON representation

14 lines (10 loc) 339 B
import { join } from 'node:path'; import * as prettier from 'prettier'; import { PROJECT_ROOT } from '../../constants'; export class PrettierHelpers { public static async prettierTypescript(source: string): Promise<string> { return prettier.format(source, { filepath: join(PROJECT_ROOT, 'prettier.config.js'), }); } }