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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
550 B
JavaScript
Raw Normal View History

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