Short answer: Bareship writes its architecture down as lint errors instead of a wiki page. ESLint checks that imports go one way through five layers and that features never import each other, and dependency-cruiser checks the whole graph again in CI. Other rules each came from a real bug: hard-coded text, left / right styles that don't mirror in right-to-left languages, and calls the React Compiler caches. Every error message says how to fix it and links the decision behind it, so a teammate or an AI agent can fix the code without asking anyone.
This is Part 3 of Building Bareship. Part 2 covered the offline queue and
ended with a promise: an architecture the linter enforces.
Every React Native project starts with folders and good intentions. Someone draws the layers on a whiteboard,
everyone agrees, and it holds for a few weeks. Then a settings screen borrows a hook from the feed because it's
quicker, a string skips translation because it's "temporary", and the person who knew the rules is on leave.…