ESLint-backed twoslash runner for annotating code examples with ESLint errors and warnings. Current stable version is 0.3.8, released on a monthly cadence. Key differentiators: integrates ESLint diagnostic results directly into twoslash code blocks, supports TypeScript v6 since v0.3.7, and is part of the twoslash monorepo. Experimental — breaking changes may not follow semver. Ships TypeScript types.
npm install twoslash-eslintVerified import paths — ran on the pinned version, not inferred.
Creates an ESLint-backed twoslash runner and applies it to a code example with a custom ESLint rule.
Upgrade TypeScript to >=5.5.0 or stay on v0.2.x if you need older TS support.
Pin to a specific version and test upgrades carefully.
Remove `writeGlobalTypes` from configuration. Use other Vue type handling mechanisms if needed.
Use dynamic import: const m = await import('twoslash-eslint') or set your project to type: module.Run npm install twoslash-eslint (peer dep eslint must also be installed).