Files
test-repo/changelog_unreleased/api/17167.md
T

609 B

Accept URL as custom config file in resolveConfig (#17167 by @fisker)

prettier.resolveConfig() now accepts an URL with file: protocol or a url string that starts with file: as custom config file location.

// `URL`
await prettier.resolveConfig("path/to/file", {
  config: new URL("/path/to/prettier-config-file", import.meta.url),
});

// URL string
await prettier.resolveConfig("path/to/file", {
  config: "file:///path/to/prettier-config-file",
});