Open vladilen11 opened 1 year ago
import * as prettier from "prettier"; import * as rustPlugin from "prettier-plugin-rust"; export async function formatMove(content: string, prettierConfigPath?: string): Promise<string> { let config; if (prettierConfigPath) { config = await prettier.resolveConfig(prettierConfigPath); } try { return prettier.format(content, { plugins: [rustPlugin], parser: "rust-parse", printWidth: 120, semi: true, tabWidth: 2, useTabs: false, bracketSpacing: true, ...config, }); } catch (error) { let message; if (error instanceof Error) { message = error.message; } else { message = error; } console.log(chalk.yellow(`Error during output formatting: ${message}`)); return content; } }
Error during output formatting: Couldn't resolve parser "rust-parse" Promise {
No response
Input code
Output code
Additional context
No response