feat(useColorScheme): new hook added #77
Annotations
10 errors and 9 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 `··`
|
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions/setup-node@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions/checkout@v2, actions/setup-node@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
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 failed
Loading