banned-folder-name
Folder names that say nothing about what the folder holds.
Deterministic checkAgent checkAdvises by default
The rule
Agents read this text as written when they write and review code.
Name a folder for its subject, such as billing/ or formatting/, never for the kind of code it holds.
utils/,services/,helpers/,lib/,core/,misc/,shared/andinternal/are never folder names.types/andconstants/are folder names only at the top of acommon/.
A name that says nothing about what a folder holds draws code nobody placed, and common/ is the only folder name with a meaning of its own.
Examples
The check flags the incorrect code and passes the correct code; the agent judges what the check cannot see. Each example is a small repo, because this rule looks across files. It opens on the file that matters; the other files are the repo around it.
Incorrect
srcbillinghelpersinvoicestypes
export const formatAmount = () => 1;
Correct
srcbillingcommontypesinvoices
export interface Invoice {id: string;}
Configure
- Block
"blocking"Stops a run when a file the run changed breaks the rule. - AdviseDefault
"advisory"Reports it and hands it to the refactor agent. Never stops a run. - Off
"off"Not checked. Use it when your own linter already enforces the rule.
Add this to your lightsout.config.json, then change the value.
{"standards-rule-settings": {"banned-folder-name": "advisory"}}