Repository navigation
chore: lint against importing past a folder's index.ts in the bot - #136
Merged
Merged
Conversation
ChristopherPHolder
enabled auto-merge (squash)
October 31, 2026 12:10
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 and why
Closes #131.
Every folder in
apps/bot/srcnow has anindex.tsthat is its interface (#133, #134, #135), but nothing stopped code from reaching past it into a folder's internals. Over time the seams would wear away.no-restricted-importsrule forapps/bot/src/**in the rootvite.config.ts. A file may import siblings in its own folder, and other folders, parent or child, only through theirindex.ts. Anything deeper fails lint, with a message saying to use the folder'sindex.ts.recording/audio/gets its ownindex.ts, sorecording/uses its audio pieces through an interface too.CONTRIBUTING.mddescribes the layout and the rule.How I tested it
recording/importing../slack/BotPosts.ts,./audio/ClipCutter.tsand../office/index.ts. The first two failed with the rule's message, and theindex.tsimport passed.pnpm vp run cipasses, so the bot's code already keeps to the rule.Checklist
vp run cipasses