lightsout/tanstack-start
The rules written for TanStack Start: the React and base rules, the framework's own files left to it, and the folders it adds for routes, server functions and queries.
Applies only to packages that depend on @tanstack/react-start.
- Rules
- 50
- Deterministic checks
- 36
- Agent checks
- 20
Classes2
Functions4
Named Constants2
Type Safety2
Duplication4
- dead-exportCode that nothing uses any more.DeterministicBlocks
- duplicate-function-bodyFunctions that are copies of each other under new names.DeterministicBlocks
- duplicate-code-blockThe same code written out in more than one place.DeterministicAdvises
- duplicate-export-nameExports in different places that share one name.DeterministicAdvises
Imports4
- import-path-aliasWhen imports use the package's path aliases.DeterministicAdvises
- index-filesWhich folders have an index file, and where an import points.DeterministicAdvises
- index-file-contentsWhat an index file may hold.DeterministicAdvises
- circular-dependenciesModules that depend on each other.DeterministicAdvises
Layout3
Size2
React Layout4
- feature-foldersWhat a feature is, and which folders it holds.DeterministicAdvises
- shared-layerWhere code that several features use lives.DeterministicAgentAdvises
- component-folderWhen a component gets a folder of its own.DeterministicAdvises
- feature-import-directionWhich way imports flow between features and the shared layer.DeterministicAdvises
React Size1
TanStack Start6
- feature-layoutWhich folders the framework adds to a feature, and what a route reaches into.DeterministicAdvises
- thin-route-fileWhat a route file holds.AgentAdvises
- query-options-per-queryWhere a query is declared, and where its key lives.DeterministicAgentAdvises
- loader-owns-first-paintHow a screen's data is fetched.DeterministicAgentAdvises
- server-function-boundaryWhere a server function lives, and what one file of it holds.DeterministicAgentAdvises
- inferred-return-typesWhich exports leave their return type to inference.AgentAdvises
Test Style10
- existing-testsHow these rules apply to a repo's existing tests.AgentAdvises
- test-structureThe shape of a single test.AgentAdvises
- test-code-path-coverageWhich tests a unit needs.AgentAdvises
- test-jest-importsWhat a test file imports from Jest.AgentAdvises
- no-test-state-in-hooksWhere a test's state is built.DeterministicBlocks
- test-mock-prefixHow mocks are named.DeterministicBlocks
- test-mock-untypedTyping a mock function and the wrapper that forwards to it.DeterministicBlocks
- test-manual-mock-cleanupResetting mocks between tests.DeterministicAdvises
- assertions-pin-contractsWhat a test asserts against.AgentAdvises
- what-to-mockWhat to mock, and with which tool.AgentAdvises