* Failing test case for flushing line-suffix contents * Flush remaining line-suffix contents at the end of document
26 lines
443 B
JavaScript
26 lines
443 B
JavaScript
"use strict";
|
|
|
|
const prettier = require("prettier-local");
|
|
const { lineSuffix } = prettier.doc.builders;
|
|
|
|
module.exports = {
|
|
languages: [
|
|
{
|
|
name: "foo",
|
|
parsers: ["foo-parser"],
|
|
extensions: [".foo"]
|
|
}
|
|
],
|
|
parsers: {
|
|
"foo-parser": {
|
|
parse: text => ({ text }),
|
|
astFormat: "foo-ast"
|
|
}
|
|
},
|
|
printers: {
|
|
"foo-ast": {
|
|
print: path => lineSuffix(path.getValue().text.trim())
|
|
}
|
|
}
|
|
};
|