Skip to content

Commit b6e36c5

Browse files
committed
more
1 parent 0e9769c commit b6e36c5

File tree

5 files changed

+43
-64
lines changed

5 files changed

+43
-64
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
"dprint": "^0.47.4",
4141
"esbuild": "0.24.0",
4242
"eslint": "^8.57.1",
43-
"eslint-plugin-simple-import-sort": "^12.0.0",
44-
"eslint-plugin-unicorn": "^51.0.1",
43+
"eslint-plugin-simple-import-sort": "^12.1.1",
44+
"eslint-plugin-unicorn": "^56.0.0",
4545
"execa": "^9.4.1",
4646
"node-fetch": "^3.3.2",
4747
"tmp": "^0.2.3",

pnpm-lock.yaml

Lines changed: 35 additions & 58 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/esbuild/wasiWorker.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// eslint-disable-next-line unicorn/import-style
12
import { posix as path } from "node:path";
23

34
import esbuildWasmURL from "@esbuild/wasi-preview1/esbuild.wasm?url";

src/hooks.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@ import { useEffect, useState } from "react";
33

44
// Like maintine's useHash but correctly sets the initial state.
55
export function useHash() {
6-
const [hash, setHashValue] = useState(window.location.hash);
6+
const [hash, setHashValue] = useState(globalThis.location.hash);
77

88
const setHash = (value: string) => {
99
const valueWithHash = value.startsWith("#") ? value : `#${value}`;
10-
window.location.hash = valueWithHash;
10+
globalThis.location.hash = valueWithHash;
1111
setHashValue(valueWithHash);
1212
};
1313

1414
useWindowEvent("hashchange", () => {
15-
const newHash = window.location.hash;
15+
const newHash = globalThis.location.hash;
1616
if (hash !== newHash) {
1717
setHashValue(hash);
1818
}
1919
});
2020

2121
useEffect(() => {
22-
setHashValue(window.location.hash);
22+
setHashValue(globalThis.location.hash);
2323
}, []);
2424

2525
return [hash, setHash] as const;

src/twoslash.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import assert from "node:assert";
2+
// eslint-disable-next-line unicorn/import-style
23
import { posix as path } from "node:path";
34

45
import { allExtensions } from "./helpers";

0 commit comments

Comments
 (0)