React
On with ReactAdded on top of the TypeScript rules when a repo uses React.
- Rules
- 10
- Deterministic checks
- 0
- Agent checks
- 10
React Architecture3
- component-file-structurea folder created for a component that bundles no utilities, types or constantsAgentAdvises
- react-domain-folderstwo or more related JSX-producing functions left ungrouped in
utils/AgentAdvises - file-naming-conventionsa React file whose name does not carry the casing its kind mandatesAgentAdvises
Component & Hook Patterns1
Unit Testing Components & Hooks6
- framework-basicsa component test importing the wrong testing library, extension or interaction helper for the packageAgentAdvises
- the-render-patterna component test that renders outside the setup factory or destructures queries from render()AgentAdvises
- query-prioritya query reaching for a test id where a role, label or text would find the elementAgentAdvises
- mocking-component-dependenciesa mocked hook, store or child component that hides coverage instead of a boundaryAgentAdvises
- testing-user-interactionsan interaction test that groups the target query with arrange instead of the actAgentAdvises
- testing-hooks-in-isolationa hook test that mocks more framework primitives than the hook under test usesAgentAdvises