Restructure package files, add exports (#13530)
Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com>
This commit is contained in:
1 parent
e132a9ba43
commit
31a796d32c
17 files changed
+232
-111
No files matched your search
+2
-2
@@ -151,13 +151,13 @@ format("lodash ( )", {
|
||||
|
||||
```js
|
||||
import { format } from "prettier";
|
||||
import parserBabel from "prettier/parser-babel.js";
|
||||
import pluginBabel from "prettier/plugins/babel";
|
||||
|
||||
const myCustomPlugin = {
|
||||
parsers: {
|
||||
"my-custom-parser": {
|
||||
async parse(text) {
|
||||
const ast = await parserBabel.parsers.babel.parse(text);
|
||||
const ast = await pluginBabel.parsers.babel.parse(text);
|
||||
ast.program.body[0].expression.callee.name = "_";
|
||||
return ast;
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user