slop-refinery-eslint-tests
Installation
SKILL.md
ESLint Tests
Write rule tests with RuleTester and run them under vitest.
At a high level:
- If the repo already has an ESLint rule and test layout, follow that structure.
- If the repo does not have an ESLint rule and test layout yet, default to
eslint/custom-rulesfor rules andeslint/testsfor rule tests. - Mirror each custom rule with a matching test file in the location the repo uses for ESLint rule tests.
- Keep the tests focused on the rule contract, not unrelated parser or config behavior.
- Prefer small inline code samples that make the valid or invalid case obvious.
Use this structure for each custom rule:
10valid examples that should produce no errors.10invalid examples that should report the expected rule message(s).
Guidelines:
Related skills
More from howmzofficial/slop-refinery
slop-refinery-setup
Set up a TypeScript repository to use slop-refinery by wiring ESLint, Prettier, package scripts, and validation commands, then verify the integration end to end.
8slop-refinery-quick-checks
Run all automated checks below and fix resulting problems to quickly ensure some level of code quality and correctness.
3slop-refinery-automated-checks
Run all automated checks and fix resulting problems to ensure some level of code quality and correctness.
2