chore: Mirror the EventSourcingDB Biome configuration and resolve lint violations#377
Merged
Merged
Conversation
Bumps [@biomejs/biome](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome) from 2.4.16 to 2.5.0. - [Release notes](https://github.com/biomejs/biome/releases) - [Changelog](https://github.com/biomejs/biome/blob/main/packages/@biomejs/biome/CHANGELOG.md) - [Commits](https://github.com/biomejs/biome/commits/@biomejs/biome@2.5.0/packages/@biomejs/biome) --- updated-dependencies: - dependency-name: "@biomejs/biome" dependency-version: 2.5.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
8261e68 to
bf60ac9
Compare
…t violations. Adopt the stricter Biome ruleset used by the EventSourcingDB UI (preset "all", nursery on, file-naming convention) and resolve all resulting errors and warnings: add explicit types in Client.ts and the stream type guards, refactor the unbounded loops in readNdJsonStream into bounded conditions, and rename a shadowed variable. This client targets Node.js, so noNodejsModules is disabled (it only adds value for runtime-agnostic code) and node:crypto/fs/path are used directly. The Dockerfile helper keeps __dirname (it is compiled as CommonJS) instead of the import.meta rewrite a Biome auto-fix had introduced, with an inline biome-ignore for noGlobalDirnameFilename. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015sN371FTWrWsz6k3qk3oPw
bf60ac9 to
159c06b
Compare
The package is bundled by tsdown into dual ESM + CommonJS (dist/index.mjs and index.cjs), but tsc type-checked the sources as CommonJS (module "CommonJS"), which rejected import.meta and forced __dirname. Switch the type-check to module "esnext" with moduleResolution "bundler", matching the bundled reality; the existing sources type-check unchanged. getImageVersionFromDockerfile now uses import.meta.dirname instead of __dirname, so noGlobalDirnameFilename is satisfied directly and its inline biome-ignore is gone. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015sN371FTWrWsz6k3qk3oPw
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.
What & why
Align the JavaScript client's Biome (and TypeScript) setup with the EventSourcingDB and resolve the resulting lint violations. Builds on the Biome 2.5.0 bump (#375), which it includes and supersedes.
Changes
preset: "all",nursery: "on", file-naming convention, test overrides.Client.tsand the stream type guards, bounded loops inreadNdJsonStream, a renamed shadowed variable, plus safe/unsafe auto-fixes.noNodejsModulesis disabled (it only adds value for runtime-agnostic code); thenode:built-ins (crypto/fs/path) are used directly.moduleis set toesnext/moduleResolution: bundler(wasCommonJS). The Dockerfile helper now usesimport.meta.dirname, which satisfiesnoGlobalDirnameFilenamedirectly (no inline ignore). Existing sources type-check unchanged.Scope
Config + lint only, no functional or runtime change to the published API. The Event cryptography keeps using
node:crypto(this client targets Node.js).Verification
npm run analyze(tsc + Biome--error-on-warnings): green — 0 errors, 0 warnings.Event.test.ts(hash + signature, against the real ESDB image): 6/6 green — also confirmsimport.meta.dirnameresolves at runtime.readNdJsonStream.test.ts: green.Closes #375.
🤖 Generated with Claude Code
https://claude.ai/code/session_015sN371FTWrWsz6k3qk3oPw