lightsoutAlpha

case-collision

Names that differ only in upper and lower case.

Deterministic checkBlocks by default

The rule

Agents read this text as written when they write and review code.

Never put two siblings in a folder whose names differ only by case, including a file beside a folder: readme.md beside README.md, or Gates.ts beside gates/. Rename one of them.

A case-insensitive filesystem such as macOS or Windows sees one entry where Linux CI sees two, so an import can reach a different file on the machine that checks it, and a type checker objects late or, in plain JavaScript, never.

Examples

The check flags the incorrect code and passes the correct code. 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

srcfeaturegatesrenderMarkdown
src/feature/Gates.ts
export { renderGreeting } from './gates/renderGreeting';

Correct

srcfeaturegatesrenderMarkdown
src/feature/configGates.ts
export { renderGreeting } from './gates/renderGreeting';

Configure

  • Block"blocking"Stops a run when a file the run changed breaks the rule.
    Default
  • Advise"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.

lightsout.config.json
{
"standards-rule-settings": {
"case-collision": "blocking"
}
}

Packs that select it