Skip to content

fix: framework-aware typecheck and keep linters off vendored skills - #11

Merged
antomanc merged 2 commits into
mainfrom
fix/framework-typecheck-and-vendored-ignores
Oct 11, 2026
Merged

antomanc merged 2 commits into
mainfrom
fix/framework-typecheck-and-vendored-ignores

Conversation

@antomanc

Copy link
Copy Markdown
Owner

Fixes two problems found running aginit init on an existing Astro project (AstroPaper), plus the similar cases they led to.

Typecheck

typecheck defaulted to tsc --noEmit, which can't resolve Astro virtual modules (astro:content, import.meta.env), so AGENTS.md told agents to run a check that could never pass. When no typecheck script exists, the web preset now picks the framework's checker and adds its package if missing:

Dependency typecheck
astro astro check (+ @astrojs/check)
nuxt nuxi typecheck (+ vue-tsc)
@sveltejs/kit svelte-kit sync && svelte-check --tsconfig ./tsconfig.json
svelte svelte-check
vue vue-tsc --noEmit / vue-tsc -b --noEmit
solution-style tsconfig (references) tsc -b --noEmit

The last row fixes a silent bug: in Vite's template the root tsconfig.json has "files": [], so tsc --noEmit checked nothing, and a fresh --framework vite project passed typecheck with a type error in src/ (verified against a real create-vite scaffold).

Vendored skills vs. project linters

Skills in .agents/skills/ (linked into .claude/skills/) ship JS and Markdown. On AstroPaper, eslint . went from passing to 149 errors. A fresh create-next-app showed 94 warnings, and so did create-vite's oxlint. init and update now exclude .agents/ and .claude/ from each tool the project uses:

  • Prettier: .prettierignore
  • legacy ESLint and oxlint: .eslintignore
  • flat ESLint: globalIgnores([...]) or an ignores-only { ignores: [...] } object. Other configs aren't edited, and aginit warns with the exact line to add.
  • Biome 2.2+: "!!**/.agents" / "!!**/.claude" in files.includes. A commented biome.jsonc gets advice instead of an edit.

Each tool is one entry in src/adapters/tool-ignores.ts. No ignore convention is shared across tools, so per-tool knowledge can't be avoided, but adding a tool is one entry. aginit doctor reports any tool that still sees vendored skills.

Checked end to end: real Next (ESLint), Vite (oxlint), Biome 2.5 and the pre-fix AstroPaper eslint.config.js all come back clean afterwards, and the patched biome.json passes biome format.

Release

Bumps to 0.4.1 with a CHANGELOG entry. pnpm check and pnpm smoke pass.

- web preset: default typecheck to astro check, nuxi typecheck, svelte-check
  or vue-tsc when the framework is a dependency (adding the checker package),
  and to build mode for solution-style tsconfigs, where tsc --noEmit checks
  nothing (fresh Vite projects passed with type errors)
- init/update: add .agents/ and .claude/ to .prettierignore and .eslintignore
  (legacy ESLint, oxlint) and to flat-config global ignores when the config has
  an unambiguous ignores array; otherwise warn with the exact fix
- doctor: report linters/formatters that still see vendored skills
…d Biome

Each linter/formatter is one entry (where its ignores live, how to patch
them, what to advise), so supporting another tool is one entry. Biome 2.2+
gets the folders force-ignored through files.includes.

chore(release): 0.4.1
@antomanc
antomanc merged commit 1b34338 into main Oct 11, 2026
6 checks passed
@antomanc
antomanc deleted the fix/framework-typecheck-and-vendored-ignores branch October 11, 2026 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant