diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d420632..f524c2b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,14 +32,20 @@ jobs: - name: Install pnpm run: npm install --global pnpm@11.10.0 + - name: Set up uv + uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 + + - name: Set up just + uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4 + - name: Install dependencies - run: pnpm install --frozen-lockfile + run: just setup - name: Run static and build checks - run: pnpm run check + run: just check - name: Install Chromium run: pnpm exec playwright install --with-deps chromium - name: Qualify packed package and browser - run: pnpm run qualify + run: just test-integration diff --git a/.gitignore b/.gitignore index 1b90279..1e24aa5 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,6 @@ npm-debug.log* # Misc .DS_Store *.pem + +# Python tooling cache +__pycache__/ diff --git a/.loc.json b/.loc.json new file mode 100644 index 0000000..fc1f8a0 --- /dev/null +++ b/.loc.json @@ -0,0 +1,33 @@ +{ + "exceptions": { + "apps/playground/src/App.tsx": { + "max": 3413, + "reason": "Existing component and demo responsibilities; extract cohesive modules in the follow-up refactor. No growth." + }, + "apps/playground/src/mining-pages.tsx": { + "max": 720, + "reason": "Existing component and demo responsibilities; extract cohesive modules in the follow-up refactor. No growth." + }, + "packages/ui/src/blocks/campaign-schedule-matrix.tsx": { + "max": 994, + "reason": "Existing component and demo responsibilities; extract cohesive modules in the follow-up refactor. No growth." + }, + "packages/ui/src/blocks/creator-transfer.tsx": { + "max": 626, + "reason": "Existing component and demo responsibilities; extract cohesive modules in the follow-up refactor. No growth." + }, + "packages/ui/src/blocks/navigation-panel.tsx": { + "max": 1349, + "reason": "Existing component and demo responsibilities; extract cohesive modules in the follow-up refactor. No growth." + }, + "packages/ui/src/components/line-item-graph.tsx": { + "max": 896, + "reason": "Existing component and demo responsibilities; extract cohesive modules in the follow-up refactor. No growth." + }, + "tests/e2e/qualification.spec.ts": { + "max": 1540, + "reason": "Existing browser qualification scenarios; split by tested feature in the follow-up refactor. No growth." + } + }, + "excluded": {} +} diff --git a/.oxlintrc.json b/.oxlintrc.json new file mode 100644 index 0000000..5323f65 --- /dev/null +++ b/.oxlintrc.json @@ -0,0 +1,26 @@ +{ + "plugins": ["typescript", "unicorn", "oxc", "react", "jsx-a11y"], + "categories": { + "correctness": "error" + }, + "rules": { + "complexity": ["error", 12], + "max-lines-per-function": [ + "error", + { + "max": 100, + "skipBlankLines": true, + "skipComments": true + } + ], + "react/rules-of-hooks": "error", + "react/exhaustive-deps": "error", + "jsx-a11y/label-has-associated-control": [ + "error", + { + "controlComponents": ["Input"] + } + ] + }, + "ignorePatterns": ["**/dist/**", "output/**"] +} diff --git a/.prettierignore b/.prettierignore index 209509f..7dc32bc 100644 --- a/.prettierignore +++ b/.prettierignore @@ -3,4 +3,10 @@ node_modules/ .turbo/ coverage/ pnpm-lock.yaml -.pnpm-store/ \ No newline at end of file +.pnpm-store/ +output/ +.ask-pro/ +.playwright-cli/ +.impeccable/ +# Upstream-owned copy from meta; preserve its original formatting. +docs/brand_assets/NEXTIDE_BRAND_AGENT_GUIDE.md diff --git a/AGENTS.md b/AGENTS.md index 3d8e717..08e1022 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -13,3 +13,5 @@ This repo is the shared `@nextide/ui` package. The playground exists only as a l - Keep React Doctor healthy from time to time with `npx react-doctor@latest`; treat warnings as cleanup candidates before they pile up. - Do not assume backwards compatibility. If compatibility expectations are unclear, ask before locking the direction. - Never write product decisions, implementation details, API routing, fallback mechanics, or other internal plumbing into user-facing or agent-facing text. UI copy, notices, docs, prompts, labels, and tool messages should describe the user goal, required action, or visible state, not how the system is internally wired. + +Use `just setup` and `just check` for the shared development baseline; see README.md for focused tests and browser prerequisites. Keep named LOC budgets and function debt exceptions from growing. diff --git a/README.md b/README.md index 75cc906..f74f991 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,33 @@ Shared Nextide shadcn/ui components with a Vite playground. Run `pnpm dev`, then open [http://127.0.0.1:5174](http://127.0.0.1:5174) to view the component catalogue. +## Development checks + +Install Node 22.14+, pnpm 11.10.0, `just`, and uv. On Windows, add Git for +Windows' `bin` directory to PATH so `just` can find `sh`. + +- `just setup` installs the frozen workspace lockfile. +- `just check` runs Prettier, Oxlint, existing ESLint, the supply-chain watchlist, + LOC budgets, strict TypeScript checks, and packed-consumer qualification. +- `just fmt`, `just fmt-check`, `just lint`, and `just typecheck` run separately. +- `just test` runs the packed-consumer check through Node's test runner; native + flags and file selection work, e.g. `just test --test-reporter=spec scripts/check-packed-consumer.mjs`. + This check builds and packs the library and installs an isolated consumer, so + it needs npm registry access. There is currently one local test file. +- `just test-integration` builds both workspaces and runs Playwright. First run + `pnpm exec playwright install chromium` (Linux CI also uses `--with-deps`). + Port 4173 must be free. Focus with `just test-integration -g "campaign schedule"`. + +The [shared baseline](https://github.com/nextidemedia/meta/blob/main/docs/development-baseline.md) +sets complexity 12, function length 100, and source/test LOC limits. `.loc.json` +records exact legacy file budgets; reduce them after extraction and never grow +or regenerate them to accept new code. Narrow function comments record each +existing metric and the extraction debt; they are not permission to grow those +functions. Accessibility exceptions explain specific SVG, forwarded-prop, or +scroll-region semantics. Existing ESLint/React Hooks rules remain until parity +with Oxlint is verified. Oxlint 1.80.0 was the newest stable npm release at least +seven days old on 2026-09-08; the existing formatter and TypeScript remain pinned. + ## Brand The implementation guide from `nextide-saas-meta` is copied into `docs/brand_assets/NEXTIDE_BRAND_AGENT_GUIDE.md`. The large PDF and font zip stay in the meta repo for now. diff --git a/apps/playground/package.json b/apps/playground/package.json index f6eb472..b9d221d 100644 --- a/apps/playground/package.json +++ b/apps/playground/package.json @@ -8,7 +8,7 @@ "build": "tsc -b && vite build", "lint": "eslint", "format": "prettier --write \"**/*.{ts,tsx}\"", - "typecheck": "tsc --noEmit", + "typecheck": "tsc -b", "preview": "vite preview" }, "dependencies": { diff --git a/apps/playground/src/App.tsx b/apps/playground/src/App.tsx index acf03d6..9924539 100644 --- a/apps/playground/src/App.tsx +++ b/apps/playground/src/App.tsx @@ -1239,6 +1239,7 @@ function formatLargeMetricValue(value: number) { const formatCompactMetricValue = formatCompactNumber +// oxlint-disable-next-line complexity, max-lines-per-function -- Legacy baseline: function `App` has a complexity of 33; The function `App` has too many lines (412); extract this function in the follow-up refactor. export function App() { const [settingsOpen, setSettingsOpen] = useState(false) const [playgroundSessionActive, setPlaygroundSessionActive] = useState(true) @@ -1735,6 +1736,7 @@ function KrakenDiscoveryPreview({ activeItemId }: { activeItemId: string }) { ) } +// oxlint-disable-next-line max-lines-per-function -- Legacy baseline: The function `IntelligencePlayground` has too many lines (219); extract this function in the follow-up refactor. function IntelligencePlayground({ selectedCreatorIds, dateRange, @@ -1962,6 +1964,7 @@ function IntelligencePlayground({ ) } +// oxlint-disable-next-line max-lines-per-function -- Legacy baseline: The function `DaedalusPlayground` has too many lines (293); extract this function in the follow-up refactor. function DaedalusPlayground({ filterGroupId, selectedFilterId, @@ -2293,6 +2296,7 @@ function ChartDirection({ ) } +// oxlint-disable-next-line max-lines-per-function -- Legacy baseline: The function `FoundationsPreview` has too many lines (154); extract this function in the follow-up refactor. function FoundationsPreview() { return (
@@ -2636,6 +2640,7 @@ function FoundationSwatch({ ) } +// oxlint-disable-next-line max-lines-per-function -- Legacy baseline: The function `ComponentMatrix` has too many lines (562); extract this function in the follow-up refactor. function ComponentMatrix({ density, confidence, @@ -3209,6 +3214,7 @@ function ComponentMatrix({ ) } +// oxlint-disable-next-line max-lines-per-function -- Legacy baseline: The function `BlockPreview` has too many lines (238); extract this function in the follow-up refactor. function BlockPreview({ motionScale }: { motionScale: number }) { const navigationDrawer = useStagedDrawer({ durationMs: DRAWER_STAGE_DURATION_MS * motionScale, diff --git a/apps/playground/src/mining-pages.tsx b/apps/playground/src/mining-pages.tsx index 8a16e88..377a0a5 100644 --- a/apps/playground/src/mining-pages.tsx +++ b/apps/playground/src/mining-pages.tsx @@ -197,6 +197,7 @@ const reportHistory: ReportRailItem[] = [ }, ] +// oxlint-disable-next-line max-lines-per-function -- Legacy baseline: The function `WebMiningPage` has too many lines (218); extract this function in the follow-up refactor. function WebMiningPage() { const [activeBookingId, setActiveBookingId] = useState("booking-2") const [activePresetId, setActivePresetId] = useState("7d") @@ -421,6 +422,7 @@ function WebMiningPage() { ) } +// oxlint-disable-next-line max-lines-per-function -- Legacy baseline: The function `KrakenMiningPage` has too many lines (137); extract this function in the follow-up refactor. function KrakenMiningPage() { const [activeRunId, setActiveRunId] = useState("run-2") const activeRun = runRows.find((row) => row.id === activeRunId) ?? runRows[0] @@ -563,6 +565,7 @@ function KrakenMiningPage() { ) } +// oxlint-disable-next-line max-lines-per-function -- Legacy baseline: The function `IntelligenceReportMiningPage` has too many lines (173); extract this function in the follow-up refactor. function IntelligenceReportMiningPage() { const [activeReportId, setActiveReportId] = useState("report-current") diff --git a/justfile b/justfile new file mode 100644 index 0000000..33e9e38 --- /dev/null +++ b/justfile @@ -0,0 +1,26 @@ +set positional-arguments + +setup: + pnpm install --frozen-lockfile + +lint: + pnpm run lint + uv run --no-project --python 3.12 python scripts/check_loc.py + +fmt: + pnpm run format + +fmt-check: + pnpm run format:check + +typecheck: + pnpm run typecheck + +test *args="scripts/check-packed-consumer.mjs": + node --test "$@" + +test-integration *args: + pnpm run build + pnpm exec playwright test "$@" + +check: fmt-check lint typecheck test diff --git a/package.json b/package.json index 85d634b..d2a8b39 100644 --- a/package.json +++ b/package.json @@ -4,19 +4,21 @@ "private": true, "scripts": { "build": "turbo build", - "check": "pnpm run lint && pnpm run typecheck && pnpm run build && pnpm run security:watchlist", + "check": "pnpm run lint && pnpm run typecheck && pnpm run build", "dev": "turbo dev", - "lint": "turbo lint", - "format": "turbo format", + "lint": "pnpm exec oxlint --deny-warnings && turbo lint && pnpm run security:watchlist", + "format": "prettier --write .", "qualify": "pnpm run test:package && pnpm --filter playground build && playwright test", "typecheck": "turbo typecheck", "security:watchlist": "node scripts/check-supply-chain.mjs", "test:e2e": "pnpm run build && playwright test", - "test:package": "node scripts/check-packed-consumer.mjs" + "test:package": "node scripts/check-packed-consumer.mjs", + "format:check": "prettier --check ." }, "devDependencies": { "@axe-core/playwright": "4.12.1", "@playwright/test": "1.61.1", + "oxlint": "1.80.0", "prettier": "3.8.4", "prettier-plugin-tailwindcss": "0.8.0", "turbo": "2.9.18", diff --git a/packages/ui/src/blocks/campaign-schedule-matrix.tsx b/packages/ui/src/blocks/campaign-schedule-matrix.tsx index eca4a06..f0bf86c 100644 --- a/packages/ui/src/blocks/campaign-schedule-matrix.tsx +++ b/packages/ui/src/blocks/campaign-schedule-matrix.tsx @@ -125,6 +125,7 @@ const monthFormatter = new Intl.DateTimeFormat("en-US", { timeZone: "UTC", }) +// oxlint-disable-next-line complexity, max-lines-per-function -- Legacy baseline: function `CampaignScheduleMatrix` has a complexity of 17; The function `CampaignScheduleMatrix` has too many lines (596); extract this function in the follow-up refactor. function CampaignScheduleMatrix({ creators, days, @@ -327,6 +328,7 @@ function CampaignScheduleMatrix({ const node = scrollRef.current if (!node) return + // oxlint-disable-next-line complexity -- Legacy baseline: function has a complexity of 21; extract this function in the follow-up refactor. const handleWheel = (event: WheelEvent) => { const target = event.target const overBoard = @@ -593,10 +595,13 @@ function CampaignScheduleMatrix({ {/* oxlint-disable-next-line react-doctor/click-events-have-key-events -- This region only cancels bubbled child clicks after a pointer drag; it is not an activation target. */} + {/* oxlint-disable-next-line jsx-a11y/no-noninteractive-element-interactions -- Named scroll region supports keyboard scrolling and pointer panning; it is not an activation target. */}
{ if (motionLocked) { const alreadyQueued = queuedTransfers.current.some( diff --git a/packages/ui/src/blocks/dashboard-filter-bar.tsx b/packages/ui/src/blocks/dashboard-filter-bar.tsx index 7786f53..48334b3 100644 --- a/packages/ui/src/blocks/dashboard-filter-bar.tsx +++ b/packages/ui/src/blocks/dashboard-filter-bar.tsx @@ -30,6 +30,7 @@ type DashboardFilterItem = { live?: boolean } +// oxlint-disable-next-line max-lines-per-function -- Legacy baseline: The function `DashboardFilterBar` has too many lines (208); extract this function in the follow-up refactor. function DashboardFilterBar({ groups, items, diff --git a/packages/ui/src/blocks/evidence-drawer.tsx b/packages/ui/src/blocks/evidence-drawer.tsx index ea4b18f..fb70ac5 100644 --- a/packages/ui/src/blocks/evidence-drawer.tsx +++ b/packages/ui/src/blocks/evidence-drawer.tsx @@ -135,7 +135,7 @@ function EvidenceChoice({ label: React.ReactNode }) { return ( - + {icon} {label} diff --git a/packages/ui/src/blocks/export-workbench.tsx b/packages/ui/src/blocks/export-workbench.tsx index aaa5205..4041fdd 100644 --- a/packages/ui/src/blocks/export-workbench.tsx +++ b/packages/ui/src/blocks/export-workbench.tsx @@ -35,6 +35,7 @@ type ExportSessionRow = { status: React.ReactNode } +// oxlint-disable-next-line max-lines-per-function -- Legacy baseline: The function `ExportWorkbench` has too many lines (163); extract this function in the follow-up refactor. function ExportWorkbench({ schedule, onScheduleChange, diff --git a/packages/ui/src/blocks/fit-leaderboard.tsx b/packages/ui/src/blocks/fit-leaderboard.tsx index 4ab8a8f..1c0e4af 100644 --- a/packages/ui/src/blocks/fit-leaderboard.tsx +++ b/packages/ui/src/blocks/fit-leaderboard.tsx @@ -88,16 +88,8 @@ function FitLeaderboard({ ) : null} - - + + = { success: "border-nextide-tide/35 [--score-plate:var(--nextide-tide)]", - processing: - "border-nextide-purple/35 [--score-plate:var(--nextide-purple)]", + processing: "border-nextide-purple/35 [--score-plate:var(--nextide-purple)]", warning: "border-nextide-yellow/35 [--score-plate:var(--nextide-yellow)]", danger: "border-nextide-red/35 [--score-plate:var(--nextide-red)]", neutral: "border-nextide-line [--score-plate:var(--muted-foreground)]", @@ -130,8 +126,7 @@ function ScorePlate({ value?: number max: number }) { - const valid = - typeof value === "number" && Number.isFinite(value) && max > 0 + const valid = typeof value === "number" && Number.isFinite(value) && max > 0 const boundedValue = valid ? Math.max(0, Math.min(max, value)) : 0 const progress = max > 0 ? (boundedValue / max) * 100 : 0 const tone = scoreTone(value, max) diff --git a/packages/ui/src/blocks/intelligence-progression-chart.tsx b/packages/ui/src/blocks/intelligence-progression-chart.tsx index 74c486d..dc1f316 100644 --- a/packages/ui/src/blocks/intelligence-progression-chart.tsx +++ b/packages/ui/src/blocks/intelligence-progression-chart.tsx @@ -79,6 +79,7 @@ const progressionEdges = [ const initialGeometry: ChartGeometry = { width: 1, height: 1, nodes: {} } +// oxlint-disable-next-line max-lines-per-function -- Legacy baseline: The function `IntelligenceProgressionChart` has too many lines (246); extract this function in the follow-up refactor. function IntelligenceProgressionChart({ stages, title = "Intelligence progression", @@ -259,6 +260,7 @@ function IntelligenceProgressionChart({ ))} + {/* oxlint-disable-next-line complexity -- Legacy baseline: function has a complexity of 14; extract this function in the follow-up refactor. */} {stages.map((stage, index) => { const position = stagePositions[stage.id] ?? { x: 50, y: 50 } const processingTextSyncLength = diff --git a/packages/ui/src/blocks/live-event-proof-modal.tsx b/packages/ui/src/blocks/live-event-proof-modal.tsx index 205d1f0..7f5b0f7 100644 --- a/packages/ui/src/blocks/live-event-proof-modal.tsx +++ b/packages/ui/src/blocks/live-event-proof-modal.tsx @@ -29,6 +29,7 @@ type LiveEventProofEvidenceField = { value: React.ReactNode } +// oxlint-disable-next-line max-lines-per-function -- Legacy baseline: The function `LiveEventProofModal` has too many lines (161); extract this function in the follow-up refactor. function LiveEventProofModal({ creatorLabel, creatorMark, diff --git a/packages/ui/src/blocks/live-event-timeline.tsx b/packages/ui/src/blocks/live-event-timeline.tsx index 227dc3f..919a0ea 100644 --- a/packages/ui/src/blocks/live-event-timeline.tsx +++ b/packages/ui/src/blocks/live-event-timeline.tsx @@ -48,6 +48,7 @@ const severityClasses: Record = { critical: "border-nextide-red bg-nextide-red/15 text-nextide-red", } +// oxlint-disable-next-line max-lines-per-function -- Legacy baseline: The function `LiveEventTimeline` has too many lines (122); extract this function in the follow-up refactor. function LiveEventTimeline({ incidents, activeIncidentId, diff --git a/packages/ui/src/blocks/liveguard-cockpit.tsx b/packages/ui/src/blocks/liveguard-cockpit.tsx index 928aa47..b3a023e 100644 --- a/packages/ui/src/blocks/liveguard-cockpit.tsx +++ b/packages/ui/src/blocks/liveguard-cockpit.tsx @@ -35,6 +35,7 @@ type LiveguardIncidentRow = { summary: React.ReactNode } +// oxlint-disable-next-line max-lines-per-function -- Legacy baseline: The function `LiveguardCockpit` has too many lines (139); extract this function in the follow-up refactor. function LiveguardCockpit({ enabled, activeRules, diff --git a/packages/ui/src/blocks/liveguard-incident-review.tsx b/packages/ui/src/blocks/liveguard-incident-review.tsx index 1b9686a..6162a07 100644 --- a/packages/ui/src/blocks/liveguard-incident-review.tsx +++ b/packages/ui/src/blocks/liveguard-incident-review.tsx @@ -34,6 +34,7 @@ const eventToneClasses = { danger: "border-nextide-red/45 bg-nextide-red/10", } +// oxlint-disable-next-line max-lines-per-function -- Legacy baseline: The function `LiveguardIncidentReview` has too many lines (128); extract this function in the follow-up refactor. function LiveguardIncidentReview({ title = "LiveGuard incident review", description = "Creator timeline, transcript proof, and score threshold evidence.", diff --git a/packages/ui/src/blocks/navigation-panel.tsx b/packages/ui/src/blocks/navigation-panel.tsx index 0ec04a2..44a26ed 100644 --- a/packages/ui/src/blocks/navigation-panel.tsx +++ b/packages/ui/src/blocks/navigation-panel.tsx @@ -187,6 +187,7 @@ type NavigationPanelFooterProps = { userMenu?: NavigationPanelUserMenu } +// oxlint-disable-next-line complexity, max-lines-per-function -- Legacy baseline: function `NavigationPanelCommandRow` has a complexity of 46; The function `NavigationPanelCommandRow` has too many lines (293); extract this function in the follow-up refactor. function NavigationPanelCommandRow({ density, collapsed, @@ -495,6 +496,7 @@ function NavigationPanelCommandRow({ ) } +// oxlint-disable-next-line complexity, max-lines-per-function -- Legacy baseline: function `NavigationPanelNav` has a complexity of 23; The function `NavigationPanelNav` has too many lines (619); extract this function in the follow-up refactor. function NavigationPanelNav({ sections, activeItemId, @@ -594,6 +596,7 @@ function NavigationPanelNav({ [collapsed, navRef, writeOutlineVars] ) + // oxlint-disable-next-line complexity -- Legacy baseline: function has a complexity of 22; extract this function in the follow-up refactor. React.useLayoutEffect(() => { const nav = navRef.current if (!nav) return @@ -825,6 +828,7 @@ function NavigationPanelNav({ height: "var(--navigation-rail-height, 0px)", }} /> + {/* oxlint-disable-next-line complexity, max-lines-per-function -- Legacy baseline: function has a complexity of 15; The function has too many lines (310); extract this function in the follow-up refactor. */} {sections.map((section) => (
+ {/* oxlint-disable-next-line complexity, max-lines-per-function -- Legacy baseline: function has a complexity of 63; The function has too many lines (262); extract this function in the follow-up refactor. */} {section.items.map((item) => { const active = item.id === activeItemId const activeChild = item.children?.find( @@ -1209,6 +1214,7 @@ function NavigationPanelFooter({ ) } +// oxlint-disable-next-line complexity, max-lines-per-function -- Legacy baseline: function `NavigationPanel` has a complexity of 21; The function `NavigationPanel` has too many lines (117); extract this function in the follow-up refactor. function NavigationPanel({ brand = "Nextide", eyebrow = "Workspace", diff --git a/packages/ui/src/blocks/pacing-configurator.tsx b/packages/ui/src/blocks/pacing-configurator.tsx index 9d3cfa0..e5133f2 100644 --- a/packages/ui/src/blocks/pacing-configurator.tsx +++ b/packages/ui/src/blocks/pacing-configurator.tsx @@ -23,6 +23,7 @@ type PacingPreset = { meta?: React.ReactNode } +// oxlint-disable-next-line complexity, max-lines-per-function -- Legacy baseline: function `PacingConfigurator` has a complexity of 15; The function `PacingConfigurator` has too many lines (108); extract this function in the follow-up refactor. function PacingConfigurator({ presets, activePresetId, diff --git a/packages/ui/src/blocks/progressive-summary-rail.tsx b/packages/ui/src/blocks/progressive-summary-rail.tsx index d999ba3..6708b19 100644 --- a/packages/ui/src/blocks/progressive-summary-rail.tsx +++ b/packages/ui/src/blocks/progressive-summary-rail.tsx @@ -127,10 +127,7 @@ function ProgressiveSummaryRailSectionView({ ) : null} {hasRows ? ( -
+
{rows.map((row) => (
= { danger: "border-nextide-red/60 bg-nextide-red/16 text-nextide-red", } +// oxlint-disable-next-line max-lines-per-function -- Legacy baseline: The function `CreatorFlowChart` has too many lines (219); extract this function in the follow-up refactor. function CreatorFlowChart({ creators, days, diff --git a/packages/ui/src/components/donut-chart.tsx b/packages/ui/src/components/donut-chart.tsx index 62f6d37..0f42845 100644 --- a/packages/ui/src/components/donut-chart.tsx +++ b/packages/ui/src/components/donut-chart.tsx @@ -25,6 +25,7 @@ const toneStroke: Record = { neutral: "color-mix(in srgb, var(--foreground) 42%, transparent)", } +// oxlint-disable-next-line max-lines-per-function -- Legacy baseline: The function `DonutChart` has too many lines (135); extract this function in the follow-up refactor. function DonutChart({ segments, totalLabel, @@ -100,6 +101,7 @@ function DonutChart({
const emptyDuration: DurationValue = { hours: 0, minutes: 0 } +// oxlint-disable-next-line complexity, max-lines-per-function -- Legacy baseline: function `DurationPicker` has a complexity of 32; The function `DurationPicker` has too many lines (200); extract this function in the follow-up refactor. function DurationPicker({ value, defaultValue = emptyDuration, diff --git a/packages/ui/src/components/field.tsx b/packages/ui/src/components/field.tsx index 4398a5f..bca2f6c 100644 --- a/packages/ui/src/components/field.tsx +++ b/packages/ui/src/components/field.tsx @@ -76,6 +76,7 @@ function Field({ }: React.ComponentProps<"div"> & VariantProps) { return (
= { critical: "from-nextide-red via-nextide-red/80 to-nextide-red/30", } +// oxlint-disable-next-line complexity, max-lines-per-function -- Legacy baseline: function `HourlyPacingChart` has a complexity of 18; The function `HourlyPacingChart` has too many lines (213); extract this function in the follow-up refactor. function HourlyPacingChart({ buckets, targetValue = 100, diff --git a/packages/ui/src/components/label.tsx b/packages/ui/src/components/label.tsx index af084dc..d8aa58d 100644 --- a/packages/ui/src/components/label.tsx +++ b/packages/ui/src/components/label.tsx @@ -6,6 +6,7 @@ import { cn } from "@nextide/ui/lib/utils" function Label({ className, ...props }: React.ComponentProps<"label">) { return ( + // oxlint-disable-next-line jsx-a11y/label-has-associated-control -- The reusable label forwards htmlFor and children from its caller.