react-domain-folders
two or more related JSX-producing functions left ungrouped in `utils/`
Agent checkadvisory by defaultreactcode
The argument
Domain Folders
The graduation rule
applied to JSX-producing helpers: two or more functions sharing a subject
graduate out of utils/ into a named domain folder, exactly as pure functions
do.
common/
├── utils/ # Ungrouped pure functions
├── stepConfigs/ # ✅ Domain folder — 2+ related JSX config builders
│ ├── getDesignStepConfig.tsx
│ ├── getInstallStepConfig.tsx
│ └── getStepContentConfig.tsx
├── cellRenderers/ # ✅ Domain folder — 2+ related JSX renderers
│ ├── renderStatusCell.tsx
│ └── renderDateCell.tsx
A domain folder is a grouping, not a module
(a domain folder is not a module):
callers import each file in it directly, and like every folder it carries no
index.ts (folder-index-file rule).
The proof
fail
export const getDesignStepConfig = () => ({ title: 'Design', body: <p>Pick a theme.</p> });
pass
export const getDesignStepConfig = () => ({ title: 'Design', body: <p>Pick a theme.</p> });
Turn it down
Both lines go in your lightsout.config.json.
"standards-checks": { "react-domain-folders": "advisory" }"standards-checks": { "react-domain-folders": "off" }