Skip to content

fix: resolve all biome lint warnings#191

Merged
coji merged 3 commits intomainfrom
fix/lint-warnings
Mar 16, 2026
Merged

fix: resolve all biome lint warnings#191
coji merged 3 commits intomainfrom
fix/lint-warnings

Conversation

@coji
Copy link
Owner

@coji coji commented Mar 16, 2026

Summary

  • Remove unnecessary non-null assertions (!) on organization.slug where the type is already string (6 files)
  • Refactor SizeBadgePopover to accept orgSlug as an explicit prop instead of using useParams() internally — eliminates implicit routing context dependency and prevents silently generating malformed URLs
  • Refactor ExportDataSection to accept orgSlug as prop instead of useParams()
  • Replace MemberLink's silent orgSlug = '' default with an explicit invariant throw
  • Remove unused biome-ignore suppression comment in pagination.tsx
  • Update biome schema version 2.3.13 → 2.4.7

Test plan

  • pnpm lint passes with 0 warnings
  • pnpm typecheck passes
  • Verify throughput pages (merged/deployed/ongoing) render size badges correctly
  • Verify data management export download works
  • Verify workload member links navigate correctly

🤖 Generated with Claude Code

Remove unnecessary non-null assertions where types are already non-nullable,
replace non-null assertions with nullish coalescing for useParams values,
remove unused biome-ignore suppression comment, and update biome schema version.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Mar 16, 2026

📝 Walkthrough

Walkthrough

The PR removes non-null assertions throughout the codebase, primarily on slug properties, and replaces them with either direct property access or nullish coalescing fallbacks. Additionally, the biome.json schema reference is updated and a lint comment is removed.

Changes

Cohort / File(s) Summary
Non-null assertion replacements
app/components/size-badge-popover.tsx
Replaced orgSlug! with orgSlug ?? '' in two action calls, providing an empty string fallback when undefined.
Non-null assertion removals
app/routes/$orgSlug/settings/repositories/$repository/delete/index.tsx, app/routes/$orgSlug/settings/repositories/$repository/settings/index.tsx, app/routes/_index.tsx, app/routes/admin/_index/index.tsx, app/routes/resources/organization.tsx
Removed non-null assertions from slug property accesses in redirect URLs and href constructions, allowing properties to remain potentially undefined.
Configuration and comment cleanup
biome.json, app/components/ui/pagination.tsx
Updated biome schema version from 2.3.13 to 2.4.7 and removed a biome-ignore lint comment.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 Assertions gone, the code runs free,
No more exclamation marks to see!
Nullish coalescing saves the day,
While biome schemas update their way.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title directly matches the main objective: resolving all biome lint warnings by removing non-null assertions, replacing unsafe patterns, and updating schema version.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/lint-warnings
📝 Coding Plan
  • Generate coding plan for human review comments

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.

coji and others added 2 commits March 16, 2026 15:13
Instead of relying on useParams() inside a shared component (implicit
routing context dependency), accept orgSlug as a required prop. This
makes the dependency explicit and avoids silently generating malformed
URLs when orgSlug is undefined.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- ExportDataSection: accept orgSlug as prop instead of useParams()
- MemberLink: replace silent `= ''` default with explicit invariant throw

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coji coji merged commit 39faa90 into main Mar 16, 2026
6 checks passed
@coji coji deleted the fix/lint-warnings branch March 16, 2026 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant