Skip to content

Commit 7689bb8

Browse files
committed
WIP: Disable type-checked linting
This fails on GitHub workflow, but not locally
1 parent b23ef3a commit 7689bb8

File tree

5 files changed

+4
-7
lines changed

5 files changed

+4
-7
lines changed

eslint.config.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ export default typescriptEslint.config([
4848
//
4949
// TypeScript
5050
//
51-
typescriptEslint.configs.recommendedTypeChecked,
51+
typescriptEslint.configs.recommended,
52+
// typescriptEslint.configs.recommendedTypeChecked,
5253
{
5354
name: 'typescript-rules',
5455
languageOptions: {

packages/react-hook-tracer/src/hooks/useReducer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export function useReducer<I, S, A>(
8484
// eslint-disable-next-line react-hooks/rules-of-hooks
8585
return useReducerTraced(reducer, initialArg, initializer, traceOptions)
8686
} else {
87-
// eslint-disable-next-line react-hooks/rules-of-hooks, @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
87+
// eslint-disable-next-line react-hooks/rules-of-hooks, @typescript-eslint/no-explicit-any
8888
return React.useReducer(reducer, initialArg as any, initializer as any)
8989
}
9090
}
@@ -120,7 +120,7 @@ const useReducerTraced = <I, S, A>(
120120
return state
121121
}
122122

123-
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
123+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
124124
const [state, dispatch] = React.useReducer(reducer, initialArg as any, initializer as any) // Unavoidable any's.
125125

126126
const showActionRef = React.useRef(showAction) // Ref to pass showAction to dispatch function.

packages/react-hook-tracer/src/hooks/useRef.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable @typescript-eslint/no-unsafe-call */
21
import { act, render, screen } from '@testing-library/react'
32

43
import { TraceLog } from '../components/TraceLog'

packages/react-hook-tracer/src/hooks/useState.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable @typescript-eslint/no-unsafe-call */
21
import { act, render, screen } from '@testing-library/react'
32

43
import { TraceLog } from '../components/TraceLog'

packages/react-hook-tracer/src/util.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,12 @@ export const showValue = (value: unknown): string => {
5656
}
5757
// For DOM elements, toString is just fine.
5858
if (value instanceof HTMLElement) {
59-
// eslint-disable-next-line @typescript-eslint/no-base-to-string
6059
return value.toString()
6160
}
6261
// For other objects, try to stringify first.
6362
try {
6463
return JSON.stringify(value)
6564
} catch (_error) {
66-
// eslint-disable-next-line @typescript-eslint/no-base-to-string
6765
return value.toString()
6866
}
6967
}

0 commit comments

Comments
 (0)