chore: add pre-commit hooks, tighten ESLint, activate Sentry DSN, publish CI coverage (Phase 1)
- Install husky v9 + lint-staged: pre-commit runs eslint --fix and prettier on staged files - Tighten ESLint base config: no-console→error, ban-ts-comment (ts-ignore banned, ts-expect-error with description allowed), reportUnusedDisableDirectives→error - Migrate web app from deprecated `next lint` to `eslint src/` with flat config and react-hooks plugin - Convert all 5 @ts-ignore to @ts-expect-error with descriptions, remove stale disable comments - Add NEXT_PUBLIC_SENTRY_DSN to docker-compose.prod.yml and .env.example - Add coverage artifact upload step to CI test job - Pre-existing violations (102 warnings) downgraded to warn in web config for Phase 2 cleanup Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { Children, cloneElement, isValidElement, ReactNode } from "react";
|
||||
import type { ReactNode } from "react";
|
||||
import { Children, cloneElement, isValidElement } from "react";
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
/* ShimmerSkeleton */
|
||||
@@ -44,21 +45,15 @@ export function ShimmerSkeleton({
|
||||
const resolvedWidth = width ?? defaults?.width ?? "100%";
|
||||
const resolvedHeight = height ?? defaults?.height ?? 40;
|
||||
const resolvedRounded = rounded
|
||||
? roundedMap[rounded] ?? "rounded-md"
|
||||
: defaults?.rounded ?? "rounded-md";
|
||||
? (roundedMap[rounded] ?? "rounded-md")
|
||||
: (defaults?.rounded ?? "rounded-md");
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`shimmer-skeleton ${resolvedRounded} ${className}`}
|
||||
style={{
|
||||
width:
|
||||
typeof resolvedWidth === "number"
|
||||
? `${resolvedWidth}px`
|
||||
: resolvedWidth,
|
||||
height:
|
||||
typeof resolvedHeight === "number"
|
||||
? `${resolvedHeight}px`
|
||||
: resolvedHeight,
|
||||
width: typeof resolvedWidth === "number" ? `${resolvedWidth}px` : resolvedWidth,
|
||||
height: typeof resolvedHeight === "number" ? `${resolvedHeight}px` : resolvedHeight,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -74,11 +69,7 @@ interface ShimmerGroupProps {
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export function ShimmerGroup({
|
||||
children,
|
||||
staggerMs = 50,
|
||||
className,
|
||||
}: ShimmerGroupProps) {
|
||||
export function ShimmerGroup({ children, staggerMs = 50, className }: ShimmerGroupProps) {
|
||||
return (
|
||||
<div className={className}>
|
||||
{Children.map(children, (child, index) => {
|
||||
|
||||
Reference in New Issue
Block a user