Skip to content

chore(lint): enforce single-parameter owned functions#2422

Merged
andrew-bierman merged 125 commits into
developmentfrom
chore-biome-max-params-one
May 17, 2026
Merged

chore(lint): enforce single-parameter owned functions#2422
andrew-bierman merged 125 commits into
developmentfrom
chore-biome-max-params-one

Conversation

@andrew-bierman
Copy link
Copy Markdown
Collaborator

Summary

  • Restores scripts/lint/no-owned-max-params.ts — a custom check lost in a force-push reset
  • Biome stays at useMaxParams: max 2 as a general backstop; this script adds the project-specific rule: owned function definitions take at most 1 parameter; inline framework callbacks (renderItem, onChange, etc.) are excluded
  • Fixes all 206 violations by converting 2-param owned functions to the (subject, opts) / destructured-object shape — no suppressions, no biome-ignore, no ts-ignore

Commits

  1. chore(lint): restore no-owned-max-params custom check script
  2. refactor: convert all owned functions to single object-param signatures (206 violations → 0)
  3. fix(casts): move safe-cast annotations inside object literals to satisfy lookback check

Post-Deploy Monitoring & Validation

No additional operational monitoring required: pure lint/style enforcement with no runtime impact.

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings May 14, 2026 16:16
@cloudflare-workers-and-pages
Copy link
Copy Markdown
Contributor

cloudflare-workers-and-pages Bot commented May 14, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
packrat-admin 7f6ccf8 Commit Preview URL

Branch Preview URL
May 17 2026, 07:00 AM

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 14, 2026

Important

Review skipped

Too many files!

This PR contains 300 files, which is 150 over the limit of 150.

To get a review, narrow the scope:
• coderabbit review --type committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: e0933def-d157-41ba-a9f4-accf4dc23e28

📥 Commits

Reviewing files that changed from the base of the PR and between 7f67396 and 7f6ccf8.

📒 Files selected for processing (300)
  • apps/admin/app/dashboard/trails/page.tsx
  • apps/admin/components/analytics/catalog-analytics.tsx
  • apps/admin/components/analytics/platform-analytics.tsx
  • apps/admin/components/edit-catalog-dialog.tsx
  • apps/admin/hooks/use-catalog-analytics.ts
  • apps/admin/hooks/use-platform-analytics.ts
  • apps/admin/lib/api.ts
  • apps/admin/lib/auth.ts
  • apps/admin/lib/queryKeys.ts
  • apps/expo/app/(app)/(tabs)/profile/index.tsx
  • apps/expo/app/(app)/ai-chat.tsx
  • apps/expo/app/(app)/current-pack/[id].tsx
  • apps/expo/app/(app)/recent-packs.tsx
  • apps/expo/app/(app)/season-suggestions.tsx
  • apps/expo/app/(app)/upcoming-trips.tsx
  • apps/expo/app/auth/(login)/index.tsx
  • apps/expo/app/auth/(login)/reset-password.tsx
  • apps/expo/app/auth/one-time-password.tsx
  • apps/expo/atoms/atomWithAsyncStorage.ts
  • apps/expo/atoms/atomWithKvStorage.ts
  • apps/expo/atoms/atomWithSecureStorage.ts
  • apps/expo/atoms/atomWithSecureStorage.web.ts
  • apps/expo/atoms/recentlyUsedCatalogItemsAtom.ts
  • apps/expo/components/Icon/Icon.ios.tsx
  • apps/expo/components/Icon/Icon.tsx
  • apps/expo/components/Icon/get-icon-names.ts
  • apps/expo/components/SearchInput.tsx
  • apps/expo/components/TextInput.tsx
  • apps/expo/components/initial/ErrorBoundary.tsx
  • apps/expo/components/initial/WeightBadge.tsx
  • apps/expo/features/ai-packs/hooks/useGeneratedPacks.ts
  • apps/expo/features/ai/atoms/aiModeAtoms.ts
  • apps/expo/features/ai/atoms/chatStorageAtoms.ts
  • apps/expo/features/ai/components/GuidesRAGGenerativeUI.tsx
  • apps/expo/features/ai/components/WeatherGenerativeUI.tsx
  • apps/expo/features/ai/screens/ReportedContentScreen.tsx
  • apps/expo/features/auth/hocs/withAuthWall.tsx
  • apps/expo/features/auth/hooks/useAuthActions.ts
  • apps/expo/features/catalog/components/SimilarItems.tsx
  • apps/expo/features/catalog/hooks/useRecentlyUsedCatalogItems.ts
  • apps/expo/features/catalog/hooks/useSimilarItems.ts
  • apps/expo/features/catalog/hooks/useVectorSearch.ts
  • apps/expo/features/catalog/lib/cacheCatalogItemImage.ts
  • apps/expo/features/catalog/screens/CatalogItemsScreen.tsx
  • apps/expo/features/feed/components/CommentItem.tsx
  • apps/expo/features/feed/components/PostCard.tsx
  • apps/expo/features/feed/screens/CreatePostScreen.tsx
  • apps/expo/features/feed/utils/__tests__/feedUtils.test.ts
  • apps/expo/features/offline-ai/__tests__/offline-ai.test.ts
  • apps/expo/features/offline-ai/lib/MockLLMProvider.ts
  • apps/expo/features/pack-templates/components/AddPackTemplateItemActions.tsx
  • apps/expo/features/pack-templates/components/FeaturedPacksSection.tsx
  • apps/expo/features/pack-templates/hooks/useBulkAddCatalogItems.ts
  • apps/expo/features/pack-templates/hooks/useCreatePackTemplate.ts
  • apps/expo/features/pack-templates/hooks/useCreatePackTemplateItem.ts
  • apps/expo/features/pack-templates/hooks/useDeletePackTemplate.ts
  • apps/expo/features/pack-templates/hooks/useDeletePackTemplateItem.ts
  • apps/expo/features/pack-templates/hooks/useGenerateTemplateFromOnlineContent.ts
  • apps/expo/features/pack-templates/hooks/usePackTemplateSummary.ts
  • apps/expo/features/pack-templates/hooks/usePackTemplatesDetails.ts
  • apps/expo/features/pack-templates/hooks/useUpdatePackTemplateItem.ts
  • apps/expo/features/pack-templates/hooks/useUpdatePacktemplate.ts
  • apps/expo/features/pack-templates/hooks/useWritePermissionCheck.ts
  • apps/expo/features/pack-templates/screens/CreatePackTemplateItemForm.tsx
  • apps/expo/features/pack-templates/screens/ItemsScanScreen.tsx
  • apps/expo/features/pack-templates/utils/__tests__/computePacktemplateWeight.test.ts
  • apps/expo/features/pack-templates/utils/computePacktemplateWeight.ts
  • apps/expo/features/packs/components/AddPackItemActions.tsx
  • apps/expo/features/packs/components/CachedImage.tsx
  • apps/expo/features/packs/components/GapSuggestion.tsx
  • apps/expo/features/packs/components/HorizontalCatalogItemCard.tsx
  • apps/expo/features/packs/components/SimilarItemsForPackItem.tsx
  • apps/expo/features/packs/components/TemplateItemsSection.tsx
  • apps/expo/features/packs/hooks/useAddCatalogItem.ts
  • apps/expo/features/packs/hooks/useBulkAddCatalogItems.ts
  • apps/expo/features/packs/hooks/useCreatePack.ts
  • apps/expo/features/packs/hooks/useCreatePackItem.ts
  • apps/expo/features/packs/hooks/useDeletePack.ts
  • apps/expo/features/packs/hooks/useDeletePackItem.ts
  • apps/expo/features/packs/hooks/useDetailedPacks.ts
  • apps/expo/features/packs/hooks/useImageDetection.ts
  • apps/expo/features/packs/hooks/useImagePicker.ts
  • apps/expo/features/packs/hooks/usePackDetailsFromStore.ts
  • apps/expo/features/packs/hooks/usePackGapAnalysis.ts
  • apps/expo/features/packs/hooks/usePackItemOwnershipCheck.ts
  • apps/expo/features/packs/hooks/usePackOwnershipCheck.ts
  • apps/expo/features/packs/hooks/usePackWeightAnalysis.ts
  • apps/expo/features/packs/hooks/useRecentPacks.ts
  • apps/expo/features/packs/hooks/useUpdatePack.ts
  • apps/expo/features/packs/screens/CreatePackItemForm.tsx
  • apps/expo/features/packs/screens/ItemsScanScreen.tsx
  • apps/expo/features/packs/screens/PackDetailScreen.tsx
  • apps/expo/features/packs/store/packItems.ts
  • apps/expo/features/packs/store/packWeightHistory.ts
  • apps/expo/features/packs/utils/__tests__/computePackWeights.test.ts
  • apps/expo/features/packs/utils/__tests__/convertFromGrams.test.ts
  • apps/expo/features/packs/utils/__tests__/convertToGrams.test.ts
  • apps/expo/features/packs/utils/computeCategories.ts
  • apps/expo/features/packs/utils/computePackWeights.ts
  • apps/expo/features/packs/utils/convertFromGrams.ts
  • apps/expo/features/packs/utils/convertToGrams.ts
  • apps/expo/features/packs/utils/uploadImage.ts
  • apps/expo/features/packs/utils/uploadImage.web.ts
  • apps/expo/features/trail-conditions/hooks/useTrailConditionReports.ts
  • apps/expo/features/trail-conditions/store/trailConditionReports.ts
  • apps/expo/features/trips/components/TripCard.tsx
  • apps/expo/features/trips/hooks/useCreateTrip.ts
  • apps/expo/features/trips/hooks/useDeleteTrip.ts
  • apps/expo/features/trips/hooks/useTripDetailsFromStore.ts
  • apps/expo/features/trips/hooks/useUpdateTrip.ts
  • apps/expo/features/trips/screens/TripWeatherDetailsScreen.tsx
  • apps/expo/features/weather/components/WeatherIcon.tsx
  • apps/expo/features/weather/hooks/useLocationRefresh.ts
  • apps/expo/features/weather/hooks/useLocationSearch.ts
  • apps/expo/features/weather/hooks/useLocations.ts
  • apps/expo/features/weather/hooks/useWeatherAlert.ts
  • apps/expo/features/weather/lib/weatherIcons.ts
  • apps/expo/features/weather/lib/weatherService.ts
  • apps/expo/features/weather/screens/LocationDetailScreen.tsx
  • apps/expo/features/weather/screens/LocationPreviewScreen.tsx
  • apps/expo/features/weather/screens/LocationSearchScreen.tsx
  • apps/expo/features/weather/screens/LocationsScreen.tsx
  • apps/expo/features/wildlife/hooks/useWildlifeIdentification.ts
  • apps/expo/lib/hooks/useKeyboardHideBlur.tsx
  • apps/expo/lib/store.ts
  • apps/expo/lib/utils/ImageCacheManager.ts
  • apps/expo/lib/utils/ImageCacheManager.web.ts
  • apps/expo/lib/utils/__tests__/ImageCacheManager.test.ts
  • apps/expo/lib/utils/__tests__/compute-pack.test.ts
  • apps/expo/lib/utils/__tests__/getRelativeTime.test.ts
  • apps/expo/lib/utils/__tests__/imageUtils.test.ts
  • apps/expo/lib/utils/compute-pack.ts
  • apps/expo/lib/utils/getRelativeTime.ts
  • apps/expo/lib/utils/imageUtils.ts
  • apps/expo/utils/__tests__/chatContextHelpers.test.ts
  • apps/expo/utils/__tests__/weight.test.ts
  • apps/expo/utils/chatContextHelpers.ts
  • apps/expo/utils/weight.ts
  • apps/guides/app/api/dev/generate-batch/route.ts
  • apps/guides/app/api/dev/generate-post/route.ts
  • apps/guides/app/guide/[slug]/page.tsx
  • apps/guides/lib/enhanceGuideContent.ts
  • apps/guides/lib/mdx-static.ts
  • apps/guides/scripts/enhance-content.ts
  • apps/guides/scripts/generate-content.ts
  • apps/guides/scripts/update-authors.ts
  • apps/landing/components/main-nav.tsx
  • apps/landing/components/sections/landing-hero.tsx
  • apps/landing/components/site-footer.tsx
  • apps/trails/components/TrailsPage.tsx
  • apps/trails/lib/auth.ts
  • apps/trails/lib/overpass.ts
  • apps/trails/lib/useAuth.tsx
  • apps/web/app/auth/page.tsx
  • apps/web/app/page.tsx
  • apps/web/components/app-shell.tsx
  • apps/web/components/screens/gear-inventory-screen.tsx
  • apps/web/components/screens/trips-screen.tsx
  • apps/web/lib/auth.ts
  • apps/web/lib/data.ts
  • apps/web/lib/weight-context.tsx
  • package.json
  • packages/analytics/src/core/cache-metadata.ts
  • packages/analytics/src/core/enrichment.ts
  • packages/analytics/src/core/entity-resolver.ts
  • packages/analytics/src/core/local-cache.ts
  • packages/analytics/src/core/query-builder.ts
  • packages/analytics/src/core/spec-parser.ts
  • packages/analytics/test/core/cache-metadata.test.ts
  • packages/analytics/test/core/query-builder.test.ts
  • packages/analytics/test/integration/catalog-mode.test.ts
  • packages/analytics/test/integration/local-mode.test.ts
  • packages/api-client/src/index.ts
  • packages/api/container_src/server.ts
  • packages/api/src/auth/index.ts
  • packages/api/src/db/index.ts
  • packages/api/src/index.ts
  • packages/api/src/middleware/__tests__/cfAccess.test.ts
  • packages/api/src/middleware/cfAccess.ts
  • packages/api/src/routes/admin/analytics/platform.ts
  • packages/api/src/routes/admin/index.ts
  • packages/api/src/routes/admin/trails.ts
  • packages/api/src/routes/ai/index.ts
  • packages/api/src/routes/alltrails.ts
  • packages/api/src/routes/catalog/index.ts
  • packages/api/src/routes/packTemplates/index.ts
  • packages/api/src/routes/packs/index.ts
  • packages/api/src/routes/trails/index.ts
  • packages/api/src/services/aiService.ts
  • packages/api/src/services/catalogService.ts
  • packages/api/src/services/etl/processLogsBatch.ts
  • packages/api/src/services/etl/processValidItemsBatch.ts
  • packages/api/src/services/etl/updateEtlJobProgress.ts
  • packages/api/src/services/imageDetectionService.ts
  • packages/api/src/services/packService.ts
  • packages/api/src/services/passwordResetService.ts
  • packages/api/src/services/trails.ts
  • packages/api/src/utils/__tests__/auth.test.ts
  • packages/api/src/utils/__tests__/chatContextHelpers.test.ts
  • packages/api/src/utils/__tests__/compute-pack.test.ts
  • packages/api/src/utils/__tests__/csv-utils.test.ts
  • packages/api/src/utils/__tests__/embeddingHelper.test.ts
  • packages/api/src/utils/__tests__/weight.test.ts
  • packages/api/src/utils/ai/logging.ts
  • packages/api/src/utils/ai/tools.ts
  • packages/api/src/utils/auth.ts
  • packages/api/src/utils/chatContextHelpers.ts
  • packages/api/src/utils/compute-pack.ts
  • packages/api/src/utils/csv-utils.ts
  • packages/api/src/utils/embeddingHelper.ts
  • packages/api/src/utils/weight.ts
  • packages/api/test/setup.ts
  • packages/app/src/browser.ts
  • packages/app/src/shared/api/query-keys.ts
  • packages/app/src/shared/lib/weight.ts
  • packages/checks/src/check-magic-strings.ts
  • packages/checks/src/check-type-casts.ts
  • packages/cli/src/api/run.ts
  • packages/cli/src/args.ts
  • packages/cli/src/commands/admin/analytics.ts
  • packages/cli/src/commands/admin/catalog.ts
  • packages/cli/src/commands/admin/etl.ts
  • packages/cli/src/commands/admin/login.ts
  • packages/cli/src/commands/admin/packs.ts
  • packages/cli/src/commands/admin/stats.ts
  • packages/cli/src/commands/admin/trails.ts
  • packages/cli/src/commands/admin/users.ts
  • packages/cli/src/commands/ai/index.ts
  • packages/cli/src/commands/auth/whoami.ts
  • packages/cli/src/commands/brand.ts
  • packages/cli/src/commands/brands.ts
  • packages/cli/src/commands/build-specs.ts
  • packages/cli/src/commands/cache.ts
  • packages/cli/src/commands/catalog/index.ts
  • packages/cli/src/commands/category.ts
  • packages/cli/src/commands/compare.ts
  • packages/cli/src/commands/deals.ts
  • packages/cli/src/commands/export.ts
  • packages/cli/src/commands/feed/index.ts
  • packages/cli/src/commands/filter.ts
  • packages/cli/src/commands/images.ts
  • packages/cli/src/commands/lightweight.ts
  • packages/cli/src/commands/market-share.ts
  • packages/cli/src/commands/packs/create.ts
  • packages/cli/src/commands/packs/delete.ts
  • packages/cli/src/commands/packs/gap-analysis.ts
  • packages/cli/src/commands/packs/get.ts
  • packages/cli/src/commands/packs/items.ts
  • packages/cli/src/commands/packs/list.ts
  • packages/cli/src/commands/prices.ts
  • packages/cli/src/commands/ratings.ts
  • packages/cli/src/commands/resolve.ts
  • packages/cli/src/commands/reviews.ts
  • packages/cli/src/commands/sales.ts
  • packages/cli/src/commands/schema.ts
  • packages/cli/src/commands/search.ts
  • packages/cli/src/commands/seasons/index.ts
  • packages/cli/src/commands/specs.ts
  • packages/cli/src/commands/stats.ts
  • packages/cli/src/commands/summary.ts
  • packages/cli/src/commands/templates/index.ts
  • packages/cli/src/commands/trails/index.ts
  • packages/cli/src/commands/trends.ts
  • packages/cli/src/commands/trips/index.ts
  • packages/cli/src/commands/user/index.ts
  • packages/cli/src/commands/weather/index.ts
  • packages/cli/src/shared.ts
  • packages/env/scripts/no-raw-process-env.ts
  • packages/guards/src/assertions.ts
  • packages/guards/src/narrow.ts
  • packages/mcp/src/auth.ts
  • packages/mcp/src/client.ts
  • packages/mcp/src/index.ts
  • packages/mcp/src/resources.ts
  • packages/mcp/src/tools/admin.ts
  • packages/mcp/src/tools/ai.ts
  • packages/mcp/src/tools/alltrails.ts
  • packages/mcp/src/tools/auth.ts
  • packages/mcp/src/tools/catalog.ts
  • packages/mcp/src/tools/feed.ts
  • packages/mcp/src/tools/guides.ts
  • packages/mcp/src/tools/knowledge.ts
  • packages/mcp/src/tools/packTemplates.ts
  • packages/mcp/src/tools/packs.ts
  • packages/mcp/src/tools/seasons.ts
  • packages/mcp/src/tools/trail-conditions.ts
  • packages/mcp/src/tools/trails.ts
  • packages/mcp/src/tools/trips.ts
  • packages/mcp/src/tools/upload.ts
  • packages/mcp/src/tools/user.ts
  • packages/mcp/src/tools/weather.ts
  • packages/mcp/src/tools/wildlife.ts
  • packages/mcp/src/types.ts
  • packages/overpass/src/builder.test.ts
  • packages/overpass/src/builder.ts
  • packages/overpass/src/client.ts
  • packages/units/src/index.test.ts
  • packages/units/src/index.ts
  • packages/web-ui/src/components/chart.tsx
  • packages/web-ui/src/hooks/use-toast.ts

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore-biome-max-params-one

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages
Copy link
Copy Markdown
Contributor

cloudflare-workers-and-pages Bot commented May 14, 2026

Deploying packrat-guides with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7f6ccf8
Status:🚫  Build failed.

View logs

@cloudflare-workers-and-pages
Copy link
Copy Markdown
Contributor

cloudflare-workers-and-pages Bot commented May 14, 2026

Deploying packrat-landing with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7f6ccf8
Status:🚫  Build failed.

View logs

Comment thread .github/workflows/migrations.yml Fixed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

@andrew-bierman andrew-bierman force-pushed the chore-biome-max-params-one branch from a466c70 to ed5ed06 Compare May 14, 2026 16:27
@github-actions github-actions Bot added dependencies Pull requests that update a dependency file api mobile web database labels May 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 14, 2026

Coverage Report for Expo Unit Tests Coverage (./apps/expo)

Status Category Percentage Covered / Total
🔵 Lines 81.71% 523 / 640
🔵 Statements 81.71% (🎯 75%) 523 / 640
🔵 Functions 92.59% 50 / 54
🔵 Branches 90.9% 170 / 187
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
apps/expo/features/pack-templates/utils/computePacktemplateWeight.ts 100% 100% 100% 100%
apps/expo/features/packs/utils/computeCategories.ts 0% 0% 0% 0% 1-47
apps/expo/features/packs/utils/computePackWeights.ts 100% 100% 100% 100%
apps/expo/features/packs/utils/convertFromGrams.ts 100% 100% 100% 100%
apps/expo/features/packs/utils/convertToGrams.ts 100% 100% 100% 100%
apps/expo/features/packs/utils/uploadImage.ts 0% 0% 0% 0% 1-56
apps/expo/lib/utils/ImageCacheManager.ts 100% 96.15% 100% 100%
apps/expo/lib/utils/compute-pack.ts 100% 100% 100% 100%
apps/expo/lib/utils/getRelativeTime.ts 96.96% 57.14% 100% 96.96% 39
apps/expo/lib/utils/imageUtils.ts 88.88% 87.09% 100% 88.88% 117-119, 155-163
apps/expo/utils/chatContextHelpers.ts 96.36% 95.45% 100% 96.36% 60-61
apps/expo/utils/weight.ts 100% 100% 100% 100%
Generated in workflow #1327 for commit 7f6ccf8 by the Vitest Coverage Report Action

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 14, 2026

Coverage Report for API Unit Tests Coverage (./packages/api)

Status Category Percentage Covered / Total
🔵 Lines 67.13% 527 / 785
🔵 Statements 67.13% (🎯 65%) 527 / 785
🔵 Functions 90.47% 38 / 42
🔵 Branches 88.32% 227 / 257
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/api/src/services/passwordResetService.ts 0% 0% 0% 0% 1-82
packages/api/src/services/trails.ts 0% 100% 100% 0% 3-59
packages/api/src/utils/auth.ts 100% 85.71% 100% 100%
packages/api/src/utils/chatContextHelpers.ts 92.45% 90.47% 100% 92.45% 57-58, 70-71
packages/api/src/utils/compute-pack.ts 43.42% 100% 66.66% 43.42% 71-120
packages/api/src/utils/csv-utils.ts 95.4% 87.5% 100% 95.4% 66-67, 69-70, 88-89, 132-133, 149-150, 171-172
packages/api/src/utils/embeddingHelper.ts 83.92% 82.75% 100% 83.92% 27, 34-36, 46, 51-53, 57
packages/api/src/utils/weight.ts 100% 100% 100% 100%
Generated in workflow #1327 for commit 7f6ccf8 by the Vitest Coverage Report Action

Copilot AI and others added 12 commits May 14, 2026 16:59
Recovers script lost in force-push reset. Biome stays at max:2 as a
general backstop; this script enforces max:1 for owned function
definitions while ignoring framework callbacks (renderItem, onChange,
etc) that we don't control.
Fixes all 206 no-owned-max-params violations across 50+ files in apps/
and packages/. Every owned function with more than one parameter has been
refactored to accept a single destructured options object. All call sites
updated to match. Also fixes TypeScript errors introduced by the refactor
across test files.

Key changes:
- packages/units: normalize/fromGrams/displayWeight/convert/parseWeightUnit
- packages/analytics: SQLFragments.safeCoalesce/readCsvSource/priceRangeFilter,
  QueryBuilder methods, LocalCacheManager/CatalogCacheManager search/query APIs,
  cache-metadata saveMetadata
- packages/api: verifyCFAccessRequest, verifyPassword, parseWeight,
  getEmbeddingText, stitchRouteGeometry, chatContextHelpers
- packages/overpass: TrailQueryBuilder.around/bbox (geographic coord methods)
- apps/expo: weight utils, convertFromGrams/convertToGrams,
  ImageCacheManager, imageUtils, chatContextHelpers, weatherService,
  computePackWeights, getRelativeTime, offline-ai LLM interface
- apps/guides: generateContent, enhanceContent, mdx-static, update-authors
- scripts/lint: add 'set' to EXTERNAL_CALLBACK_NAMES for Better Auth KV interface

lint:custom and check-types both pass (pre-existing errors in admin/auth
client/trails/useAuth are unrelated to this change).
Refactors adminFetch and osm.search query key factory from positional
to single-object parameter to satisfy no-owned-max-params lint rule.
- adminFetch body: call adminFetcher({input, init}) not positional args
- gear-inventory-screen: update toGrams callers to object-param form
- auth/index: revert verifyPassword call to positional (external @better-auth lib)
- test/setup: align batchVectorSearch mock signature with refactored definition
@andrew-bierman andrew-bierman force-pushed the chore-biome-max-params-one branch from 73512da to 04fe23c Compare May 14, 2026 23:08
Resolves 8 conflicts: kept dev-side ETL semantics (atomic totalProcessed
counter alongside valid/invalid increments) and AI/chat updates
(systemPrompt support in CustomChatTransport, transportKey for useChat
remount, getWeatherIconByCondition with isDay, user-id-as-string switch
for admin user functions); applied PR's single-param object shape across
both new and modified call sites.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@andrew-bierman
Copy link
Copy Markdown
Collaborator Author

Rebased onto current development (merge commit 5d9c8633b).

8 conflict files resolved with dev-semantics + HEAD-shape blending:

  • apps/admin/lib/api.ts (2 blocks): adopted dev's id: string from updated AdminUserItemSchema; kept HEAD's single-param hardDeleteUser({ id, reason }) and adminFetch({ path, init }) shapes with dev's improved error-body parsing.
  • apps/expo/app/(app)/ai-chat.tsx: dev's new systemPrompt + transportKey remount logic + useChat({ id }).
  • apps/expo/features/ai/lib/CustomChatTransport.ts: dev already single-param; kept dev's added systemPrompt field.
  • apps/expo/features/ai/components/GuidesRAGGenerativeUI.tsx: HEAD's truncateText({ text }) + dev's dark-mode className.
  • apps/expo/features/ai/components/WeatherGenerativeUI.tsx: HEAD's getWeatherIconByCondition({ condition, isDay }) + dev's data shape (condition not conditions, new isDay from details).
  • packages/api/src/services/etl/processLogsBatch.ts: HEAD's { env, params } + dev's atomic processed: logs.length (preserves recent ETL counter-ordering fix).
  • packages/api/src/services/etl/processValidItemsBatch.ts (2 blocks): HEAD's trackEtlJob({ itemIds, jobId }) + updateEtlJobProgress({ env, params }) shape with dev's atomic processed: items.length and the explanatory comment.
  • packages/api/src/services/etl/updateEtlJobProgress.ts: HEAD's { env, params } + dev's added optional processed?: number.

Verification:

  • bun check-types: 0 errors after bun install.
  • bun biome check apps/ packages/ scripts/: clean (2 pre-existing warnings, no errors).
  • bun run scripts/lint/no-owned-max-params.ts: No owned functions exceed one parameter. — zero violations introduced by the merge, no follow-up commit needed.
  • Pre-push lefthook (clean-checks, package-json-sort, check-casts:strict): all passed.

Companion PR: #2429 (packages/checks/src/check-max-params.ts) closed as superseded by this PR's better-designed scripts/lint/no-owned-max-params.ts (handles framework callbacks, owned-vs-external distinction, per-file exclusions for intentional positional APIs).

andrew-bierman and others added 4 commits May 16, 2026 18:24
After #2430 and #2431 merged to development, the lint:custom script picked up check-drizzle-migrations.ts. Combined both lint chains: this PR's no-owned-max-params + dev's check-drizzle-migrations.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
#2428 landed)

Conflicts:
- apps/expo/features/packs/hooks/usePackOwnershipCheck.ts: HEAD used new single-object obs({store,id}) signature with .peek() (non-reactive); dev rewrote to use$(() => !!obs(packsStore, id).get()) for reactivity. Blended: kept dev's reactive use$ pattern, applied HEAD's single-object obs call form.

Post-merge fixes (dev added new files that violated max-params=1):
- apps/expo/atoms/atomWithSecureStorage.web.ts: refactor to {key, initialValue} to match native sibling.
- apps/expo/features/packs/utils/uploadImage.web.ts: refactor uploadImage/getPresignedUrl/urlToBlob to single-object params; align with native sibling signature.
- apps/expo/lib/utils/ImageCacheManager.web.ts: refactor cacheRemoteImage and cacheLocalTempImage to single-object params, matching native ImageCacheManager.ts.
- scripts/lint/no-owned-max-params.ts: add /playwright/ to EXCLUDED_PATH_PARTS (parity with /test/ and /__tests__/; playwright fixtures are test code with signatures dictated by Playwright).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Resolves conflicts arising from the recent merge of #2423 (computePackWeights
return type changes, schema parsing) and #2377 (auth flow refactor).

All resolutions preserve the single-object-param convention enforced by
no-owned-max-params; absorbed dev's new return-type wrappers (Zod parse) and
the authClient-based password reset flow.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Matches packageManager (bun@1.3.10) but locks the actual version used in CI / CF Pages to 1.3.14 to mirror what's already running in worktrees and mcp-cli-eden.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… MCP rewrite)

#2433 restructured packages/mcp/. Took dev's new MCP wholesale; applied
no-owned-max-params refactor on top where dev introduced new
multi-param owned functions.

Refactors applied to satisfy the single-param rule:
 - mcp client `call(promise, opts)` → `call({ promise, ...opts })` across all 18 tool files (102 sites)
 - cli `runApi(promise, opts)` → `runApi({ promise, ...opts })` across 24 command files (60 sites)
 - cli `printTable(rows, opts)` → `printTable({ rows, options })` across 10 sites
 - cli `printSummary(data, title)` → `printSummary({ data, title })` across 6 sites
 - mcp `setFeatureFlag(flag, enabled)` → `setFeatureFlag({ flag, enabled })`
 - mcp `registerFlaggedTool(flag, ...args)` → `registerFlaggedTool({ flag, args })`
 - mcp `asContent(uri, body)` → `asContent({ uri, body })` in resources.ts
 - api `rank(key, order)` → `rank({ key, order })` in catalog compare route
 - api `checkAdminCredentials(username, password)` → object param
 - api `compute-pack` new `computePackBreakdown` aligned with single-param `normalize`/`parseWeightUnit`

Non-MCP conflict resolutions:
 - apps/landing/components/sections/landing-hero.tsx — kept HEAD (PR's
   scrollToSection extraction)
 - apps/landing/components/site-footer.tsx — kept HEAD (same)
 - packages/api/src/routes/admin/index.ts — took dev's new /login route
   and queryBoolean usage, then refactored to single-param for
   timingSafeEqual / verifyCFAccessRequest / assertAllDefined /
   checkAdminCredentials
 - packages/api/src/utils/compute-pack.ts — kept HEAD's single-param
   computePacksWeights; added dev's computePackBreakdown rewritten to
   use single-param normalize/parseWeightUnit
 - packages/guards/src/narrow.ts — deduped nullToUndefined/safeIndexOf
   (both sides added them); kept HEAD's single-param safeIndexOf shape

Two build scripts added to the no-owned-max-params allowlist because
they override globalThis.fetch and must match the runtime's (input, init)
signature:
 - apps/landing/scripts/generate-og-images.ts
 - apps/guides/scripts/generate-og-images.ts

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@andrew-bierman andrew-bierman merged commit c66e287 into development May 17, 2026
15 of 20 checks passed
@andrew-bierman andrew-bierman deleted the chore-biome-max-params-one branch May 17, 2026 15:11
andrew-bierman added a commit that referenced this pull request May 20, 2026
Substantial rebase covering 225 dev commits — #2414 type unification,
#2422 single-param refactor, #2433 MCP+CLI Eden Treaty rewrite, #2439 OG
meta validation, #2441/#2442 OG URL fix, plus many smaller.

Conflicts resolved:
- apps/expo/features/packs/utils/uploadImage.ts: kept HEAD's userId
  cache, used dev's object-arg getPresignedUrl call (matches function
  signature).
- apps/expo/features/trips/hooks/useDeleteTrip.ts: kept HEAD's async +
  optimistic-delete comment, used dev's object-arg obs() call (matches
  current obs signature in apps/expo/lib/store.ts).

Post-merge cleanup of dev-introduced single-param violations:
- apps/expo/lib/utils/__tests__/getRelativeTime.test.ts: rewrote 3 test
  call sites to object args matching the refactored getRelativeTime.
- packages/api/src/utils/__tests__/embeddingHelper.test.ts: rewrote 7
  test call sites to object args matching the refactored
  getEmbeddingText; updated Parameters<> type indexes.
- packages/overpass/src/client.test.ts: converted makeResponse to
  single object param and updated all 11 call sites.
- scripts/lint/no-owned-max-params.ts: added
  apps/trails/scripts/generate-og-images.ts to EXCLUDED_FILES (same
  globalThis.fetch shim pattern as the existing landing/guides
  entries).

Verification: bun install ok; bun check-types 0 errors; biome check
0 errors (2 unrelated warnings); no-owned-max-params 0 violations.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api database dependencies Pull requests that update a dependency file mobile web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants