Instruction file imported from radzionc/increaser (
.cursor/rules/check.mdc). Copyright stays with the author.
Run yarn check after finishing a task
You MUST run yarn check after completing the task. This is mandatory and non-negotiable.
yarn check is a comprehensive command that runs TypeScript type checking, ESLint (with auto-fix), and Knip (unused code check). You do NOT need to run these commands (e.g., yarn typecheck, yarn eslint) separately as they are already included.
yarn check
Workflow:
- Complete the requested changes
- Run
yarn checkimmediately - If
yarn checkreports errors, fix them:- Unused exports/files: Delete unused exports, functions, or entire files reported by Knip
- TypeScript errors: Fix type errors
- ESLint errors: Fix linting issues (auto-fix is already attempted by
yarn check, but some may require manual fixes)
- Rerun
yarn checkuntil it passes with no errors or warnings - Only then consider the task complete
Important: When knip reports unused exports or files, you must remove them. This includes:
- Unused exported functions
- Unused exported types (if the file has no other purpose)
- Entire unused files
Do not skip this step when @check.mdc is mentioned in the user's request.