# ast-grep project configuration for the simplify-code skill. # Docs: https://ast-grep.github.io/reference/sgconfig.html # # `ast-grep scan -c --json ` 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 # --------------------------------------------------------------------------- # OPT-IN: Svelte / SvelteKit structural rules on .svelte files. # # ast-grep has no built-in Svelte grammar. To run structural rules on .svelte # files you must register tree-sitter-svelte as a custom language AND inject the # JS/TS grammar into ' } # injected: typescript # - hostLanguage: svelte # rule: { pattern: "" } # injected: javascript # --------------------------------------------------------------------------- # # Without the grammar, Svelte is still supported: detection falls back to the # project's own Svelte tooling (svelte-check, eslint-plugin-svelte, svelte # compiler warnings) as enrichment, and semantic refactors go to the model with # the SvelteKit guardrails in references/SVELTE.md.