lint
Scannednpx machina-cli add skill helderberto/skills/lint --openclawFiles (1)
SKILL.md
476 B
Linting
Standard Command
npm run lint - runs tsc --noEmit && eslint
Workflow
- Run
npm run lint - For fixes:
npm run lint-fix - Report file:line references
Rules
- Use project's
package.jsonscripts - Never use
npxdirectly - Don't auto-fix unless requested
Overview
Lint helps validate code quality by running type checks and ESLint. It uses the project's npm scripts to perform a lint pass and report issues with file:line references. For fixes, use a separate lint-fix script when needed.
How This Skill Works
The lint command (npm run lint) executes the project’s linting process, running tsc --noEmit and ESLint. If fixes are required and approved, you can apply them with npm run lint-fix. Results are reported with precise file:line locations to guide remediation.
When to Use It
- When a user asks to run linting (e.g., 'run linter', '/lint', 'check linting')
- When preparing a commit or PR to verify syntax and style
- When fixes are requested and you want to auto-fix with lint-fix
- When you need precise locations of issues via file:line references
- When integrating lint checks into CI or a development workflow
Quick Start
- Step 1: npm run lint
- Step 2: If issues are reported and fixes are approved, npm run lint-fix
- Step 3: Re-run npm run lint until the report is clean
Best Practices
- Use the project's npm scripts for linting tasks
- Never invoke npx directly
- Do not auto-fix unless explicitly requested or allowed
- Review file:line references to locate the root cause
- Run lint before committing or submitting PRs
Example Use Cases
- npm run lint
- npm run lint-fix
- Lint results show errors like src/app.ts:42
- Integrate lint in CI by running npm run lint
- Verify changes locally by re-running npm run lint after fixes
Frequently Asked Questions
Add this skill to your agents