Add quality gates: Prettier for Astro, astro check for shared, unused SCSS variable lint (#2749)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This commit is contained in:
Paweł Kuna
2026-08-03 00:47:55 +02:00
committed by GitHub
co-authored by StarDev
parent 4d04c102d3
commit 8962710163
552 changed files with 18014 additions and 19559 deletions
+17 -25
View File
@@ -1,38 +1,30 @@
---
import Icon from './Icon.astro';
import Icon from './Icon.astro'
interface Props {
icon?: string;
iconB?: string;
iconAColor?: string;
iconBColor?: string;
iconBClass?: string;
variant?: string;
active?: boolean;
icon?: string
iconB?: string
iconAColor?: string
iconBColor?: string
iconBClass?: string
variant?: string
active?: boolean
}
const {
icon = 'heart',
iconB,
iconAColor = 'muted',
iconBColor = 'red',
iconBClass,
variant,
active,
} = Astro.props;
const { icon = 'heart', iconB, iconAColor = 'muted', iconBColor = 'red', iconBClass, variant, active } = Astro.props
const resolvedIconB = iconB ?? icon ?? 'heart';
const resolvedIconB = iconB ?? icon ?? 'heart'
// switch-icon.html: star/heart force the filled variant, otherwise the passed class
const resolvedIconBClass = icon === 'star' || icon === 'heart' ? 'icon-filled' : iconBClass;
const resolvedIconBClass = icon === 'star' || icon === 'heart' ? 'icon-filled' : iconBClass
const buttonClass = ['switch-icon', variant && `switch-icon-${variant}`, active && 'active']
---
<button class:list={buttonClass} data-bs-toggle="switch-icon">
<span class={`switch-icon-a text-${iconAColor}`}>
<Icon name={icon} />
</span>
<span class={`switch-icon-b text-${iconBColor}`}>
<Icon name={resolvedIconB} class={resolvedIconBClass} />
</span>
<span class={`switch-icon-a text-${iconAColor}`}>
<Icon name={icon} />
</span>
<span class={`switch-icon-b text-${iconBColor}`}>
<Icon name={resolvedIconB} class={resolvedIconBClass} />
</span>
</button>