From 74fa3aed2944b63797a6e0e786acd1b51f86550a Mon Sep 17 00:00:00 2001 From: Mikael Brevik Date: Mon, 10 Jan 2022 09:10:23 +0100 Subject: [PATCH] fix(cli): pass in parser to prettier format to avoid deprecation warning (#662) --- packages/cli/src/dirCommand.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/cli/src/dirCommand.ts b/packages/cli/src/dirCommand.ts index 74f1e82b..44098791 100644 --- a/packages/cli/src/dirCommand.ts +++ b/packages/cli/src/dirCommand.ts @@ -101,6 +101,7 @@ export const dirCommand: SvgrCommand = async ( ? await resolveConfig(filepath, { editorconfig: true }) : {} return format(fileContent, { + filepath, ...prettierRcConfig, ...opts.prettierConfig, })