mirror of
https://github.com/sasjs/lint.git
synced 2026-01-14 15:50:05 +00:00
fix: pass lint config to lintFile calling from formatFile
This commit is contained in:
@@ -16,7 +16,7 @@ export const formatFile = async (
|
|||||||
configuration?: LintConfig
|
configuration?: LintConfig
|
||||||
): Promise<FormatResult> => {
|
): Promise<FormatResult> => {
|
||||||
const config = configuration || (await getLintConfig())
|
const config = configuration || (await getLintConfig())
|
||||||
const diagnosticsBeforeFormat = await lintFile(filePath)
|
const diagnosticsBeforeFormat = await lintFile(filePath, config)
|
||||||
const diagnosticsCountBeforeFormat = diagnosticsBeforeFormat.length
|
const diagnosticsCountBeforeFormat = diagnosticsBeforeFormat.length
|
||||||
|
|
||||||
const text = await readFile(filePath)
|
const text = await readFile(filePath)
|
||||||
@@ -25,7 +25,7 @@ export const formatFile = async (
|
|||||||
|
|
||||||
await createFile(filePath, formattedText)
|
await createFile(filePath, formattedText)
|
||||||
|
|
||||||
const diagnosticsAfterFormat = await lintFile(filePath)
|
const diagnosticsAfterFormat = await lintFile(filePath, config)
|
||||||
const diagnosticsCountAfterFormat = diagnosticsAfterFormat.length
|
const diagnosticsCountAfterFormat = diagnosticsAfterFormat.length
|
||||||
|
|
||||||
const fixedDiagnosticsCount =
|
const fixedDiagnosticsCount =
|
||||||
|
|||||||
Reference in New Issue
Block a user