fix: resolve ESLint errors in Button and Skeleton components

- Button: suppress react-refresh/only-export-components for buttonVariants re-export
- Skeleton: replace empty interface with type alias, replace Math.random() with static widths array

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-03-09 01:25:24 -04:00
parent 177fdd4c9b
commit d916531af0
2 changed files with 5 additions and 2 deletions

View File

@@ -60,4 +60,5 @@ export function Button({
)
}
// eslint-disable-next-line react-refresh/only-export-components
export { buttonVariants }

View File

@@ -1,6 +1,6 @@
import { cn } from '@/lib/utils'
interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement> {}
type SkeletonProps = React.HTMLAttributes<HTMLDivElement>
export function Skeleton({ className, ...props }: SkeletonProps) {
return (
@@ -27,6 +27,8 @@ export function CardSkeleton({ className }: { className?: string }) {
)
}
const COL_WIDTHS = ['35%', '45%', '25%', '40%', '30%', '50%']
export function TableRowSkeleton({ cols = 4 }: { cols?: number }) {
return (
<div className="flex items-center gap-4 px-4 py-3">
@@ -34,7 +36,7 @@ export function TableRowSkeleton({ cols = 4 }: { cols?: number }) {
<Skeleton
key={i}
className="h-4"
style={{ width: `${20 + Math.random() * 30}%` }}
style={{ width: COL_WIDTHS[i % COL_WIDTHS.length] }}
/>
))}
</div>