Get the FREE Ultimate OpenClaw Setup Guide →

lint

Scanned
npx machina-cli add skill helderberto/skills/lint --openclaw
Files (1)
SKILL.md
476 B

Linting

Standard Command

npm run lint - runs tsc --noEmit && eslint

Workflow

  1. Run npm run lint
  2. For fixes: npm run lint-fix
  3. Report file:line references

Rules

  • Use project's package.json scripts
  • Never use npx directly
  • Don't auto-fix unless requested

Source

git clone https://github.com/helderberto/skills/blob/main/lint/SKILL.mdView on GitHub

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

  1. Step 1: npm run lint
  2. Step 2: If issues are reported and fixes are approved, npm run lint-fix
  3. 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
Sponsor this space

Reach thousands of developers