Files
test-repo/tests/config/prettier-plugins/prettier-plugin-dummy-toml/index.js
T
2025-12-01 07:25:25 +08:00

18 lines
432 B
JavaScript

import { outdent } from "outdent";
import createPlugin from "../../utilities/create-plugin.cjs";
const plugin = createPlugin({
name: "toml",
parserName: "dummy-toml-plugin-parser-name",
print: (text, options) =>
outdent`
!!! Formatted by with '${options.parser}' parser
${(text.startsWith("!!!")
? text.split("\n").slice(1).join("\n")
: text
).trim()}
`,
});
export default plugin;