Skip to content

Commit

Permalink
lets try and clean up this branch with the new prettier changes
Browse files Browse the repository at this point in the history
  • Loading branch information
keyboardspecialist committed Dec 10, 2024
1 parent baf322d commit bf4ab9d
Show file tree
Hide file tree
Showing 1,514 changed files with 35,460 additions and 48,409 deletions.
10 changes: 5 additions & 5 deletions .github/actions/check-for-CLA/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const getValuesFromGoogleSheet = async (sheetId, cellRanges) => {
const checkIfIndividualCLAFound = async () => {
const response = await getValuesFromGoogleSheet(
GOOGLE_SHEETS_INFO.individualCLASheetId,
"D2:D"
"D2:D",
);

const rows = response.data.values;
Expand All @@ -68,7 +68,7 @@ const checkIfIndividualCLAFound = async () => {
const checkIfCorporateCLAFound = async () => {
const response = await getValuesFromGoogleSheet(
GOOGLE_SHEETS_INFO.corporateCLASheetId,
"H2:H"
"H2:H",
);

const rows = response.data.values;
Expand Down Expand Up @@ -107,9 +107,9 @@ const getCommentBody = (hasSignedCLA, errorFoundOnCLACheck) => {
const commentTemplate = fs.readFileSync(
join(
dirname(fileURLToPath(import.meta.url)),
"templates/pullRequestComment.hbs"
"templates/pullRequestComment.hbs",
),
"utf-8"
"utf-8",
);

const getCommentFromTemplate = Handlebars.compile(commentTemplate);
Expand Down Expand Up @@ -138,7 +138,7 @@ const postCommentOnPullRequest = async (hasSignedCLA, errorFoundOnCLACheck) => {
accept: "application/vnd.github+json",
"X-GitHub-Api-Version": "2022-11-28",
},
}
},
);
};

Expand Down
6 changes: 3 additions & 3 deletions Apps/CesiumViewer/CesiumViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ async function main() {
let baseLayer;
if (defined(endUserOptions.tmsImageryUrl)) {
baseLayer = ImageryLayer.fromProviderAsync(
TileMapServiceImageryProvider.fromUrl(endUserOptions.tmsImageryUrl)
TileMapServiceImageryProvider.fromUrl(endUserOptions.tmsImageryUrl),
);
}

Expand Down Expand Up @@ -222,11 +222,11 @@ async function main() {
let hpr = "";
if (defined(camera.heading)) {
hpr = `,${CesiumMath.toDegrees(camera.heading)},${CesiumMath.toDegrees(
camera.pitch
camera.pitch,
)},${CesiumMath.toDegrees(camera.roll)}`;
}
endUserOptions.view = `${CesiumMath.toDegrees(
position.longitude
position.longitude,
)},${CesiumMath.toDegrees(position.latitude)},${position.height}${hpr}`;
history.replaceState(undefined, "", `?${objectToQuery(endUserOptions)}`);
}
Expand Down
2 changes: 1 addition & 1 deletion Apps/CesiumViewer/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<!-- Use correct character set. -->
Expand Down
2 changes: 1 addition & 1 deletion Apps/HelloWorld.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<!-- Use correct character set. -->
Expand Down
72 changes: 36 additions & 36 deletions Apps/Sandcastle/CesiumSandcastle.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ require({
dojoscript,
LinkButton,
ClipboardJS,
pako
pako,
) {
"use strict";
// attach clipboard handling to our Copy button
Expand Down Expand Up @@ -234,7 +234,7 @@ require({
function clearRun() {
domClass.remove(
registry.byId("buttonRun").domNode,
"highlightToolbarButton"
"highlightToolbarButton",
);
}

Expand Down Expand Up @@ -336,8 +336,8 @@ require({
function openGalleryTooltip() {
galleryTooltipTimer = undefined;

const selectedTabName = registry.byId("innerPanel").selectedChildWidget
.title;
const selectedTabName =
registry.byId("innerPanel").selectedChildWidget.title;
let suffix = `${selectedTabName}Demos`;
if (selectedTabName === "All") {
suffix = "all";
Expand Down Expand Up @@ -395,7 +395,7 @@ require({
line = jsEditor.setGutterMarker(
i,
"searchGutter",
makeLineLabel(`Search: ${searchTerm}`, "searchMarker")
makeLineLabel(`Search: ${searchTerm}`, "searchMarker"),
);
jsEditor.addLineClass(line, "text", "searchLine");
errorLines.push(line);
Expand All @@ -415,7 +415,7 @@ require({
line = jsEditor.setGutterMarker(
scriptLineToEditorLine(hint.line),
"hintGutter",
makeLineLabel(hint.reason, "hintMarker")
makeLineLabel(hint.reason, "hintMarker"),
);
jsEditor.addLineClass(line, "text", "hintLine");
errorLines.push(line);
Expand Down Expand Up @@ -453,7 +453,7 @@ require({
{
line: lineNumber - 1,
ch: 0,
}
},
);
jsEditor.focus();
jsEditor.setSelection(
Expand All @@ -464,7 +464,7 @@ require({
{
line: lineNumber,
ch: 0,
}
},
);
}
}
Expand All @@ -481,7 +481,7 @@ require({
line = jsEditor.setGutterMarker(
lineNum,
"highlightGutter",
makeLineLabel("highlighted by demo", "highlightMarker")
makeLineLabel("highlighted by demo", "highlightMarker"),
);
jsEditor.addLineClass(line, "text", "highlightLine");
highlightLines.push(line);
Expand Down Expand Up @@ -516,7 +516,7 @@ require({
demoContainer.scrollLeft -= (e.wheelDelta * 70) / 120;
}
},
false
false,
);
} else {
demoContainer.addEventListener(
Expand All @@ -526,7 +526,7 @@ require({
demoContainer.scrollLeft += (e.detail * 70) / 3;
}
},
false
false,
);
}
}
Expand Down Expand Up @@ -572,7 +572,7 @@ require({
Tab: "indentMore",
"Shift-Tab": "indentLess",
},
}
},
);

window.onbeforeunload = function (e) {
Expand Down Expand Up @@ -626,7 +626,7 @@ require({
appendConsole(
"consoleError",
"Make sure Cesium is built, see the Contributor's Guide for details.",
true
true,
);
}
};
Expand Down Expand Up @@ -673,7 +673,7 @@ require({

element.textContent = embedInSandcastleTemplate(
jsEditor.getValue(),
isFirefox
isFirefox,
);
bucketDoc.body.appendChild(element);
}
Expand All @@ -697,7 +697,7 @@ require({
appendConsole(
"consoleError",
`Error, first part of ${local.bucketName} must match first part of bucket.html exactly.`,
true
true,
);
} else {
const bodyAttributes = local.headers.match(/<body([^>]*?)>/)[1];
Expand All @@ -719,7 +719,7 @@ require({
const pos = local.headers.indexOf("</head>");
const extraHeaders = local.headers.substring(
local.emptyBucket.length,
pos
pos,
);
bucketDoc.head.innerHTML += extraHeaders;
activateBucketScripts(bucketDoc);
Expand Down Expand Up @@ -828,7 +828,7 @@ require({
appendConsole(
"consoleError",
`Unable to GET gist from GitHub API. This could be due to too many requests from your IP. Try again in an hour or copy and paste the code from the gist: https://gist.github.com/${queryObject.gist}`,
true
true,
);
console.log(error);
});
Expand All @@ -851,13 +851,13 @@ require({
const doc = parser.parseFromString(demo.code, "text/html");

const script = doc.querySelector(
'script[id="cesium_sandcastle_script"]'
'script[id="cesium_sandcastle_script"]',
);
if (!script) {
appendConsole(
"consoleError",
`Error reading source file: ${demo.name}`,
true
true,
);
return;
}
Expand All @@ -867,7 +867,7 @@ require({
appendConsole(
"consoleError",
`Error reading source file: ${demo.name}`,
true
true,
);
return;
}
Expand Down Expand Up @@ -903,7 +903,7 @@ require({
document.title = `${e.state.name} - Cesium Sandcastle`;
}
},
false
false,
);

window.addEventListener(
Expand All @@ -930,25 +930,25 @@ require({
appendConsole(
"consoleError",
'Documentation not available. Please run the "build-docs" build script to generate Cesium documentation.',
true
true,
);
showGallery();
}
if (galleryError) {
appendConsole(
"consoleError",
"Error loading gallery, please run the build script.",
true
true,
);
}
if (deferredLoadError) {
appendConsole(
"consoleLog",
`Unable to load demo named ${queryObject.src.replace(
".html",
""
"",
)}. Redirecting to HelloWorld.\n`,
true
true,
);
}
}
Expand All @@ -970,7 +970,7 @@ require({
line = jsEditor.setGutterMarker(
lineNumber,
"errorGutter",
makeLineLabel(e.data.error, "errorMarker")
makeLineLabel(e.data.error, "errorMarker"),
);
jsEditor.addLineClass(line, "text", "errorLine");
errorLines.push(line);
Expand All @@ -986,7 +986,7 @@ require({
highlightLine(e.data.highlight);
}
},
true
true,
);

registry.byId("jsContainer").on("show", function () {
Expand Down Expand Up @@ -1061,7 +1061,7 @@ require({
// we save a few bytes by omitting the leading [" and trailing "] since they are always the same
jsonString = jsonString.substr(2, jsonString.length - 4);
let base64String = btoa(
pako.deflate(jsonString, { raw: true, to: "string", level: 9 })
pako.deflate(jsonString, { raw: true, to: "string", level: 9 }),
);
base64String = base64String.replace(/\=+$/, ""); // remove padding

Expand Down Expand Up @@ -1107,7 +1107,7 @@ require({
let confirmChange = true;
if (demoHtml !== htmlText || demoCode !== jsText) {
confirmChange = window.confirm(
"You have unsaved changes. Are you sure you want to navigate away from this demo?"
"You have unsaved changes. Are you sure you want to navigate away from this demo?",
);
}
if (confirmChange) {
Expand All @@ -1132,7 +1132,7 @@ require({
local.headers
}\n${htmlEditor.getValue()}<script id="cesium_sandcastle_script">\n${embedInSandcastleTemplate(
jsEditor.getValue(),
false
false,
)}</script>\n` +
`</body>\n` +
`</html>\n`
Expand All @@ -1143,20 +1143,20 @@ require({
let currentDemoName = queryObject.src;
currentDemoName = currentDemoName.replace(".html", "");
const description = encodeHTML(
registry.byId("description").get("value").replace(/\n/g, "\\n")
registry.byId("description").get("value").replace(/\n/g, "\\n"),
).replace(/\"/g, "&quot;");
const label = encodeHTML(
registry.byId("label").get("value").replace(/\n/g, "\\n")
registry.byId("label").get("value").replace(/\n/g, "\\n"),
).replace(/\"/g, "&quot;");

let html = getDemoHtml();
html = html.replace(
"<title>",
`<meta name="description" content="${description}">\n <title>`
`<meta name="description" content="${description}">\n <title>`,
);
html = html.replace(
"<title>",
`<meta name="cesium-sandcastle-labels" content="${label}">\n <title>`
`<meta name="cesium-sandcastle-labels" content="${label}">\n <title>`,
);

const octetBlob = new Blob([html], {
Expand Down Expand Up @@ -1242,7 +1242,7 @@ require({
demo.description = description ? description : "";

const labelsMeta = doc.querySelector(
'meta[name="cesium-sandcastle-labels"]'
'meta[name="cesium-sandcastle-labels"]',
);
const labels = labelsMeta && labelsMeta.getAttribute("content");
if (demo.isNew) {
Expand Down Expand Up @@ -1356,7 +1356,7 @@ require({
let confirmChange = true;
if (demoHtml !== htmlText || demoCode !== jsText) {
confirmChange = window.confirm(
"You have unsaved changes. Are you sure you want to navigate away from this demo?"
"You have unsaved changes. Are you sure you want to navigate away from this demo?",
);
}
if (confirmChange) {
Expand Down
4 changes: 2 additions & 2 deletions Apps/Sandcastle/LinkButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ define([
_WidgetBase,
declare,
domClass,
template
template,
) {
"use strict";

Expand All @@ -34,6 +34,6 @@ define([
this._set("label", content);
(this.containerNode || this.focusNode).innerHTML = content;
},
}
},
);
});
Loading

0 comments on commit bf4ab9d

Please sign in to comment.