fix: fix all eslint errors

This commit is contained in:
Pihkaal
2024-09-12 16:35:37 +02:00
parent d1c7fac20d
commit 3c82f32f9d
5 changed files with 9 additions and 9 deletions

View File

@@ -3,6 +3,7 @@ import { type InnerKittyProps } from "~/utils/types";
import { CHAR_WIDTH } from "../Kitty";
import { useKitty } from "~/hooks/useKitty";
// eslint-disable-next-line @typescript-eslint/ban-types
export const Cava = (_props: {}) => {
const kitty = useKitty();
@@ -65,7 +66,7 @@ const InnerCava = (props: InnerKittyProps<typeof Cava>) => {
);
const requestRef = useRef<number>();
const calculateBarHeights = () => {
const calculateBarHeights = useCallback(() => {
if (!dataArray.current || !analyserRef.current) return;
analyserRef.current.getByteFrequencyData(dataArray.current);
@@ -99,7 +100,7 @@ const InnerCava = (props: InnerKittyProps<typeof Cava>) => {
setBarHeights(smoothedBarHeights);
requestRef.current = requestAnimationFrame(calculateBarHeights);
};
}, [barHeights, props.cols]);
useEffect(() => {
const fetchAudio = async () => {
@@ -135,7 +136,7 @@ const InnerCava = (props: InnerKittyProps<typeof Cava>) => {
if (audioContextRef.current) {
requestRef.current = requestAnimationFrame(calculateBarHeights);
} else {
fetchAudio();
void fetchAudio();
}
return () => {

View File

@@ -6,7 +6,6 @@ import { type Nvim } from "..";
import { NvimTreeDirectory } from "./NvimTreeDirectory";
import { NvimTreeChild } from "./NvimTreeChild";
import { assets } from "~/assets";
import { getIcon } from "~/utils/icons";
import {
file,
folder,

View File

@@ -17,7 +17,7 @@ export const Off = () => {
return () => clearTimeout(timout);
}
}, [booting]);
}, [state, setState, booting]);
return (
<div className="flex h-screen w-screen flex-col items-center justify-center bg-black">

View File

@@ -5,7 +5,7 @@ import { lerpIcon } from "~/utils/icons";
const ICONS = ["󰂎", "󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"];
export const WaybarBatteryWidget = (props: { frequency: number }) => {
const [battery, setBattery] = useState(100);
const [battery] = useState(100);
useEffect(() => {
const interval = setInterval(() => {

View File

@@ -5,10 +5,10 @@ export const WaybarWeatherWidget = () => {
const [temperature, setTemperature] = useState<string>("??");
useEffect(() => {
fetch("https://wttr.in/Brest?format=j1")
void fetch("https://wttr.in/Brest?format=j1")
.then((response) => response.json())
.then((data) =>
setTemperature(data.current_condition[0].temp_C as string),
.then((data: { current_condition: Array<{ temp_C: string }> }) =>
setTemperature(data.current_condition[0].temp_C),
);
}, []);