Replace cosmiconfig with lilconfig (#15232)

This commit is contained in:
fisker Cheung authored and GitHub committed 2023-09-02 01:02:22 +08:00
1 parent 6184a1ed42
commit 0d04d78367
13 files changed
+118 -83

No files matched your search

+1 -1
View File
@@ -66,7 +66,7 @@ If `options.editorconfig` is `true` and an [`.editorconfig` file](https://editor
The promise will be rejected if there was an error parsing the configuration file.
The search starts at `process.cwd()`, or at `filePath` if provided. Please see the [cosmiconfig docs](https://github.com/davidtheclark/cosmiconfig#explorersearch) for details on how the resolving works.
The search starts at `process.cwd()`, or at `filePath` if provided. Please see the [lilconfig docs](https://github.com/antonk52/lilconfig) for details on how the resolving works.
```js
const configFile = await prettier.resolveConfigFile(filePath);
+1 -1
View File
@@ -3,7 +3,7 @@ id: configuration
title: Configuration File
---
Prettier uses [cosmiconfig](https://github.com/davidtheclark/cosmiconfig) for configuration file support. This means you can configure Prettier via (in order of precedence):
Prettier uses [lilconfig](https://github.com/antonk52/lilconfig) for configuration file support. This means you can configure Prettier via (in order of precedence):
- A `"prettier"` key in your `package.json` file.
- A `.prettierrc` file written in JSON or YAML.