eslint-checker

Run ESLint for JavaScript/TypeScript code quality and style enforcement. Use for static analysis and auto-fixing.

104 stars

Best use case

eslint-checker is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Run ESLint for JavaScript/TypeScript code quality and style enforcement. Use for static analysis and auto-fixing.

Teams using eslint-checker should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/eslint-checker/SKILL.md --create-dirs "https://raw.githubusercontent.com/jmagly/aiwg/main/agentic/code/frameworks/sdlc-complete/extensions/javascript/skills/eslint-checker/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/eslint-checker/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How eslint-checker Compares

Feature / Agenteslint-checkerStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Run ESLint for JavaScript/TypeScript code quality and style enforcement. Use for static analysis and auto-fixing.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# ESLint Checker Skill

## Purpose

Single responsibility: Execute ESLint for static analysis, style enforcement, and auto-fixing of JavaScript/TypeScript code. (BP-4)

## Grounding Checkpoint (Archetype 1 Mitigation)

Before executing, VERIFY:

- [ ] Node.js and npm available
- [ ] ESLint installed (local or global)
- [ ] Configuration file exists (eslint.config.js, .eslintrc.*)
- [ ] Target files/directories exist

**DO NOT run ESLint without confirming configuration.**

## Uncertainty Escalation (Archetype 2 Mitigation)

ASK USER instead of guessing when:

- Multiple ESLint configs found
- Auto-fix scope unclear (all vs specific rules)
- Conflicting rules with Prettier
- Custom rule configuration needed

**NEVER auto-fix without user confirmation on production code.**

## Context Scope (Archetype 3 Mitigation)

| Context Type | Included | Excluded |
|--------------|----------|----------|
| RELEVANT | Source files, ESLint config, ignore patterns | Test files (unless requested) |
| PERIPHERAL | Prettier config, tsconfig | Build outputs |
| DISTRACTOR | node_modules | Deployment configs |

## Workflow Steps

### Step 1: Environment Check (Grounding)

```bash
# Verify ESLint installed
npx eslint --version || npm install -D eslint

# Check config exists
ls eslint.config.* .eslintrc.* 2>/dev/null || echo "No ESLint config found"

# List ignored patterns
cat .eslintignore 2>/dev/null || echo "No .eslintignore"
```

### Step 2: Run Linting

**Basic lint:**
```bash
npx eslint src/
```

**With specific extensions:**
```bash
npx eslint . --ext .js,.ts,.tsx
```

**JSON output for parsing:**
```bash
npx eslint src/ --format json > eslint_results.json
```

**With auto-fix:**
```bash
npx eslint src/ --fix
```

**Dry-run fix (preview):**
```bash
npx eslint src/ --fix-dry-run
```

### Step 3: Analyze Results

```bash
# Summary format
npx eslint src/ --format stylish

# Count by rule
npx eslint src/ --format json | jq '[.[].messages[].ruleId] | group_by(.) | map({rule: .[0], count: length}) | sort_by(.count) | reverse'

# Errors only (ignore warnings)
npx eslint src/ --quiet
```

### Step 4: Generate Report

```bash
# HTML report
npx eslint src/ --format html -o eslint_report.html

# Markdown summary
echo "# ESLint Report"
echo "## Summary"
npx eslint src/ --format compact 2>&1 | tail -5
```

## Recovery Protocol (Archetype 4 Mitigation)

On error:

1. **PAUSE** - Don't auto-fix on error
2. **DIAGNOSE** - Check error type:
   - `Parsing error` → Check TypeScript config, syntax
   - `Rule not found` → Install missing plugin
   - `Config error` → Validate eslint.config.js
   - `No files found` → Check paths, ignore patterns
3. **ADAPT** - Adjust scope or configuration
4. **RETRY** - With corrected settings (max 3 attempts)
5. **ESCALATE** - Report config issues to user

## Checkpoint Support

State saved to: `.aiwg/working/checkpoints/eslint-checker/`

```
checkpoints/eslint-checker/
├── lint_results.json        # Full results
├── error_summary.md         # Error counts by rule
├── fix_preview.diff         # Proposed fixes
└── config_validation.json   # Config check results
```

## Common ESLint Options

| Option | Purpose |
|--------|---------|
| `--fix` | Auto-fix fixable issues |
| `--fix-dry-run` | Preview fixes |
| `--quiet` | Errors only |
| `--max-warnings N` | Fail if > N warnings |
| `--cache` | Use cache for speed |
| `--format json` | JSON output |
| `--ext .ts,.tsx` | File extensions |

## Configuration Templates

**eslint.config.js (flat config):**
```javascript
import js from '@eslint/js'
import typescript from '@typescript-eslint/eslint-plugin'
import tsParser from '@typescript-eslint/parser'

export default [
  js.configs.recommended,
  {
    files: ['**/*.ts', '**/*.tsx'],
    languageOptions: {
      parser: tsParser,
      parserOptions: {
        project: './tsconfig.json'
      }
    },
    plugins: {
      '@typescript-eslint': typescript
    },
    rules: {
      ...typescript.configs.recommended.rules,
      '@typescript-eslint/no-unused-vars': 'error'
    }
  },
  {
    ignores: ['node_modules/', 'dist/', '*.config.js']
  }
]
```

## References

- ESLint documentation: https://eslint.org/docs/
- TypeScript ESLint: https://typescript-eslint.io/
- REF-001: Production-Grade Agentic Workflows (BP-4)
- REF-002: LLM Failure Modes (Archetype 1 grounding)

Related Skills

quality-checker

104
from jmagly/aiwg

Validate skill quality, completeness, and adherence to standards. Use before packaging to ensure skill meets quality requirements.

Codex

aiwg-orchestrate

104
from jmagly/aiwg

Route structured artifact work to AIWG workflows via MCP with zero parent context cost

venv-manager

104
from jmagly/aiwg

Create, manage, and validate Python virtual environments. Use for project isolation and dependency management.

pytest-runner

104
from jmagly/aiwg

Execute Python tests with pytest, supporting fixtures, markers, coverage, and parallel execution. Use for Python test automation.

vitest-runner

104
from jmagly/aiwg

Execute JavaScript/TypeScript tests with Vitest, supporting coverage, watch mode, and parallel execution. Use for JS/TS test automation.

repo-analyzer

104
from jmagly/aiwg

Analyze GitHub repositories for structure, documentation, dependencies, and contribution patterns. Use for codebase understanding and health assessment.

pr-reviewer

104
from jmagly/aiwg

Review GitHub pull requests for code quality, security, and best practices. Use for automated PR feedback and approval workflows.

YouTube Acquisition

104
from jmagly/aiwg

yt-dlp patterns for acquiring content from YouTube and video platforms

Quality Filtering

104
from jmagly/aiwg

Accept/reject logic and quality scoring heuristics for media content

Provenance Tracking

104
from jmagly/aiwg

W3C PROV-O patterns for tracking media derivation chains and production history

Metadata Tagging

104
from jmagly/aiwg

opustags and ffmpeg patterns for applying metadata to audio and video files

Audio Extraction

104
from jmagly/aiwg

ffmpeg patterns for extracting audio from video files and transcoding between formats