lint-formatlisted
Install: claude install-skill virajp/ai-plugins
# Lint & Format Gate
Two independent gates, split by concern — **both must pass before a commit**:
- **Lint** — `@askviraj/linter`, a self-contained ESLint CLI that bundles ESLint
and every plugin (TS, JSON/JSONC, CSS, HTML, Markdown, YAML, TOML, Astro). It
owns **correctness**.
- **Format** — `dprint` (config in `dprint.json`), plus `sort-package-json` for
`package.json` key order. It owns **whitespace and layout**.
Keep them apart: dprint reformats, the linter finds real problems. There are no
formatting rules in the linter and no correctness rules in dprint — don't make
one do the other's job.
## Running it
In a mise repo, run through the task library — the tasks add the wrappers and
target the whole tree:
```sh
mise run code:format # dprint check (verify) + sort-package-json --check
mise run code:format --fix # dprint fmt (apply) + sort-package-json
mise run code:lint # pnpm dlx @askviraj/linter
mise run code:lint --fix # apply the linter's auto-fixes
mise run code:all # aggregate: format → lint → sec
```
Direct invocation (what those tasks wrap):
```sh
# Lint — defaults to the current directory
pnpm dlx @askviraj/linter
pnpm dlx @askviraj/linter --fix # auto-fix what's mechanical
pnpm dlx @askviraj/linter src/ tests/ # limit to targets
pnpm dlx @askviraj/linter --cache # only changed files
# Format
dprint check --config dprint.json # verify (CI / pre-commit)
dprint fmt --config dprint.json