Member Junction
    Preparing search index...

    Options accepted by the linter and individual lint rules at runtime.

    This is a strict subset of the fields the linter actually reads — the companion @memberjunction/react-test-harness package extends this interface with browser-execution-specific fields (Playwright timeouts, onPageReady callbacks, etc.) that are irrelevant to static analysis.

    Keeping the linter's surface narrow avoids dragging Playwright-shaped options into server-side action callers that only want static checks.

    interface LinterOptions {
        componentResolver?: (
            name: string,
            namespace?: string,
            registry?: string,
        ) => ComponentSpec | undefined;
        componentSpec?: ComponentSpec;
        contextUser?: UserInfo;
        entityMetadata?: SimpleEntityInfo[];
        utilities?: ComponentUtilities;
    }

    Hierarchy (View Summary)

    Index

    Properties

    componentResolver?: (
        name: string,
        namespace?: string,
        registry?: string,
    ) => ComponentSpec | undefined

    Optional resolver for dependency components referenced by name (+ optional namespace + registry). Lint rules call this when a dep is location: 'registry' and the parent spec didn't denormalize the dep's props/events inline — most commonly to verify props passed to a child component match the child's declared property contract.

    The linter never does I/O itself; it asks this resolver. Callers wire it however suits their side of the wire:

    • server-side: close over ComponentMetadataEngineServer.Instance.FindComponent(...)?.spec
    • client-side: close over a pre-loaded array or a GQL cache

    If absent, rules that rely on registry lookup degrade gracefully (they simply skip the cross-component check).

    componentSpec?: ComponentSpec

    Component spec being analyzed (linter walks code, dataRequirements, etc.).

    contextUser?: UserInfo

    Auth/context — required by rules that resolve entity metadata.

    entityMetadata?: SimpleEntityInfo[]

    Optional array of entity metadata providing complete field lists per entity. Used by the linter to validate field usage with two-tier severity:

    • Medium: Field exists in entity but not declared in dataRequirements
    • Critical: Field does not exist in entity at all

    If not provided, linter only checks against dataRequirements.fieldMetadata which may cause false-positive critical errors for valid but undeclared fields.

    utilities?: ComponentUtilities

    Runtime utility hub forwarded to rules that need live metadata access (e.g. utilities.md.Entities). Optional — rules guard against absence.