MCPcopy
hub / github.com/ampproject/amphtml / prettify

Function prettify

build-system/tasks/prettify.js:34–44  ·  view source on GitHub ↗

* Checks files for formatting (and optionally fixes them) with Prettier. * Explicitly makes sure the API doesn't check files in `.prettierignore`. * @return {Promise }

()

Source from the content-addressed store, hash-verified

32 * @return {Promise<void>}
33 */
34async function prettify() {
35 const filesToCheck = getFilesToCheck(
36 prettifyGlobs,
37 {dot: true},
38 '.prettierignore'
39 );
40 if (filesToCheck.length == 0) {
41 return;
42 }
43 await runPrettify(filesToCheck);
44}
45
46/**
47 * Resolves the prettier config for the given file

Callers

nothing calls this directly

Calls 2

getFilesToCheckFunction · 0.85
runPrettifyFunction · 0.85

Tested by

no test coverage detected