- Build tree-sitter-svelte in one cc command (prebuilt parser.c, no tree-sitter CLI). - sgconfig.svelte.yml: registers .svelte + injects JS/TS into <script> blocks so the existing TS/JS rule packs apply there; rules-svelte/ adds template rules (on:, slot). Proven on fixtures/svelte/Messy.svelte; default sgconfig.yml unaffected. - Record sha256 for all 5 platform ast-grep binaries so first-run fetch is verifiable everywhere (binaries stay gitignored — no repo bloat). - Retire non-working svelte .example stubs; runes migration stays model-driven. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
18 lines
935 B
YAML
18 lines
935 B
YAML
# ast-grep project configuration for the simplify-code skill.
|
|
# Docs: https://ast-grep.github.io/reference/sgconfig.html
|
|
#
|
|
# `ast-grep scan -c <this file> --json <paths>` loads every rule under ruleDirs.
|
|
# Rules are grouped per language; each carries a `severity`, a detection `rule:`,
|
|
# and — for mechanical simplifications — a `fix:` (Track A autofix).
|
|
ruleDirs:
|
|
- rules
|
|
|
|
# This config covers JS/TS, Python, Go, Rust, Java — the always-on languages. It does
|
|
# NOT register Svelte (ast-grep has no built-in Svelte grammar), so .svelte files are
|
|
# skipped cleanly here.
|
|
#
|
|
# For Svelte: scan with the separate `sgconfig.svelte.yml` after a one-command grammar
|
|
# build (see references/SVELTE.md). That config adds rules-svelte/ + injects JS/TS into
|
|
# <script> blocks. Without the grammar, Svelte is still supported via the project's own
|
|
# tooling (svelte-check, eslint-plugin-svelte) + model refactors with SvelteKit guardrails.
|