Skip to content

Export programmatic API for spec-ci-plugin #12

@hermanngeorge15

Description

@hermanngeorge15

Problem

The published package only exposes a CLI entry point. dist/index.d.ts exports nothing. Tool #4 (spec-ci-plugin) needs to consume the lint engine programmatically:

import { lint, allRules } from '@unityinflow/spec-linter';

Proposal

Add a separate library entry point (e.g. src/lib.ts) that exports:

  • lint() from engine.ts
  • allRules from rules/index.ts
  • All types from types.ts
  • parseSpecFile() from parser.ts

Update tsup to have two entry points: src/index.ts (CLI) and src/lib.ts (library).

Acceptance Criteria

  • import { lint, allRules } from '@unityinflow/spec-linter' works
  • Types are exported correctly
  • CLI still works unchanged
  • package.json exports field configured

Labels

enhancement, v0.1.0, dependency:spec-ci-plugin

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions