Bump Prettier dependency to 2.0.0

This commit is contained in:
Georgii Dolzhykov committed 2020-03-21 22:09:54 +02:00
1 parent 5b3028e220
commit 9dad95b35f
229 files changed
+2092 -2078

No files matched your search

+4 -4
View File
@@ -45,7 +45,7 @@ If `options.useCache` is `false`, all caching will be bypassed.
```js
const text = fs.readFileSync(filePath, "utf8");
prettier.resolveConfig(filePath).then(options => {
prettier.resolveConfig(filePath).then((options) => {
const formatted = prettier.format(text, options);
});
```
@@ -71,8 +71,8 @@ The promise will be rejected if there was an error parsing the configuration fil
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.
```js
prettier.resolveConfigFile().then(filePath => {
prettier.resolveConfig(filePath).then(options => {
prettier.resolveConfigFile().then((filePath) => {
prettier.resolveConfig(filePath).then((options) => {
const formatted = prettier.format(text, options);
});
});
@@ -147,7 +147,7 @@ prettier.format("lodash ( )", {
const ast = babel(text);
ast.program.body[0].expression.callee.name = "_";
return ast;
}
},
});
// -> "_();\n"
```