Skip to content

feat(cli): add qawolf lint to check flow files against QA Wolf's rules - #1537

Draft
Jason Allen (JAllen2022) wants to merge 1 commit into
mainfrom
jallen/nova-1586-qawolf-lint
Draft

feat(cli): add qawolf lint to check flow files against QA Wolf's rules#1537
Jason Allen (JAllen2022) wants to merge 1 commit into
mainfrom
jallen/nova-1586-qawolf-lint

Conversation

@JAllen2022

Copy link
Copy Markdown

Relates to qawolf/platform#32443 and NOVA-1586

Overview of Changes

qawolf lint <files...> lints flow files with QA Wolf's own rules - the same linter the platform editor and Tester run, imported from @qawolf/workflow-linter. It reads the project's .eslintrc.json (severity-only overrides, bundled plugins only, same contract as the editor) by walking up from cwd, bounded by the package root via resolveProjectDirSafe. Output is eslint-stylish per file plus a problem count; exit 0 for clean or warnings-only, testFailure (1) when any error-level finding exists, invalidArgs (2) for a missing file or a directory argument. Type-aware rules work - the command builds a real TS program over each file's import graph, so things like no-unnecessary-type-assertion fire across files.

Registered as a local command (no auth, no API), so the generated skill table advertises it to agents as safe to run and retry. Commander handles --help, unknown options, and missing args natively. Minor changeset included.

Blocked on qawolf/platform#32443: @qawolf/workflow-linter@1.0.0 is not on npm yet - that PR makes it publishable and the publish happens after its merge. Until then bun install fails on the new dependency, so this stays a draft. bun.lock is deliberately untouched; it gets regenerated in a follow-up commit right after the publish. Everything below ran against a locally built tarball of that package.

Testing

bun run typecheck
bun run lint
bun run format:check
bun run knip
bun test
bun run generate

1870 tests pass, 13 of them new. Also verified end to end with the built bundle (node dist/cli.js) in a temp project: error file → stylish output + exit 1, clean file → silent exit 0, .eslintrc.json downgrading a rule to warn → warning + exit 0, cross-file type-aware finding, missing file and directory args → exit 2, and a parent directory's .eslintrc.json outside the project is ignored.

Checklist

  • Changes follow the code style of this project
  • Self-review completed
  • Tests added/updated (or not applicable)
  • No breaking changes (or described below)

@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants