Skip to content

Replace prettier-eslint and lint-staged with Biome - #141

Merged
ricardo-devis-agullo merged 4 commits into
masterfrom
reduce-dependencies
Oct 31, 2026
Merged

ricardo-devis-agullo merged 4 commits into
masterfrom
reduce-dependencies

Conversation

@ricardo-devis-agullo

@ricardo-devis-agullo ricardo-devis-agullo commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Part of an effort to shrink the OC dependency footprint (see opencomponents/oc#1585).

  • Removed: prettier-eslint-cli and lint-staged, about 210 dev packages including an ESLint/Prettier toolchain from years ago.
  • Replaced with: @biomejs/biome, already used by the oc monorepo. The existing husky pre-commit hook now runs biome format --write --staged and re-stages the formatted files with git update-index --again.
  • Config: biome.json keeps the current style (2 spaces, single quotes, semicolons, no trailing commas) and only covers the paths lint-staged used to: src, test/unit, test/acceptance and index.js. Lint rules are off, like the old formatting-only hook.
  • Node version: engines.node is now >=22 (was >=12).
  • CI: replaced appveyor.yml and .travis.yml (Node 6-16) with a GitHub Actions workflow running npm ci and npm test on Node 22 and 24.
  • Not touched: runtime dependencies are already minimal (18 packages).

Lockfile: 1619 -> 1406 packages.

Test plan

  • npm test passes: 96 tests on Node 22.23 and Node 24.22.
  • The six prior CI failures were in acceptance tests targeting an unavailable localhost port. On Node 22+, dual-stack connection attempts return an AggregateError, unlike the test's expected single-address ECONNREFUSED. These tests now use 127.0.0.1, which makes the unavailable endpoint deterministic. The registry teardown also closes remaining keep-alive connections to avoid its 2-second Mocha hook timeout.
  • Verified the staged-file Biome hook formats a deliberately malformed staged line and re-stages the result.

Generated with Devin

ricardo-devis-agullo and others added 4 commits October 31, 2026 08:46
Drops ~210 dev packages by formatting staged files with Biome in the
existing husky pre-commit hook, matching the oc monorepo tooling.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Both configs targeted long-unsupported Node versions (6-16). Test on
Node 22 and 24 to match the new engines requirement.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Use IPv4 for intentionally unavailable endpoints to avoid Node 22+
AggregateError from localhost family selection. Close server connections
explicitly in teardown so keep-alive sockets don't time out the hook.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@ricardo-devis-agullo
ricardo-devis-agullo merged commit d94f16e into master Oct 31, 2026
2 checks passed
@ricardo-devis-agullo
ricardo-devis-agullo deleted the reduce-dependencies branch October 31, 2026 08:26
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