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
Draft
feat(cli): add qawolf lint to check flow files against QA Wolf's rules#1537Jason Allen (JAllen2022) wants to merge 1 commit into
Jason Allen (JAllen2022) wants to merge 1 commit into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 viaresolveProjectDirSafe. 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 likeno-unnecessary-type-assertionfire across files.Registered as a
localcommand (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.0is not on npm yet - that PR makes it publishable and the publish happens after its merge. Until thenbun installfails on the new dependency, so this stays a draft.bun.lockis 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 generate1870 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.jsondowngrading 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.jsonoutside the project is ignored.Checklist