You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
chore: lint with the pnpm monorepo's ESLint config - #79
Lints this repo with the same rules as the pnpm monorepo: @pnpm/eslint-config plus eslint-plugin-regexp's recommended config, mirroring the monorepo's eslint.config.mjs.
The shared config targets **/*.ts; here its entries are retargeted to **/*.js/**/*.mjs (and its test-file entry to **/*.test.mjs). Type-aware rules run via tsconfig.lint.json with allowJs.
Deviations, each commented in the config:
@typescript-eslint/explicit-module-boundary-types is off, because JS has no syntax for the types it asks for.
import-x/no-extraneous-dependencies is off: this is a set of scripts with one manifest.
no-floating-promises allows node:test's test()/describe(), same as the monorepo's override for its node:test suites.
Default exports are now named exports (benchmark, recordBenchmark, benchmarkNodeVersions, cmdsMap, nodeManagersMap).
void on the two fire-and-forget flushed().finally() calls in the latency proxy. Their queue never rejects.
The rethrown error in report() now carries cause.
Intentionally sequential awaits in loops (polling, serial measurements, zstd worker throttling) get eslint-disable-next-line no-await-in-loop -- <reason>, as the monorepo's directive rule requires.
Six files still exceed the size and shape limits (function length, cognitive complexity, nesting, bindings). They are listed in PENDING_SIZE_AND_SHAPE_REFACTOR, the same mechanism the monorepo uses, so the refactor can happen separately.
Adds pnpm run lint and a Lint workflow that runs lint and the tests on PRs and pushes to main.
Adds pnpm-workspace.yaml with allowBuilds: { unrs-resolver: true }, matching the monorepo's policy. Each pnpm fixture writes its own pnpm-workspace.yaml, so the benchmarks never walk up into this one.
Test plan
pnpm run lint passes
pnpm test passes (9/9)
All modules parse; the renamed named exports resolve
Lints the scripts with @pnpm/eslint-config and eslint-plugin-regexp, the
same rules the pnpm monorepo uses, retargeted from .ts to .js/.mjs.
Autofixable violations are fixed, default exports become named exports,
intentionally sequential awaits are disabled with a reason, and the files
that still exceed the size and shape limits are listed for a later
refactor, the way the monorepo does it. A workflow runs lint and the tests
on pull requests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 16972dac-c378-4007-886e-aeb21f77841e
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
🔍 Trigger review
Walkthrough
The pull request adds ESLint configuration and CI checks, changes benchmark functions and maps to named exports, updates their callers, and applies Node.js import and lint-related changes across runtime modules.
Changes: Linting and benchmark module updates
Layer / File(s)
Summary
Configure linting and CI .github/workflows/lint.yml, eslint.config.mjs, package.json, pnpm-workspace.yaml, tsconfig.lint.json
Adds an ESLint configuration, lint script, dependencies, compiler settings, and workspace build permission. The workflow installs dependencies, then runs linting and tests on pushes to main and pull requests.
Changes benchmark functions and maps to named exports and updates their imports and call sites. The missing-versions-file error now retains the caught error as its cause.
Updates built-in module specifiers, adds lint suppressions for awaited operations in loops, and reformats handlers without changing their described behavior. The proxy test renames a loop counter; the server test receives import spacing changes.
The current tracked files do not trigger the lint coverage concern, and CI dependencies are consistent. The change is mergeable after normal checks.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 55.56% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title clearly and concisely describes the primary change: adding linting with the pnpm monorepo's ESLint configuration.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage
Explanation
Docstring coverage is 55.56% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 18 functions across 15 files. (4 skipped: 4 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches: 💡 2
📝 Generate docstrings: 💡
Commit to this branch
Create a new PR
🛠️ Fix failing CI checks: 💡
Commit to this branch
Create a new PR
🧪 Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
I’m a rabbit with a checklist to fill, I nibble through lint rules, quiet and still. Named exports hop into place, CI checks follow at a measured pace, Then I thump at the green workflow’s hill.
Comment @coderabbitai help to get the list of available commands.
• Apply pnpm’s shared lint rules to JavaScript, with documented exceptions for this repository.
• Align scripts with those rules while preserving intentionally sequential benchmark and polling
work.
• Run lint and existing tests in CI; defer larger size-and-shape refactors.
Retargeting the shared configuration keeps lint policy aligned with the pnpm monorepo without maintaining a separate ruleset. The documented JavaScript exceptions and temporary size-and-shape exclusions keep adoption separate from a larger refactor.
Files changed (20) +1715 / -135
Refactor (12) +184 / -132
benchmarkFixture.jsAlign fixture runner style and exports+59/-58
Align fixture runner style and exports
• Converts the benchmark function to a named export and applies import, quote, and formatting rules.
eslint.config.mjsAdapt pnpm’s shared ESLint configuration to JavaScript+70/-0
Adapt pnpm’s shared ESLint configuration to JavaScript
• Retargets shared rules to JS and MJS files, adds recommended regexp rules, and documents repository-specific exceptions. Temporarily disables size-and-shape rules for six files pending separate refactors.
The reason will be displayed to describe this comment to others. Learn more.
🔇 Additional comments: 1
tsconfig.lint.json-10-10: 1
10-10: Minor · Functional Correctness · Quick win
⚠️Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.
Include nested JavaScript files in the lint project.
An unimported file such as scripts/check.js matches JS_FILES in eslint.config.mjs, but this project excludes it. Typed parsing then fails, so pnpm run lint and CI fail. Include nested JavaScript files, while excluding fixture and generated directories. (raw.githubusercontent.com)
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 30b1428a-7d4c-4697-b421-bd2dfb85a6d3
Commits
Reviewing files that changed from the base of the PR and between 375e527 and 010c4f0.
Files ignored due to path filters: 1
pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 19
.github/workflows/lint.yml
benchmarkFixture.js
benchmarkNodeVersions.js
benchmarkRegistry.js
commandsMap.js
eslint.config.mjs
index.js
latencyProxy.js
latencyProxy.test.mjs
mergeResults.js
nodeManagersMap.js
package.json
pnpm-workspace.yaml
pnprServer.js
pnprServer.test.mjs
populatePnprCache.js
recordBenchmark.js
setupPackageManagers.js
tsconfig.lint.json
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.
Review details
Context from checks skipped due to timeout: 4
GitHub Check: CodeQL
GitHub Check: CodeRabbit
GitHub Check: Analyze (javascript-typescript)
GitHub Check: Analyze (actions)
CI failures not shown inline: 2
GitHub Actions: Lint / 0_lint.txt: chore: lint with the pnpm monorepo's ESLint config
##[group]Running pnpm install --no-runtime...
? Verifying lockfile against supply-chain policies (229 entries)...
Packages are hard linked from the content-addressable store to the virtual store.
Content-addressable store is at: /home/runner/setup-pnpm/store/v11
Virtual store is at: node_modules/.pnpm
✗ Lockfile failed supply-chain policy check (229 entries in 1.3s)
Lockfile is up to date, resolution step is skipped
Error: ERR_PNPM_TARBALL_URL_MISMATCH
× installing dependencies
╰─▶ 1 lockfile entries failed verification:
@pnpm/eslint-config@1100.0.2 has a tarball URL (https://node-
registry.bit.cloud/@pnpm/eslint-config/-/eslint-config-1100.0.2.tgz)
that does not match the registry's published metadata (https://
registry.npmjs.org/@pnpm/eslint-config/-/eslint-config-1100.0.2.tgz)
help: The lockfile contains entries that pnpm cannot verify, whatever the
configured policies. This can mean the lockfile is stale, or that it
was tampered with — inspect recent changes to pnpm-lock.yaml before
trusting it. If the changes look expected, run "pnpm clean --lockfile"
and then "pnpm install" to rebuild from a fresh resolution.
##[endgroup]
##[error]pnpm install --no-runtime exited with status 1
GitHub Actions: Lint / lint: chore: lint with the pnpm monorepo's ESLint config
##[group]Running pnpm install --no-runtime...
? Verifying lockfile against supply-chain policies (229 entries)...
Packages are hard linked from the content-addressable store to the virtual store.
Content-addressable store is at: /home/runner/setup-pnpm/store/v11
Virtual store is at: node_modules/.pnpm
✗ Lockfile failed supply-chain policy check (229 entries in 1.3s)
Lockfile is up to date, resolution step is skipped
Error: ERR_PNPM_TARBALL_URL_MISMATCH
× installing dependencies
╰─▶ 1 lockfile entries failed verification:
@pnpm/eslint-config@1100.0.2 has a tarball URL (https://node-
registry.bit.cloud/@pnpm/eslint-config/-/eslint-config-1100.0.2.tgz)
that does not match the registry's published metadata (https://
registry.npmjs.org/@pnpm/eslint-config/-/eslint-config-1100.0.2.tgz)
help: The lockfile contains entries that pnpm cannot verify, whatever the
configured policies. This can mean the lockfile is stale, or that it
was tampered with — inspect recent changes to pnpm-lock.yaml before
trusting it. If the changes look expected, run "pnpm clean --lockfile"
and then "pnpm install" to rebuild from a fresh resolution.
##[endgroup]
##[error]pnpm install --no-runtime exited with status 1
Additional context used
Learnings: 1
Learning: 2026-08-19T09:30:46.644Z
Learnt from: zkochan
Repo: pnpm/benchmarks PR: 61
File: mergeResults.js:63-91
Timestamp: 2026-08-19T09:30:46.644Z
Learning: In the benchmark repository, `LIMIT_RUNS` is defined in `recordBenchmark.js`. Do not import it from `index.js`, because `index.js` calls `run()` during module import and would start benchmark execution.
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
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
Lints this repo with the same rules as the pnpm monorepo:
@pnpm/eslint-configpluseslint-plugin-regexp's recommended config, mirroring the monorepo'seslint.config.mjs.**/*.ts; here its entries are retargeted to**/*.js/**/*.mjs(and its test-file entry to**/*.test.mjs). Type-aware rules run viatsconfig.lint.jsonwithallowJs.@typescript-eslint/explicit-module-boundary-typesis off, because JS has no syntax for the types it asks for.import-x/no-extraneous-dependenciesis off: this is a set of scripts with one manifest.no-floating-promisesallowsnode:test'stest()/describe(), same as the monorepo's override for its node:test suites.node:protocol, import sorting, trailing commas, brace style.benchmark,recordBenchmark,benchmarkNodeVersions,cmdsMap,nodeManagersMap).voidon the two fire-and-forgetflushed().finally()calls in the latency proxy. Their queue never rejects.report()now carriescause.awaits in loops (polling, serial measurements, zstd worker throttling) geteslint-disable-next-line no-await-in-loop -- <reason>, as the monorepo's directive rule requires.PENDING_SIZE_AND_SHAPE_REFACTOR, the same mechanism the monorepo uses, so the refactor can happen separately.pnpm run lintand aLintworkflow that runs lint and the tests on PRs and pushes to main.pnpm-workspace.yamlwithallowBuilds: { unrs-resolver: true }, matching the monorepo's policy. Each pnpm fixture writes its ownpnpm-workspace.yaml, so the benchmarks never walk up into this one.Test plan
pnpm run lintpassespnpm testpasses (9/9)🤖 Generated with Claude Code
Summary by CodeRabbit
Chores
Tests