Skip to content

Commit 7ae3ebc

Browse files
mizdraclaude
andauthored
docs: add TS plugin internals documentation (#358)
* docs: add TS plugin internals documentation Document the internal architecture of the TypeScript Language Service Plugin, covering Volar.js virtual code generation, position mappings, the single-quote span problem and its solution, linkedCodeMappings, and the language service proxy. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(docs): preserve single quotes in ts-plugin-internals code blocks Add docs/ts-plugin-internals.md to fmt.ignorePatterns in vite.config.ts to prevent oxfmt from stripping single quotes in code blocks. Restore the single-quoted property names that are essential to the document's technical explanation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * format * docs: add note that document was generated by Claude Code Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: reference ts-plugin-internals.md from CLAUDE.md Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: replace CLAUDE.md symlink with @AGENTS.md reference Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs(ts-plugin): fix internals documentation * docs: improve docs --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent cc5f4c8 commit 7ae3ebc

File tree

4 files changed

+549
-2
lines changed

4 files changed

+549
-2
lines changed

AGENTS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ function myFunction() {
9595
- **Mapping**: An object that maintains the positional relationship between a `.d.ts` file and its corresponding .css file
9696
- Mapping enables language features such as Go to Definition, Find All References, Rename
9797

98+
## Additional Documentation
99+
100+
- [`docs/ts-plugin-internals.md`](./docs/ts-plugin-internals.md): Deep dive into the TS plugin internals
101+
- Read this when working on `packages/ts-plugin` or `packages/core/src/dts-generator.ts` — especially when modifying Volar.js mappings, virtual code generation, or language service features (Go to Definition, Find References, Rename, etc.)
102+
98103
## Key Files
99104

100105
- `packages/core/src/type.ts`: Main type definitions used by CSS Modules Kit

CLAUDE.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@AGENTS.md

0 commit comments

Comments
 (0)