Skip to content

Enforce braced control-flow bodies with eslint/curly #90

Description

@taras

Problem

AGENTS.md requires braces around if statements, but the lint configuration does not enforce that rule.

Two gaps allow violations to pass verification:

  • .oxlintrc.json does not enable eslint/curly (and the style category is disabled).
  • The deno task lint paths omit core/tests/.

PR #89 exposed the gap by adding a braceless if in core/tests/expand.test.ts while all required checks remained green.

A baseline audit currently reports:

  • 76 violations in paths already covered by deno task lint
  • 14 additional violations in core/tests/
  • 90 violations total

Audit command:

npx oxlint -A all -D eslint/curly core/src/ cli/src/ durable-streams/ runtime/ test-support/ core/tests/

Scope

Implement repository-wide brace enforcement in a dedicated follow-up PR:

  • Enable eslint/curly at error severity in .oxlintrc.json.
  • Add core/tests/ to the lint task in both deno.json and package.json.
  • Mechanically add braces to the existing violations across all linted paths.
  • Keep the rewrite behavior-preserving; do not mix unrelated refactors into the cleanup.
  • Update any contributor or verification documentation affected by the lint-command change.

Acceptance criteria

  • Braceless control-flow bodies fail lint.
  • Source and test files are covered consistently.
  • deno task lint reports zero errors.
  • deno check core/mod.ts passes.
  • deno test --no-check --allow-all core/tests/ durable-streams/tests/ passes with zero failures.
  • git diff --check passes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions