Lint and Validate Skill
Run the appropriate validation tools after each code change, and finish a task only once they pass — lint and type errors found later cost more to trace back.
Procedures by Ecosystem
Node.js / TypeScript
- Lint/Fix:
npm run lintornpx eslint "path" --fix - Types:
npx tsc --noEmit - Security:
npm audit --audit-level=high
Python
- Linter (Ruff):
ruff check "path" --fix(Fast & Modern) - Security (Bandit):
bandit -r "path" -ll - Types (MyPy):
mypy "path"
The Quality Loop
- Write/Edit Code
- Run Audit:
npm run lint && npx tsc --noEmit - Analyze Report: Check the "FINAL AUDIT REPORT" section.
- Fix & Repeat: Resolve "FINAL AUDIT" failures before submitting code.
Error Handling
- If
lintfails: Fix the style or syntax issues immediately. - If
tscfails: Correct type mismatches before proceeding. - If no tool is configured: Check the project root for
.eslintrc,tsconfig.json,pyproject.tomland suggest creating one.
Don't commit code or report it as done until these checks pass.
Scripts
| Script | Purpose | Command |
|---|---|---|
cardume-lint-runner |
Unified lint check | cardume-lint-runner <project_path> |
cardume-type-coverage |
Type coverage analysis | cardume-type-coverage <project_path> |