From c0fdfc6ac99eb83f104de5d4e1edc9136f72e07c Mon Sep 17 00:00:00 2001 From: Sabir Hassan Date: Thu, 29 Dec 2022 00:46:50 +0500 Subject: [PATCH] fix: pass lint config to lintFile calling from formatFile --- src/format/formatFile.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/format/formatFile.ts b/src/format/formatFile.ts index 87bd36f..d81fbf2 100644 --- a/src/format/formatFile.ts +++ b/src/format/formatFile.ts @@ -16,7 +16,7 @@ export const formatFile = async ( configuration?: LintConfig ): Promise => { const config = configuration || (await getLintConfig()) - const diagnosticsBeforeFormat = await lintFile(filePath) + const diagnosticsBeforeFormat = await lintFile(filePath, config) const diagnosticsCountBeforeFormat = diagnosticsBeforeFormat.length const text = await readFile(filePath) @@ -25,7 +25,7 @@ export const formatFile = async ( await createFile(filePath, formattedText) - const diagnosticsAfterFormat = await lintFile(filePath) + const diagnosticsAfterFormat = await lintFile(filePath, config) const diagnosticsCountAfterFormat = diagnosticsAfterFormat.length const fixedDiagnosticsCount =