FilOzone / FilOzone/filecoin-pay-explorer

Remove the noNestedTernary exemptions from the 13 files that predate the rule

Open
#457 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
3
Forks
7
Avg merge
6d 14h
Merged PRs (30d)
61

Description

style/noNestedTernary is an error for all new code as of #458. The 33 nested ternaries that already existed, in 13 files, are exempted through an overrides entry in the owning package's biome.json. This issue tracks removing those entries.

Impact

A file listed in an overrides entry can keep its nested ternaries and gain new ones until it is removed from the list. Every other file in the repo is already enforced.

Files

apps/explorer/biome.json:

  • src/app/console/(console)/page.tsx (1)
  • src/app/error.tsx (1)
  • src/components/UserConsole/AddServiceDialog/index.tsx (1)
  • src/components/UserConsole/DepositDialog.tsx (1)
  • src/components/UserConsole/IncreaseApprovalDialog.tsx (2)
  • src/components/UserConsole/FundsSection/components/GuidedTopUpDialog.tsx (5)
  • src/components/UserConsole/FundsSection/components/RunwayCard.tsx (2)
  • src/components/UserConsole/FundsSection/components/SquidQuoteReview.tsx (12)
  • src/components/UserConsole/FundsSection/data/squid-acquisition.ts (2)
  • src/components/UserConsole/FundsSection/data/squid-quote.ts (1)

apps/metrics/biome.json:

  • src/components/NetworkHealth.tsx (2)
  • src/components/OperatorLeaderboard.tsx (2)

packages/ui/biome.json, one file:

  • src/components/theme-toggle.tsx (1)

Done when

Each file is rewritten (if/else, early return, a lookup object, or a small helper), its path is removed from the overrides list, and pnpm exec biome ci . passes. Removing the path first shows the sites to fix. Delete the whole overrides block from a package config once its list is empty.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the three biome.json files and the 13 listed TypeScript/TSX files. Remove a file from its package override list, run pnpm exec biome ci ., and use the reported nested ternaries to guide each rewrite. Done means all listed files pass the check, each path is removed, and an empty package override block is deleted.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.