Skip to content

docs(testing): add lint-enforced CV anti-pattern checklist - #231

Merged
racitores merged 2 commits into
mainfrom
cursor/cv-lint-rules-bed1
Nov 18, 2026
Merged

racitores merged 2 commits into
mainfrom
cursor/cv-lint-rules-bed1

Conversation

@racitores

Copy link
Copy Markdown
Contributor

Description

Adds a short Rules (enforced by lint) checklist to testing/mobile-testing so agents writing component-view tests (*.view.test.tsx) stop copying the flaky patterns.

skills#217 is merged. It already holds the diagnosis: Golden Rules, the self-review checklist, and the Diagnosing Failures table. This PR does not restate that. Each lint rule is one line of why, a bad/good snippet, and a name-citation back to the existing rule.

metamask-mobile#38995 is also merged. Arbitrary jest.mock was already an ESLint error. That PR added the fake-timer ban. The rest of this list is the ESLint PR in progress on *.view.test.tsx.

Checklist

  1. No arbitrary jest.mock
  2. No fake timers
  3. No find* inside waitFor
  4. Await the subject, not a skeleton or sibling
  5. Re-query after a remount, then press
  6. No clearAllMocks without mockReset
  7. No fixed sleeps (zero-delay flush before an absence assert stays allowed, matching the in-repo guide)
  8. No bare timeout bumps

Agents run yarn eslint <file> on every new or edited CV test before finishing. A green Jest run does not cover these. Golden Rule 25 and self-review row 26 say the same thing. The write path in the decision tree and in writing-tests.md points at the checklist first.

Type of Change

  • New skill
  • Skill improvement/update
  • Bug fix
  • Documentation update
  • Other (please describe):

Checklist

  • I have read the CONTRIBUTING.md guidelines
  • My skill follows the SKILL_TEMPLATE.md format
  • I have tested this skill with an AI agent
  • My skill does not contain any secrets, private keys, or sensitive data
  • I have added appropriate documentation
  • My changes don't break existing skills

Testing

Docs only. No frontmatter or maturity change.

  • yarn lint (changelog validation) passes.
  • yarn audit:skills reports 0 errors. The mobile-testing warnings predate this PR.
  • yarn test reports 0 failures.
Open in Web Open in Cursor 

cursoragent and others added 2 commits November 10, 2026 14:56
Teach agents the short form of the component-view flake rules ESLint
rejects on *.view.test.tsx, and require yarn eslint before finishing.

Co-authored-by: racitores <racitores@users.noreply.github.com>
Keep main's changelog entries and add the component-view lint checklist line.

Co-authored-by: racitores <racitores@users.noreply.github.com>
@racitores
racitores enabled auto-merge (squash) November 18, 2026 10:54
@racitores
racitores merged commit 5560590 into main Nov 18, 2026
29 checks passed
@racitores
racitores deleted the cursor/cv-lint-rules-bed1 branch November 18, 2026 11:00
cursor Bot pushed a commit that referenced this pull request Nov 18, 2026
Folds the post-branch merges into the curated 0.4.0 changelog per review:
#258/#262 (mm-harness 0.96.33) into the recipe entry, #260/#261 into the
perps-review-pr entry, #264 rule pack and #231 CV lint checklist as new
entries, drops the inaccurate analytics-move BREAKING entry, and links

Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
#207 on the tsc-blindspots entry.
@cursor cursor Bot mentioned this pull request Nov 18, 2026
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.

3 participants