Meaningful-test ESLint rules
Source workflow
Select the weak pattern
Choose a recurring, mechanically recognizable test pattern that agents use to finish without proving behavior.
KingBootoshi's central example is mock echo: configure a mock to return a value, call the subject, then compare `result.data` with the exact value supplied to the mock.
The source's implemented set also includes:
- no-unscoped-service-test: flag a test that creates a mock Supabase client without asserting organization or user scope;
- require-error-code-assertion: flag a failed-result test that checks only `ok === false` without the specific error code;
- no-mock-echo: flag the mock-echo comparison.
Build and wire the custom rules
Have the coding agent create the repository-specific ESLint rules and wire them into the project's lint gate. Preserve the source's reported configuration: no-unscoped-service-test is an error; require-error-code-assertion and no-mock-echo are warnings.
Let the gate force a real repair
When the rule reports, the agent cannot finish through that prohibited pattern. It must replace the weak test with one that clears the repository's rule. The source presents this enforcement as the mechanism that makes the slop pattern impossible to commit.
XSkills operational adaptations
Preflight the repository's ESLint version, parser, configuration, custom-rule location, rule-test harness, and lint command. If custom rules cannot be loaded, return the rule design and exact missing integration step instead of claiming the gate is wired.
Create positive and negative fixtures for the selected syntax relationship, run the rule tests, and audit a bounded sample of the real suite before relying on the rule. Use structural syntax relationships rather than broad text matching. These validation mechanics come from XSkills, not the source.
XSkills safety adaptations
Do not create an autofix that invents assertions, test data, or behavior. Require authorization before changing repository-wide lint enforcement. Keep ordinary tests and review in the quality gate; a custom ESLint rule proves only that its prohibited static pattern was not detected.
Return
Return the selected source pattern, installed or proposed rule, reported severity, fixture and sample-audit results, lint output, and any missing integration capability.
Source attribution
Independently compiled by XSkills from KingBootoshi's post about using custom ESLint rules to prevent low-value agent-authored tests. KingBootoshi did not author or review this skill. Capability fallback, fixture and sample validation, structural-detection guidance, no-autofix boundary, repository-change authority, and the lint-versus-behavior limitation are XSkills adaptations. Attribution does not imply endorsement.