mirror of
https://github.com/hanzoai/prettier.git
synced 2026-09-24 17:02:04 +00:00
22 lines
447 B
JavaScript
22 lines
447 B
JavaScript
|
|
import createPlugin from "../../../../config/utilities/create-plugin.cjs";
|
|
|
|
const PARSER_NAME = 'dummy-js-parser'
|
|
const PRINT_MARK = `formatted by '${PARSER_NAME}' parser`
|
|
|
|
const languages = [
|
|
{
|
|
parsers: [PARSER_NAME],
|
|
extensions: ['.js']
|
|
}
|
|
]
|
|
|
|
export default {
|
|
...createPlugin({
|
|
name: PARSER_NAME,
|
|
print: (content) => `${content.replace(PRINT_MARK,"").trim()}\n${PRINT_MARK}`,
|
|
finalNewLine: false,
|
|
}),
|
|
languages,
|
|
};
|