Style: Enforce kebab-case filename (#12265)
This commit is contained in:
1 parent
1dffa0f9da
commit
d962466a82
58 files changed
+55
-53
No files matched your search
@@ -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;
|
||||
Reference in new issue
Block a user