Code quality standards
July 8, 2026 · View on GitHub
Write the simplest code that solves the problem and reads like the file around it.
The rules below are the specific practices this repository enforces — most are also what /deslop strips out.
-
No needless wrappers or abstractions. Don't wrap a function that's used in one place, and don't add layers for a single caller. Plain, readable code beats a clever indirection.
-
No overcomplicated code. Keep it simple, understandable, and explainable, and make it fit the existing architecture.
-
Descriptive names. Use names like
pkgRootMatch,inputPath,error— never single letters or abbreviations likem,p,e. This applies across every package and script. -
Comments match the file. Don't add comments that restate the code or exceed the surrounding file's comment density. Plain English only.
-
No defensive noise in trusted paths. Skip
try/catchand null checks in code the walker has already validated — add them only where input is genuinely untrusted. -
No
anyto silence the type checker. Fix the type instead; the shared type definitions live inpackages/core/src/types/. Try avoiding typecasting (especially double typecasting), except for tests. Leave a short comment explaining why the typecasting is necessary. -
Use ESM import extensions.
-
Reuse an existing rule name when the same concept already exists for another spec flavor.
-
The repo lints with oxlint and formats with oxfmt (not ESLint/Prettier). Run
npm run lintandnpm run formatbefore committing.