verbose-names
an abbreviated name outside a small loop or a well-known convention
Agent checkadvisory by defaultbasecode
The argument
- Verbose, readable names — code a new developer understands without extra documentation. Single letters only in small loops (
i) or well-known conventions (efor event).
The proof
failsrc/billing/sumCharges.ts
export const sumCharges = ({ c }: { c: number[] }): number => {
let t = 0;
for (const v of c) {
t += v;
}
return t;
};
passsrc/billing/sumCharges.ts
export const sumCharges = ({ charges }: { charges: number[] }): number => {
let total = 0;
for (let index = 0; index < charges.length; index += 1) {
total += charges[index] ?? 0;
}
return total;
};
Turn it down
Both lines go in your lightsout.config.json.
"standards-checks": { "verbose-names": "advisory" }"standards-checks": { "verbose-names": "off" }