lightsout/code-style
Makes code read the same whoever wrote it: one way to write a function, a class, a named value and a unit test.
- Rules
- 20
- Deterministic checks
- 11
- Agent checks
- 11
Classes2
Functions4
Named Constants2
Type Safety2
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