Repository navigation
Replace prettier-eslint and lint-staged with Biome - #141
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part of an effort to shrink the OC dependency footprint (see opencomponents/oc#1585).
prettier-eslint-cliandlint-staged, about 210 dev packages including an ESLint/Prettier toolchain from years ago.@biomejs/biome, already used by the oc monorepo. The existing husky pre-commit hook now runsbiome format --write --stagedand re-stages the formatted files withgit update-index --again.biome.jsonkeeps the current style (2 spaces, single quotes, semicolons, no trailing commas) and only covers the pathslint-stagedused to:src,test/unit,test/acceptanceandindex.js. Lint rules are off, like the old formatting-only hook.engines.nodeis now>=22(was>=12).appveyor.ymland.travis.yml(Node 6-16) with a GitHub Actions workflow runningnpm ciandnpm teston Node 22 and 24.Lockfile: 1619 -> 1406 packages.
Test plan
npm testpasses: 96 tests on Node 22.23 and Node 24.22.localhostport. On Node 22+, dual-stack connection attempts return anAggregateError, unlike the test's expected single-addressECONNREFUSED. These tests now use127.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.Generated with Devin