diff --git a/packages/devkit/src/generators/format-files.ts b/packages/devkit/src/generators/format-files.ts index 6788a015d7bca..77f96d05c63c6 100644 --- a/packages/devkit/src/generators/format-files.ts +++ b/packages/devkit/src/generators/format-files.ts @@ -32,7 +32,7 @@ export async function formatFiles(tree: Tree): Promise { await Promise.all( Array.from(files).map(async (file) => { const systemPath = path.join(tree.root, file.path); - let options: Prettier.Options = { + let options: any = { filepath: systemPath, }; @@ -47,7 +47,7 @@ export async function formatFiles(tree: Tree): Promise { ...resolvedOptions, }; - const support = await prettier.getFileInfo(systemPath); + const support = await prettier.getFileInfo(systemPath, options); if (support.ignored || !support.inferredParser) { return; }