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

feat: add configuration as an optional argument for formatText

This commit is contained in:
2022-11-08 19:33:21 +05:00
parent cee30d0030
commit c210699954
2 changed files with 4 additions and 3 deletions

View File

@@ -1,7 +1,8 @@
import { LintConfig } from '../types'
import { getLintConfig } from '../utils'
import { processText } from './shared'
export const formatText = async (text: string) => {
const config = await getLintConfig()
export const formatText = async (text: string, configuration?: LintConfig) => {
const config = configuration || (await getLintConfig())
return processText(text, config)
}