Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
Format editor, website and npm files
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaReiser committed Aug 17, 2022
1 parent e0dfcdf commit c0de7df
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
3 changes: 2 additions & 1 deletion npm/rome/scripts/postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ if (binName) {
require("fs").chmodSync(binPath, 0o755);
} catch {
console.warn(
"The Rome CLI postinstall script failed to set execution permissions to the native binary. " + "Running Rome from the npm package will probably not work correctly.",
"The Rome CLI postinstall script failed to set execution permissions to the native binary. " +
"Running Rome from the npm package will probably not work correctly.",
);
}
}
Expand Down
3 changes: 2 additions & 1 deletion npm/rome/scripts/update-nightly-version.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ if (!version.includes("-")) {
}

if (
typeof process.env.GITHUB_SHA !== "string" || process.env.GITHUB_SHA === ""
typeof process.env.GITHUB_SHA !== "string" ||
process.env.GITHUB_SHA === ""
) {
throw new Error("GITHUB_SHA environment variable is undefined");
}
Expand Down
2 changes: 1 addition & 1 deletion website/playground/src/romeWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function getPathForType(
return PATH_SCRIPT;
}

return PATHS_MODULE[(Number(isTypeScript) * 2) + Number(isJsx)];
return PATHS_MODULE[Number(isTypeScript) * 2 + Number(isJsx)];
}

type CurrentFile = {
Expand Down
20 changes: 8 additions & 12 deletions website/playground/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,25 +58,21 @@ export function usePlaygroundState(
searchParams.get("lineWidth") ?? defaultRomeConfig.lineWidth,
),
indentStyle:
(searchParams.get(
"indentStyle",
) as IndentStyle) ?? defaultRomeConfig.indentStyle,
(searchParams.get("indentStyle") as IndentStyle) ??
defaultRomeConfig.indentStyle,
quoteStyle:
(searchParams.get(
"quoteStyle",
) as QuoteStyle) ?? defaultRomeConfig.quoteStyle,
(searchParams.get("quoteStyle") as QuoteStyle) ??
defaultRomeConfig.quoteStyle,
indentWidth: parseInt(
searchParams.get("indentWidth") ?? defaultRomeConfig.indentWidth,
),
isTypeScript:
searchParams.get(
"typescript",
) === "true" || defaultRomeConfig.isTypeScript,
searchParams.get("typescript") === "true" ||
defaultRomeConfig.isTypeScript,
isJsx: searchParams.get("jsx") === "true" || defaultRomeConfig.isJsx,
sourceType:
(searchParams.get(
"sourceType",
) as SourceType) ?? defaultRomeConfig.sourceType,
(searchParams.get("sourceType") as SourceType) ??
defaultRomeConfig.sourceType,
cursorPosition: 0,
});
const [playgroundState, setPlaygroundState] = useState(initState());
Expand Down
4 changes: 2 additions & 2 deletions website/src/_data/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ module.exports = {
// Prod: pk_live_51HfdGeFXA6dCpYSpI1yUt3vEbUE0AAV0swlTUuBL7XSdzSERrqkNAsitFuTaqDxdS7HcIs5wf0PG4Mqtys01LANs00GteBJgws
// Test: pk_test_51HfdGeFXA6dCpYSpScbeo75rVpehHpEPqE5QysKBwJVTnN1NjAgEuGkEHfsgQpBe1KlYwWSeTaUa5ELDSJBPKjzI00ku8lUamF
STRIPE_PUBLIC:
process.env
.STRIPE_CLIENT || "pk_live_51HfdGeFXA6dCpYSpI1yUt3vEbUE0AAV0swlTUuBL7XSdzSERrqkNAsitFuTaqDxdS7HcIs5wf0PG4Mqtys01LANs00GteBJgws",
process.env.STRIPE_CLIENT ||
"pk_live_51HfdGeFXA6dCpYSpI1yUt3vEbUE0AAV0swlTUuBL7XSdzSERrqkNAsitFuTaqDxdS7HcIs5wf0PG4Mqtys01LANs00GteBJgws",
};
3 changes: 2 additions & 1 deletion website/src/_includes/scripts/funding.js
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,8 @@ for (const elem of saveElements) {
// Show custom input if we hydrated it with a value that doesn't correspond with a button

if (
tipInput.value !== "" && !document.querySelector(
tipInput.value !== "" &&
!document.querySelector(
`.add-donation-buttons[data-price="${tipInput.value}"]`,
)
) {
Expand Down
5 changes: 3 additions & 2 deletions website/src/_includes/scripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ class Manager {
if (existing !== undefined) {
const recalculated = this.calculateHeading(i, []);
if (
recalculated.start === existing.start && recalculated.end === existing.end
recalculated.start === existing.start &&
recalculated.end === existing.end
) {
return;
}
Expand Down Expand Up @@ -703,7 +704,7 @@ for (const scroller of heroScrollers) {
}

function isOverflow(index) {
return (index - activeStartIndex) >= initialItems.length;
return index - activeStartIndex >= initialItems.length;
}

function setActiveIndex(newActiveIndex, smooth) {
Expand Down

0 comments on commit c0de7df

Please sign in to comment.