MCPcopy Create free account
hub / github.com/angular/dev-infra / getActiveFormatters

Function getActiveFormatters

ng-dev/format/formatters/index.ts:19–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17 * Get all defined formatters which are active based on the current loaded config.
18 */
19export 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.
30export {Formatter, type FormatterAction} from './base-formatter.js';

Callers 1

runFormatterInParallelFunction · 0.85

Calls 3

getConfigFunction · 0.85
assertValidFormatConfigFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected