Update v3 blog post (#15028)
This commit is contained in:
1 parent
6e5dee0a01
commit
958379ce52
3 files changed
+8
-8
No files matched your search
+2
-2
@@ -150,13 +150,13 @@ format("lodash ( )", {
|
||||
|
||||
```js
|
||||
import { format } from "prettier";
|
||||
import * as pluginBabel from "prettier/plugins/babel";
|
||||
import * as prettierPluginBabel from "prettier/plugins/babel";
|
||||
|
||||
const myCustomPlugin = {
|
||||
parsers: {
|
||||
"my-custom-parser": {
|
||||
async parse(text) {
|
||||
const ast = await pluginBabel.parsers.babel.parse(text);
|
||||
const ast = await prettierPluginBabel.parsers.babel.parse(text);
|
||||
ast.program.body[0].expression.callee.name = "_";
|
||||
return ast;
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user