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

29 lines
529 B
JavaScript

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