Skip to content

Commit 94bb888

Browse files
committed
make eslint manual fixes
1 parent b8d1f40 commit 94bb888

4 files changed

Lines changed: 9 additions & 5 deletions

File tree

src/engine/query.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export const useAbstractQuery = <
107107
let parsed: Partial<TQuery>
108108
try {
109109
parsed = parseQuery(query)
110-
} catch (e) {
110+
} catch {
111111
parsed = {}
112112
}
113113
return {

src/routers/__test__/nextRouter.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ import { z } from 'zod'
55
import { useQuery, useQueryAndPagination } from '../../zod/routers/nextRouter'
66
import { usePagination } from '../nextRouter'
77

8-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
9-
vi.mock('next/router', () => require('next-router-mock'))
8+
vi.mock('next/router', () => import('next-router-mock'))
109

1110
describe('NextRouter', () => {
1211
beforeEach(() => {
@@ -238,7 +237,7 @@ describe('NextRouter', () => {
238237
const defaultAge = 42
239238
const defaultBirthDate = new Date()
240239
defaultBirthDate.setMilliseconds(0)
241-
const defaultNetWorth = BigInt(0xf8ffffffffffffffffffffffffff2fffn)
240+
const defaultNetWorth = 0xf8ffffffffffffffffffffffffff2fffn
242241
const defaultDarkMode = true as boolean
243242

244243
const schema = z.object({

src/routers/nextRouter.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const useNextRouter = (
2525

2626
// Make sure Next router has a stable reference to use in callbacks
2727
const routerRef = useRef(nextRouter)
28+
// eslint-disable-next-line react-hooks/refs
2829
routerRef.current = nextRouter
2930

3031
const mergedOptions = useMemo(

src/zod/util.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ import { z } from 'zod'
22
import { AbstractQuery, ParseQuery } from '../engine/query'
33

44
export const zodParser =
5-
<Output extends AbstractQuery, TSchema extends z.ZodType<Output>>(
5+
<
6+
Output extends AbstractQuery,
7+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
8+
TSchema extends z.ZodType<Output>,
9+
>(
610
schema: TSchema,
711
): ParseQuery<Output> =>
812
(q) =>

0 commit comments

Comments
 (0)