From c2c3cf58bab05bcecee3d0226b3f02c0968bf775 Mon Sep 17 00:00:00 2001 From: danjor Date: Tue, 29 Mar 2022 16:14:52 +0200 Subject: [PATCH] fix(devkit): add missing parameter to prettier getFileInfo (#9577) Co-authored-by: Jordan CALVI --- packages/devkit/src/generators/format-files.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }