MCPcopy
hub / github.com/prettier/prettier / getConfigFileByCli

Function getConfigFileByCli

tests/integration/__tests__/config-resolution.js:469–475  ·  view source on GitHub ↗
(file)

Source from the content-addressed store, hash-verified

467test("Search from directory, not treat file as directory", async () => {
468 // CLI
469 const getConfigFileByCli = async (file) => {
470 const { stdout: configFile } = await runCli("cli/config/config-position/", [
471 "--find-config-path",
472 file,
473 ]);
474 return configFile;
475 };
476
477 expect(await getConfigFileByCli("file.js")).toBe(".prettierrc");
478 expect(await getConfigFileByCli("directory/file-in-child-directory.js")).toBe(

Callers 1

Calls 1

runCliFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…