Style: Enforce kebab-case filename (#12265)

This commit is contained in:
fisker Cheung authored and GitHub committed 2022-02-10 10:12:31 +08:00
1 parent 1dffa0f9da
commit d962466a82
58 files changed
+55 -53

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
"use strict";
/** @type {import('prettier')} */
const prettier = require("prettier-local");
function printDoc(doc) {
// This dummy plugin ignores the input and simply returns the given doc.
// This is to make sure that the doc will go through all the stages a real doc
// returned by a real plugin would go (e.g. `propagateBreaks`).
const dummyPlugin = {
parsers: {
dummy: {
parse: () => ({}),
astFormat: "dummy",
},
},
printers: {
dummy: {
print: () => doc,
},
},
};
return prettier.format("_", {
plugins: [dummyPlugin],
parser: "dummy",
});
}
module.exports = printDoc;