Files
test-repo/tests_integration/plugins/bespoke/node_modules/@company/prettier-plugin-bespoke/main.js
T
Alexander Kachkaev bc78541274 Improve plugin resolution when path does not start with ./ (#4451)
* Fix plugin resolution when path does not start with ./

* Minor consistency fix: use "if (resolvedPluginSearchDir) {...}" in load-plugins

* Use more appropriate quotes in plugin-resolution.js

* Try both local paths and node modules when resolving plugins manually

* Test bespoke plugin loading by node module name

* Simplify getFileInfo() as suggested by @j-f1

https://github.com/prettier/prettier/pull/4341#discussion_r187112707
2018-05-10 10:27:41 +10:00

24 lines
391 B
JavaScript

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