()
| 17 | * Get all defined formatters which are active based on the current loaded config. |
| 18 | */ |
| 19 | export async function getActiveFormatters() { |
| 20 | const config = await getConfig(); |
| 21 | assertValidFormatConfig(config); |
| 22 | const gitClient = await GitClient.get(); |
| 23 | |
| 24 | return [new Prettier(gitClient, config.format), new Buildifier(gitClient, config.format)].filter( |
| 25 | (formatter) => formatter.isEnabled(), |
| 26 | ); |
| 27 | } |
| 28 | |
| 29 | // Rexport symbols used for types elsewhere. |
| 30 | export {Formatter, type FormatterAction} from './base-formatter.js'; |
no test coverage detected