Skip to content

chore: lint TWD tests with twd-lint - #8

Merged
kevinccbsg merged 1 commit into
mainfrom
chore/twd-lint
Oct 12, 2026
Merged

kevinccbsg merged 1 commit into
mainfrom
chore/twd-lint

Conversation

@kevinccbsg

Copy link
Copy Markdown
Member

What

Adds twd-lint to ESLint, so mistakes in TWD tests are reported in the editor and by npm run lint instead of in a failing browser run:

import twd from 'twd-lint'
// ...
twd.configs.recommended,

recommended applies to *.twd.test.* files only, so app code and other rules are untouched. It reports missing awaits on async TWD calls, describe/it/expect imported from the wrong module, rule.request.body on a waitForRequest result, and .only left behind.

The existing TWD tests already pass it: no new reports.

Checked

  • npx eslint . reports the same as before on everything that is not a TWD test (0 errors and 4 warnings on main, unchanged).
  • A probe test with it.only and an un-awaited twd.visit is reported by this repo's ESLint, so the plugin is active.

🤖 Generated with Claude Code

Adds twd-lint's recommended config to ESLint, scoped to *.twd.test.*
files, so missing awaits, wrong runner imports, rule.request.body and
.only are reported in the editor and in CI. The existing tests already
pass it.
@github-actions

Copy link
Copy Markdown

✅ TWD: 7 passed

Passed Failed Skipped Contracts Duration
7 0 2 6 ✓ · 0 ✕ · 1 ⚠ 3.7s
1 contract warning
  • DELETE /todos/{id} 204 (deleteTodo): Response 204 has no content definition for DELETE /todos/{id}

View full report →

@kevinccbsg
kevinccbsg merged commit 6d90942 into main Oct 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant