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

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

31 lines
504 B
JavaScript
Raw Normal View History

"use strict";
2020-09-18 14:05:29 +08:00
const prettier = require("prettier-local");
const { concat } = prettier.doc.builders;
module.exports = {
languages: [
{
name: "bar",
parsers: ["bar"]
}
],
parsers: {
bar: {
parse: text => ({ text }),
astFormat: "bar"
}
},
printers: {
bar: {
print: path =>
concat([
"content from `prettier-plugin-bar.js` file + ",
path.getValue().text
])
}
},
defaultOptions: {
tabWidth: 4
}
};