Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/deno/std/prettier/vendor/index.d.ts>resolveConfig

A modern runtime for JavaScript and TypeScript.
Go to Latest
namespace resolveConfig
import { resolveConfig } from "https://deno.land/x/deno@v0.23.0/std/prettier/vendor/index.d.ts";
function resolveConfig
import { resolveConfig } from "https://deno.land/x/deno@v0.23.0/std/prettier/vendor/index.d.ts";

resolveConfig can be used to resolve configuration for a given source file, passing its path as the first argument. The config search will start at the file path and continue to search up the directory. (You can use process.cwd() to start searching from the current directory).

A promise is returned which will resolve to:

  • An options object, providing a config file was found.
  • null, if no file was found.

The promise will be rejected if there was an error parsing the configuration file.

Parameters

filePath: string
optional
options: ResolveConfigOptions

Returns

Promise<null | Options>