29 lines
550 B
JavaScript
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]);
|
|
},
|
|
},
|
|
},
|
|
};
|