Files
test-repo/tests/integration/plugins/automatic/node_modules/@user/prettier-plugin-foobar/index.js
T

29 lines
550 B
JavaScript

"use strict";
module.exports = {
languages: [
{
name: "foobar",
parsers: ["foobar"],
extensions: [".foobar"],
},
],
parsers: {
foobar: {
parse: text => ({ text }),
astFormat: "foobar",
},
},
printers: {
foobar: {
async print(path) {
const { default: prettier } = await import(
"../../../../../../config/prettier-entry.js"
);
const { concat } = prettier.doc.builders;
return concat(["foobar+", path.getValue().text]);
},
},
},
};