folder-size
more files sitting in one flat folder than the cap allows
Deterministic checkadvisory by defaultbasecode
The argument
When a folder starts reading like a directory listing instead of a description of the product, group the related siblings under a parent domain folder. Never sort them into a bucket named for what kind of code they are.
A directory a file-based router owns is not judged here: its population is the number of routes the app has, which is a product fact rather than a folder someone let grow.
The proof
fail
export const wide0 = 0;
pass
{
"name": "folder-size-pass-fixture",
"private": true,
"dependencies": {
"@tanstack/react-router": "^1.0.0"
}
}
Its numbers
The defaults the pack ships. A repo may set its own.
- cap
- 20
{
"standards-checks": {
"folder-size": {
"settings": {
"cap": 20
}
}
}
}Turn it down
Both lines go in your lightsout.config.json.
"standards-checks": { "folder-size": "advisory" }"standards-checks": { "folder-size": "off" }