TryGhost
OSS
Ghost
Migrated koenig-lexical to TypeScript ref https://github.com/TryGhost/Koenig/pull/1807 Recreates the Koenig TS migration PR here now that the Koenig repo has been merged into this monorepo (paths rewritten packages/* -> koenig/*, replayed from TryGhost/Koenig commit e5fba1c0c7). - added type annotations throughout src, demo, and test files: component props, hooks, utility functions, Lexical node types - created proper interfaces for untyped dependencies (Emoji for emoji-mart, SimpleMDEInstance/CodeMirrorInstance for kg-simplemde) - added test/types.d.ts with Window augmentation for the Lexical editor in the e2e browser context - added tsconfig.types.json + build:types so the package publishes type declarations (types/exports.types now point at dist/types) - added a typecheck script (src + test tsconfigs) and wired it into the test script so CI catches regressions - enabled @typescript-eslint/no-explicit-any and typed no-unused-vars; removed all eslint-disable comments except intentional react-hooks/exhaustive-deps ones for mount-only effects - annotated story exports with StoryFn<...> (pnpm's non-hoisted layout surfaces TS2742 on inferred Template.bind({}) types, which yarn hoisting previously masked) - added @types/lodash and @types/jsdom devDependencies (previously hoisted from sibling packages under yarn) - improved generateDecoratorNode render-fn typing in kg-default-nodes (bivariance hack instead of any) and exported SerializedGeneratedDecoratorNode
nx run ghost-monorepo:lint:boundaries
Sign in / Sign up
Open main menu
Succeeded
CI Pipeline Execution
nx run ghost-monorepo:lint:boundaries
Click to copy
Linux
4 CPU cores
read-write
access token used
57a6b612
29218