996 B
996 B
Campsite Rule (MANDATORY)
If you modify a line containing a policy violation, you MUST either:
- Fix the violation properly in the same change, OR
- Flag it as a deferred item with documented rationale
"It was already there" is NEVER an acceptable justification for perpetuating a violation in code you touched. Touching it makes it yours.
Examples of violations you must fix when you touch the line:
as unknown as Typedouble assertions — use type guards insteadanytypes — narrow tounknownwith validation or define a proper interface- Missing error handling — add it if you're modifying the surrounding code
- Suppressed linting rules (
// eslint-disable) — fix the underlying issue
If the proper fix is too large for the current scope, you MUST:
- Create a TODO comment with issue reference:
// TODO(#123): Replace double assertion with type guard - Document the deferral in your PR/commit description
- Never silently carry the violation forward