Bump Prettier dependency to 3.0.0

This commit is contained in:
Sosuke Suzuki committed 2023-07-05 21:50:05 +09:00
1 parent 151cc2c4f2
commit fa48415617
338 files changed
+1483 -1434

No files matched your search

+1 -1
View File
@@ -42,7 +42,7 @@
copyButton.setAttribute("aria-label", ARIA_LABEL);
copyButton.disabled = false;
}, 2000);
}
},
);
actionsContainer.appendChild(copyButton);
+12 -2
View File
@@ -1,6 +1,16 @@
html body {
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
font-family:
-apple-system,
BlinkMacSystemFont,
Segoe UI,
Roboto,
Oxygen,
Ubuntu,
Cantarell,
Fira Sans,
Droid Sans,
Helvetica Neue,
sans-serif;
overflow-x: hidden;
}
+5 -1
View File
@@ -244,7 +244,11 @@ header h1 {
}
label {
font-family: Consolas, Courier New, Courier, monospace;
font-family:
Consolas,
Courier New,
Courier,
monospace;
margin: 10px 0;
display: block;
}
+2 -2
View File
@@ -4,11 +4,11 @@
importScripts("lib/package-manifest.js");
importScripts(
"https://cdnjs.cloudflare.com/ajax/libs/sw-toolbox/3.6.0/sw-toolbox.js"
"https://cdnjs.cloudflare.com/ajax/libs/sw-toolbox/3.6.0/sw-toolbox.js",
);
const plugins = prettierPackageManifest.builtinPlugins.map(
({ file }) => `lib/${file}`
({ file }) => `lib/${file}`,
);
toolbox.precache([
+5 -5
View File
@@ -16,7 +16,7 @@ const docExplorerPlugin = {
parse: (text) =>
new Function(
`{ ${Object.keys(prettier.doc.builders)} }`,
`const result = (${text || "''"}\n); return result;`
`const result = (${text || "''"}\n); return result;`,
)(prettier.doc.builders),
astFormat: "doc-explorer",
},
@@ -49,7 +49,7 @@ function serializeAst(ast) {
: typeof value === "symbol"
? String(value)
: value,
2
2,
);
}
@@ -82,7 +82,7 @@ async function handleFormatMessage(message) {
const formatResult = await formatCode(
message.code,
options,
message.debug.rethrowEmbedErrors
message.debug.rethrowEmbedErrors,
);
const response = {
@@ -117,7 +117,7 @@ async function handleFormatMessage(message) {
const parsed = await prettier.__debug.parse(
message.code,
options,
isPrettier2 ? false : { preprocessForPrint }
isPrettier2 ? false : { preprocessForPrint },
);
ast = serializeAst(parsed.ast);
} catch (e) {
@@ -139,7 +139,7 @@ async function handleFormatMessage(message) {
try {
response.debug.doc = await prettier.__debug.formatDoc(
await prettier.__debug.printToDoc(message.code, options),
{ plugins }
{ plugins },
);
} catch {
response.debug.doc = "";