Skip to content

Commit 6662efa

Browse files
chore(deps): update dependency oxlint-tsgolint to v0.19.0 (#2674)
* chore(deps): update dependency oxlint-tsgolint to v0.19.0 * fix --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: JUNICHI IMAI <[email protected]>
1 parent 6818c14 commit 6662efa

4 files changed

Lines changed: 42 additions & 38 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
"msw-storybook-addon": "2.0.6",
7878
"oxfmt": "0.43.0",
7979
"oxlint": "1.58.0",
80-
"oxlint-tsgolint": "0.18.1",
80+
"oxlint-tsgolint": "0.19.0",
8181
"playwright": "1.58.2",
8282
"remark-gfm": "4.0.1",
8383
"storybook": "10.3.3",

pnpm-lock.yaml

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

src/hooks/useLocalStorage/useLocalStorage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export function useLocalStorage<T>(
9595
const current: T =
9696
currentRaw === undefined
9797
? initialValue
98-
: parseJSON<T>(currentRaw, initialValue);
98+
: parseJSON(currentRaw, initialValue);
9999
const next = isFunction(updater) ? updater(current) : updater;
100100
const serialized = JSON.stringify(next);
101101
try {

src/hooks/useMediaQuery/useMediaQuery.stories.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type { Meta, StoryObj } from "@storybook/nextjs-vite";
22
import { useId, useState } from "react";
33
import { useMediaQuery } from "./useMediaQuery";
44
import { Input } from "../../components/Input";
5+
import { isValueOf } from "../../utils/isValueOf";
56

67
const QUERIES = [
78
"(min-width: 768px)",
@@ -17,8 +18,8 @@ const meta = {
1718
layout: "centered",
1819
},
1920
render: () => {
20-
const [query, setQuery] = useState<string>(QUERIES[0]);
21-
const [lastEvent, setLastEvent] = useState<string>("none");
21+
const [query, setQuery] = useState<(typeof QUERIES)[number]>(QUERIES[0]);
22+
const [lastEvent, setLastEvent] = useState("none");
2223
const queryId = useId();
2324
const resultId = useId();
2425
const eventId = useId();
@@ -35,7 +36,10 @@ const meta = {
3536
className="rounded border p-1"
3637
id={queryId}
3738
onChange={(e) => {
38-
setQuery(e.target.value);
39+
const { value } = e.target;
40+
if (isValueOf(QUERIES, value)) {
41+
setQuery(value);
42+
}
3943
}}
4044
value={query}
4145
>

0 commit comments

Comments
 (0)