-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Input code
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;
}
}
Output code
Error during output formatting: Couldn't resolve parser "rust-parse"
Promise {
Additional context
No response
Metadata
Metadata
Assignees
Labels
No labels