feat(useColorScheme): new hook added #78
Annotations
11 errors and 7 warnings
|
src/useColorScheme/index.tsx#L1
Replace `"react"` with `'react'`
|
src/useColorScheme/index.tsx#L4
Replace `·window.matchMedia·&&` with `⏎····window.matchMedia·&&⏎···`
|
src/useColorScheme/index.tsx#L6
Replace `isDarkMode·?·'dark'·:·'light'` with `⏎····isDarkMode·?·'dark'·:·'light'⏎··`
|
src/useColorScheme/index.tsx#L9
Replace `⏎····window.matchMedia('(prefers-color-scheme:·dark)').addEventListener('change',·event` with `····window⏎······.matchMedia('(prefers-color-scheme:·dark)')⏎······.addEventListener('change',·(event)`
|
src/useColorScheme/index.tsx#L11
Replace `······const·newColorScheme·=·event.matches·?·"dark"·:·"light"` with `········const·newColorScheme·=·event.matches·?·'dark'·:·'light';`
|
src/useColorScheme/index.tsx#L12
Replace `······` with `········`
|
src/useColorScheme/index.tsx#L13
Insert `··`
|
src/useColorScheme/index.tsx#L16
Replace `.matchMedia('(prefers-color-scheme:·dark)').removeEventListener('change',·event` with `⏎········.matchMedia('(prefers-color-scheme:·dark)')⏎········.removeEventListener('change',·(event)`
|
src/useColorScheme/index.tsx#L17
Replace `········setColorScheme(event.matches·?·"dark"·:·"light"` with `··········setColorScheme(event.matches·?·'dark'·:·'light'`
|
src/useColorScheme/index.tsx#L18
Insert `··`
|
src/useAsync/index.tsx#L17
React Hook useCallback was passed a dependency list that is not an array literal. This means we can't statically verify whether you've passed the correct dependencies
|
src/useAsync/index.tsx#L17
React Hook useCallback has a missing dependency: 'callback'. Either include it or remove the dependency array. If 'callback' changes too often, find the parent component that defines it and wrap that definition in useCallback
|
src/useClickOutside/index.tsx#L17
Assignments to the 'events' variable from inside React Hook useEffect will be lost after each render. To preserve the value over time, store it in a useRef Hook and keep the mutable value in the '.current' property. Otherwise, you can move this variable directly inside useEffect
|
src/useDebounce/index.tsx#L11
React Hook useEffect has a missing dependency: 'clear'. Either include it or remove the dependency array
|
src/useHash/index.tsx#L15
React Hook React.useEffect has a missing dependency: 'hashChangeHandler'. Either include it or remove the dependency array
|
src/useStateJson/index.tsx#L9
React Hook useCallback has a missing dependency: 'json'. Either include it or remove the dependency array
|
src/useUpdate/index.tsx#L15
React Hook useEffect has a missing dependency: 'callback'. Either include it or remove the dependency array. If 'callback' changes too often, find the parent component that defines it and wrap that definition in useCallback
|
This job was cancelled
Loading