• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kobotoolbox / kpi / 13675446872
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: beccagraber/dev-1452-new_action
DEFAULT BRANCH: master
Ran 05 Mar 2025 12:36PM UTC
Jobs 1
Files 636
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

05 Mar 2025 11:58AM UTC coverage: 80.836% (-0.007%) from 80.843%
13675446872

push

github

web-flow
style(frontend): organize imports with Biome TASK-1640 (#5568)

### 💭 Notes

See `package.json`, `tsconfig.json`, `biome.jsonc`, `webpack.common.js`,
`kpi.code-workspace` and `js/k-icons.ts` files. The rest are
semi-auto-generated.

Organize imports using Biome, automatically on save in VSCode workspace.
As Biome explains:
> Import statements are sorted by “distance”. Modules that are “farther”
from the user are put on the top, modules “closer” to the user are put
on the bottom.

For smarter distance calculation Biome treats `#` prefixed paths as
internal paths (as [implemented by nodejs
itself](https://nodejs.org/docs/latest-v14.x/api/packages.html#packages_imports)),
and so I also did a simple search/replace refactor to consolidate
aliases and remap `jsapp/js/*` to `#/*`.

Biome supports [grouped
imports](https://biomejs.dev/analyzer/import-sorting/#grouped-imports).
Note that manually set grouped imports conflicts with auto-import
functionality - auto-imports just add the new import at the end of
imports and so at the end of last import group instead of the correct
import group, and then either we commit wrong grouping or the import has
to be adjusted manually anyways. Usually the first, but both defeats the
purpose of either auto-imports or import group. Unless, it's ok to most
of time to automatically add to only the last group, while only manually
to others! Here's my compromise:
- first group for side-effect imports (e.g. `import './example.scss'`),
we want the order of them manually reviewed anyways. And we will have
less of them over time.
- second group for `import { ... } from 'react'` only, because it looks
like all of like to see react import at the top of other imports,
because almost all files already had it there. It's only one line (or
none), there wont be second line.
- third group for everything else, auto-import safe and auto-sorted.

### 👀 Preview steps

Developers:
- open repo in the VSCode workspace
- perhaps also restart Biome ... (continued)

5999 of 9532 branches covered (62.94%)

22850 of 28267 relevant lines covered (80.84%)

0.81 hits per line

Jobs
ID Job ID Ran Files Coverage
1 13675446872.1 05 Mar 2025 12:36PM UTC 636
80.84
Source Files on build 13675446872
  • Tree
  • List 636
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • d5796bd4 on github
  • Prev Build on main (#13633648056)
  • Next Build on main (#13681003235)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc