Files
test-repo/tests_integration/plugins/automatic/node_modules/@user/prettier-plugin-foobar/index.js
T
Hugo Alliaume b38319740a feat: autoload plugins that are located in `@*/prettier-plugin-* (#5945)
* add tests

* implement the feature

* update docs

* update changelog

* typo
2019-03-10 20:34:04 +11:00

26 lines
436 B
JavaScript

"use strict";
const prettier = require("prettier/local");
const concat = prettier.doc.builders.concat;
module.exports = {
languages: [
{
name: "foobar",
parsers: ["foobar"],
extensions: [".foobar"]
}
],
parsers: {
foobar: {
parse: text => ({ text }),
astFormat: "foobar"
}
},
printers: {
foobar: {
print: path => concat(["foobar+", path.getValue().text])
}
}
};