Repository navigation
chore(biome): flag barrel files outside package entry points - #669
Merged
Merged
Conversation
…y barrels The input, output, monorepo and templates index.ts files only re-exported their siblings. The pipeline and the one spec that imported through them now take renderTemplate, aggregateToRoot and splitByPackage from the modules that define them; the input and output barrels had no importers. llm/index.ts keeps createProvider and the LLM context types but no longer re-exports the providers and task functions, and aggregator.ts no longer re-exports splitByPackage. The package's root index.ts is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HQN3v9Z4f1mu3xK4Z7K44e
Biome's noBarrelFile now runs on packages/*/src, except each package's root index.ts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HQN3v9Z4f1mu3xK4Z7K44e
Contributor
|
Standing release PR: #614 · v0.42.0 queued (4 packages) · open 81d 23h 36m · ✅ ready to merge Release Preview — v0.41.2 → v0.41.3
These changes will be added to the release PR (#614) when merged: Changelogmonorepo 0.41.2 → 0.41.3
After merge — predicted release
Updated automatically by ReleaseKit |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HQN3v9Z4f1mu3xK4Z7K44e
Merged
6 of 19 tasks
3 of 19 tasks
This was referenced Oct 22, 2026
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.
Description
Turns on Biome's
performance/noBarrelFileas an error forpackages/*/src/**, except each package's rootindex.ts. The root index is the package's public API, so it's the one file allowed to re-export. Same scoping as webdriverio/desktop-mobile#729.Biome 2.5.6 reports a file if it contains any
export * fromorexport { x } fromthat isn't type-only, even when the file also declares its own code. It skipsexport type … fromand.d.tsfiles. It also skipsimport { x } …; export { x }, because that isn'texport … fromsyntax.Flagged before (outside root
index.ts), all in@releasekit/notes:src/input/index.tssrc/output/index.tssrc/monorepo/index.tstest/integration/pipeline.spec.tsimported itaggregator.jsandsplitter.jssrc/templates/index.tscore/pipeline.tsimported it, forrenderTemplateloader.jssrc/llm/index.tscreateProviderand the LLM context types, and also re-exported the providers and task functionsllm/tasks/*.js.createProviderstays, so the specs that mockllm/index.jsstill intercept it.src/monorepo/aggregator.tssplitByPackage; nothing imported it throughaggregator.tsThe deleted files are also removed from the notes coverage
excludelist.Flagged after: none outside the eight root
index.tsfiles, which are exempt.Public API unchanged. The notes root
index.tsdidn't re-export from any of these barrels; the builtdist/index.d.tsis byte-identical and the runtime export keys match.Other entry points need no exemption:
./clisubpaths (notes,publish,version) andrelease'sdispatcher.tsimportthe command andexport { … }the local binding, which the rule doesn't report.notes/src/errors/index.tsandpublish/src/errors/index.tsdefine the error classes themselves, so they aren't barrels.Out of scope, left unchanged:
llm/index.ts'sexport type { LLMProvider } …— the rule ignores them since they're erased at build time.import { x } …; export { x }), e.g.release/src/backfill/github-release.ts(NOTES_MARKERfrom@releasekit/core), version'sisCargoToml/isPubspecYaml, publish'sparseCargoToml/parsePubspec, notes'loadAuth/saveAuth. The rule can't catch this pattern, and several feed a rootindex.ts.AGENTS.mdhas no barrel-file rule, so it isn't changed (the source PR removed one from its ownAGENTS.md).Related Issue(s)
None. Ports webdriverio/desktop-mobile#729 (a releasekit consumer).
Type of Change
feat— New featurefix— Bug fixdocs— Documentation changerefactor— Code refactoringtest— Adding or updating testschore— Maintenance, dependencies, toolingScope
@releasekit/version@releasekit/notes@releasekit/publish@releasekit/config@releasekit/coreChecklist
pnpm lint)pnpm test)pnpm typecheck)Testing Notes
pnpm build,pnpm lint(with the rule enabled) andpnpm typecheckpass.pnpm --filter @releasekit/notes test:unit: 443 passed, 2 skipped, coverage thresholds met.pnpm --filter @releasekit/release test(release bundles notes): 847 passed.pnpm test --force: 16/16 tasks pass.packages/notes/src/tmpbarrel/index.ts(export { … } from) andpackages/core/src/tmp-shim.ts(export * from) both failbiome checkwithlint/performance/noBarrelFile; a mixed file that declares a const and re-exports from@releasekit/corealso fails; a type-only re-export doesn't. Probes removed.createProviderfromllm/index.js, both kept, so they don't break;test/integration/pipeline.spec.tsmay need a one-line conflict resolution in whichever merges second.pnpm testrun timed outnotes/test/integration/snapshot.spec.tsat 5.4s (limit 5s); it takes ~0.9s alone and passed on rerun — machine load, not this change.Generated by Claude Code


Confidence Score: 5/5
The PR appears safe to merge.Summary
Enables
noBarrelFilefor package source while keeping rootindex.tsfiles exempt.No actionable issues found. Tests and lint were not run during this review.
Intentional limits acknowledged by
goosewobbler: type-only re-exports and values exported through local bindings remain unchanged because the rule does not flag them.Reviews (1) · Last reviewed commit: "chore(biome): flag barrel files outside ..." · Reviewed by Greptile