1
0
mirror of https://github.com/sasjs/lint.git synced 2026-01-05 03:30:06 +00:00

fix: pass lint config to lintFile calling from formatFile

This commit is contained in:
2022-12-29 00:46:50 +05:00
parent 4b16e0c52a
commit c0fdfc6ac9

View File

@@ -16,7 +16,7 @@ export const formatFile = async (
configuration?: LintConfig
): Promise<FormatResult> => {
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 =