chore: enforce brackets for if clause and for/while loops

This commit is contained in:
Ilia Mashkov
2026-04-17 13:05:36 +03:00
parent cfaff46d59
commit 12e8bc0a89
25 changed files with 213 additions and 70 deletions
@@ -65,7 +65,9 @@ const sliderSpring = new Spring(50, {
const sliderPos = $derived(sliderSpring.current);
function handleMove(e: PointerEvent) {
if (!isDragging || !container) return;
if (!isDragging || !container) {
return;
}
const rect = container.getBoundingClientRect();
const x = Math.max(0, Math.min(e.clientX - rect.left, rect.width));
const percentage = (x / rect.width) * 100;
@@ -87,7 +89,9 @@ $effect(() => {
});
$effect(() => {
if (!responsive) return;
if (!responsive) {
return;
}
switch (true) {
case responsive.isMobile:
typography.multiplier = 0.5;
@@ -143,7 +147,9 @@ $effect(() => {
});
$effect(() => {
if (typeof window === 'undefined') return;
if (typeof window === 'undefined') {
return;
}
const handleResize = () => {
if (container && fontA && fontB) {
const width = container.offsetWidth;