Skip to content

Commit e598660

Browse files
committed
fix: eliminate eslint warning
1 parent 7c46e07 commit e598660

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"prepack": "pinst --disable",
5656
"postpack": "pinst --enable",
5757
"lint": "npx eslint . --ext .ts,.tsx,.js,.jsx --cache --fix",
58-
"lint:ci": "npx eslint . --ext .ts,.tsx,.js,.jsx --cache",
58+
"lint:ci": "npx eslint . --ext .ts,.tsx,.js,.jsx --cache --max-warnings 0",
5959
"build": "rollup -c rollup.config.ts --configPlugin swc3"
6060
},
6161
"dependencies": {

src/components/DataTypes/Object.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const PreObjectType: FC<DataItemProps<object>> = (props) => {
3434
const textColor = useTextColor()
3535
const isArray = useMemo(() => Array.isArray(props.value), [props.value])
3636
const isEmptyValue = useMemo(() => getValueSize(props.value) === 0, [props.value])
37-
const sizeOfValue = useMemo(() => inspectMetadata(props.value), [props.inspect, props.value]
37+
const sizeOfValue = useMemo(() => inspectMetadata(props.value), [props.value]
3838
)
3939
const displayObjectSize = useJsonViewerStore(store => store.displayObjectSize)
4040
const isTrap = useIsCycleReference(props.path, props.value)
@@ -81,7 +81,7 @@ export const PostObjectType: FC<DataItemProps<object>> = (props) => {
8181
const isArray = useMemo(() => Array.isArray(props.value), [props.value])
8282
const displayObjectSize = useJsonViewerStore(store => store.displayObjectSize)
8383
const isEmptyValue = useMemo(() => getValueSize(props.value) === 0, [props.value])
84-
const sizeOfValue = useMemo(() => inspectMetadata(props.value), [props.inspect, props.value])
84+
const sizeOfValue = useMemo(() => inspectMetadata(props.value), [props.value])
8585

8686
return (
8787
<Box component='span' className='data-object-end'>

tests/index.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ describe('Expand function by click on dots', () => {
411411
const { container, rerender } = render(
412412
<JsonViewer
413413
rootName={false}
414-
value={(e: any) => console.log('it works')}
414+
value={(e: string) => console.log(e)}
415415
defaultInspectDepth={0}
416416
/>
417417
)
@@ -424,7 +424,7 @@ describe('Expand function by click on dots', () => {
424424
rerender(
425425
<JsonViewer
426426
rootName={false}
427-
value={(e: any) => console.log('it works')}
427+
value={(e: string) => console.log(e)}
428428
defaultInspectDepth={0}
429429
/>
430430
)

0 commit comments

Comments
 (0)