# Validate Frontend Code Before Commit

Frontend changes can hide lint violations and type errors. This skill runs ESLint and TypeScript checks, then reports actionable results before any fixes.

## Install

```bash
npx skillstore add applelamps/lint-typecheck
```

## Metadata

- Status: approved
- Slug: applelamps-lint-typecheck
- Skillstore revision: r2
- Version status: missing
- Tree hash: b7ebafa2f93a735a24a44a480618bbe580c913c0f1dc7cc14a7274a738bb03a4
- Author: AppleLamps
- GitHub username: AppleLamps
- License: MIT
- Repository: https://github.com/AppleLamps/web-term/tree/main/.claude/skills/lint-typecheck
- Ref: 89edfdc710d0846129dcee6a929477b04f08052c
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands
- Quality score: 77
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/applelamps-lint-typecheck
- Manifest: https://skillstore.pages.dev/api/skills/applelamps-lint-typecheck/manifest

## Capabilities

- Runs the configured npm lint script from the frontend directory.
- Runs the TypeScript build checker without emitting compiled files.
- Lists discovered errors with their source file locations.
- Separates lint warnings, lint errors, and type errors in the summary.
- Identifies reported TypeScript type mismatches.
- Offers automatic ESLint fixes only after user confirmation.

## Use Cases

- Check Changes Before Commit: Find lint and type failures in frontend changes before they enter version control.
- Review Code Quality: Collect file-level validation results before reviewing a frontend pull request.
- Diagnose Failed Validation: Reproduce lint and TypeScript failures locally and summarize the reported causes.

## Prompt Templates

### Run Frontend Lint

```
Run lint on the frontend and report every warning and error with its file location.
```

### Check TypeScript Types

```
Check frontend TypeScript types without emitting files. Group failures by file and explain each reported mismatch.
```

### Run Complete Validation

```
Run both frontend lint and TypeScript checks. Summarize warning, lint error, and type error counts before proposing changes.
```

### Diagnose and Fix Lint

```
Run both checks and diagnose root causes. Ask before applying only automatic ESLint fixes, then rerun validation after approved changes.
```

## Limitations

- Assumes the project has a frontend directory and the required npm tooling.
- Does not install dependencies or create missing lint and TypeScript configuration.
- Does not modify TypeScript configuration to suppress errors.
- Automatic changes are limited to ESLint fixes and require confirmation.

## Best Practices

- Run both checks before committing important frontend changes.
- Review the complete issue list before selecting any remediation.
- Approve automatic lint fixes only after checking their expected scope.

## Anti Patterns

- Do not apply automatic fixes without explicit user confirmation.
- Do not suppress TypeScript errors by changing configuration.
- Do not omit warnings or combine distinct error counts.

## Security Audit

- Audited at: 2026-07-23T05:17:46.32\+00:00
- Summary: All five findings are false positives caused by Markdown code formatting, not shell backtick execution. The fixed project-local checks do not expose a command injection path, and automatic lint fixes require user confirmation. No prompt injection, exfiltration intent, or other semantic security issue was found.

## Stats

- Views: 183
- Downloads: 9
- Favorites: 0
- Popularity score: 0
