2026-10-26 — Readability and formatting checks

This started with a review of how the source, tests, and documentation read. Most files already used the configured indentation and punctuation. The gaps were in the parts a formatter cannot judge: where one step ends and another begins, whether a comment explains something useful, and whether a test makes its setup and assertions easy to follow.

The review also found that the checks did less than the contribution instructions implied. Formatting was a command someone could run, rather than a condition of passing npm test, and ESLint never examined the test files.

Formatting becomes part of npm test

npm test now checks formatting before linting and Jest. format:check uses the same file selection as format, so the check and the command that fixes its failures agree about what they cover. Their globs use double quotes so npm's Windows shell passes them to Prettier correctly.

Prettier handles indentation, punctuation, and wrapping. It preserves logical blank lines but does not supply them, so ESLint now checks spacing around declarations, control flow, returns, and class members. Both lint commands include test/; Jest globals are declared for those files.

Comments that repeated the code

Several test files opened with paragraphs explaining what the assertions below already said. Those introductions were removed. The longer comments on Logger, LogFields, Retry, Json, and List were shortened around the contracts a caller needs: defaults, field selection, retry policy, parsing limits, and batch-size handling. Public JSDoc and useful examples remain.

The configuration reference received the same pass. It now leads with registration and resolution, then explains merge behavior, initialization order, and missing settings. A readability guide records the local conventions with code and test examples.

Short build lists keep their line breaks

Prettier puts a short array on one line when it fits within the print width. That would turn Rollup's include, output, and plugins lists into compact rows, losing the existing one-entry-per-line layout. rollup.config.ts remains excluded from Prettier, and those lists stay expanded. Passing a formatter is only part of the readability review.

Service-name examples use consistent generic values, and local environment files are excluded from Git and Docker build contexts. Example environment templates remain eligible for version control.

Tests and builds

All 13 Jest suites passed, with 190 tests. Formatting, linting, package bundles, declarations, the API reference, and the developer book also passed. The five changed production files emit the same JavaScript as before the cleanup.

The local environment blocks child processes, so Jest ran with --runInBand and TypeDoc used its direct CLI entry point. Checks ran on the available Node.js 26.12.1 runtime; the repository's Node.js 22 baseline was not verified locally.

results matching ""

    No results matching ""