Skip to content

Add lint/lintFile/lintVirtual exports to browser.ts (pre-existing gap) #215

Description

@dean0x

Background

packages/mds/src/browser.ts:95 currently exports compile, compileFile, check, checkFile, CheckOptions, and assertKnownKeys — but no lint-related symbols. lint, lintFile, and lintVirtual were added in v0.4.0 (PR #171) and their types were added to types.ts in PR #196, but neither landed a browser.ts export.

Ledger ID: #76 (typescript-browser.ts:95-no_lint_exports)
File: packages/mds/src/browser.ts:95
Originating reviewer: TypeScript (pre-existing; reviewer explicitly said "Separate PR")

Problem

Browser consumers using @mdscript/mds via the WASM backend cannot access lint, lintFile, or lintVirtual. They must import directly from @mdscript/mds-wasm, bypassing the universal wrapper and its option validation (assertKnownKeys).

Note: lintFile may not be meaningful for browser consumers (no filesystem), but lint and lintVirtual are straightforwardly usable with a WASM backend.

Why deferred from PR #196

Pre-existing gap not introduced by PR #196. Adding new browser exports (including potentially 5 new type re-exports) needs its own design decision about which symbols are browser-appropriate, its own test coverage, and possibly an opt-in init() guard on lintFile.

Acceptance Criteria

  • browser.ts exports lint, lintVirtual, LintOptions, LintDiagnostic, LintResult (or equivalent types)
  • Determine whether lintFile is omitted (no filesystem) or included with a clear note
  • @mdscript/mds bundle size assessed (WASM lint bindings are already included; this is a JS-side addition)
  • At minimum one browser-path test (existing browser-path smoke tests pattern)

Deferred from: PR #196

Metadata

Metadata

Assignees

No one assigned

    Labels

    ecosystemBindings, packages, and integrationsenhancementNew feature or requestjavascriptPull requests that update javascript code

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions