Files
test-repo/tests/integration/plugins/automatic/prettier-plugin-bar.js
T

35 lines
609 B
JavaScript

"use strict";
module.exports = {
languages: [
{
name: "bar",
parsers: ["bar"],
},
],
parsers: {
bar: {
parse: (text) => ({ text }),
astFormat: "bar",
},
},
printers: {
bar: {
async print(path) {
const { default: prettier } = await import(
"../../../config/prettier-entry.js"
);
const { concat } = prettier.doc.builders;
return concat([
"content from `prettier-plugin-bar.js` file + ",
path.getValue().text,
]);
},
},
},
defaultOptions: {
tabWidth: 4,
},
};