Skip to content

Commit d0ff3b0

Browse files
committed
Fix lints.
1 parent f20a520 commit d0ff3b0

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

biome.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
2+
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
23
"formatter": {
34
"indentStyle": "space",
4-
"indentSize": 2
5+
"indentWidth": 2
56
},
67
"linter": {
78
"enabled": true,

src/scramble.ts

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { Alg } from "cubing/alg";
1+
import type { Alg } from "cubing/alg";
22
import { wcaEventInfo } from "cubing/puzzles";
33
import { randomScrambleForEvent } from "cubing/scramble";
44
import { setSearchDebug } from "cubing/search";
55
import "cubing/twisty";
6-
import { PuzzleID, TwistyPlayer } from "cubing/twisty";
6+
import type { PuzzleID, TwistyPlayer } from "cubing/twisty";
77

88
function updateURLParam(key, value, defaultValue): void {
99
const url = new URL(location.href);
@@ -42,6 +42,7 @@ const unofficialEvents: Record<string, EventInfo> = {
4242

4343
const { searchParams } = new URL(location.href);
4444
const event = searchParams.get("event") ?? "333";
45+
// biome-ignore lint/style/noNonNullAssertion: TODO
4546
const eventInfo: EventInfo = wcaEventInfo(event) ?? unofficialEvents[event]!;
4647

4748
const cubingIcon = document.querySelector("#event-selector") as HTMLElement;
@@ -78,13 +79,13 @@ for (const button of document.querySelectorAll("#event-grid button")) {
7879
});
7980
}
8081

81-
const tempoScale = parseFloat(searchParams.get("tempo-scale") ?? "10");
82+
const tempoScale = Number.parseFloat(searchParams.get("tempo-scale") ?? "10");
8283
player.tempoScale = tempoScale;
8384
const tempoSlider = document.querySelector(
8485
"#speed-wrapper input",
8586
) as HTMLInputElement;
8687
tempoSlider.addEventListener("input", () => {
87-
player.tempoScale = parseFloat(tempoSlider.value);
88+
player.tempoScale = Number.parseFloat(tempoSlider.value);
8889
updateURLParam("tempo-scale", tempoSlider.value, "10");
8990
});
9091
tempoSlider.value = tempoScale.toString();
@@ -104,6 +105,7 @@ if (visualizationIs2D) {
104105
}
105106

106107
const eventName = eventInfo.eventName;
108+
// biome-ignore lint/style/noNonNullAssertion: DOM binding
107109
const generating = document.querySelector("#generating")!;
108110
player.puzzle = eventInfo.puzzleID;
109111
textElem.classList.add(`event-${event}`);
@@ -132,12 +134,14 @@ async function rescramble() {
132134
}
133135
rescramble();
134136

137+
// biome-ignore lint/style/noNonNullAssertion: DOM binding
135138
const rescrambleElem = document.querySelector("#rescramble")!;
136139
rescrambleElem.addEventListener("click", rescramble);
137140
const showRescrambleCheckbox = document.querySelector(
138141
"#show-rescramble",
139142
) as HTMLInputElement;
140143
if (
144+
// biome-ignore lint/suspicious/noExplicitAny: Workaround
141145
(navigator as any).standalone // Safari workaround
142146
) {
143147
rescrambleElem.classList.add("force-show");

0 commit comments

Comments
 (0)