Skip to content

[Export Audit] Rule interface exported from src/rules.ts but never imported externally #2505

Description

@github-actions

API Surface Issue

Category

Unused export — internal interface exposed unnecessarily

Summary

  • File: src/rules.ts
  • Symbol: Rule (line 14)
  • Issue: The Rule interface is exported but never imported from outside rules.ts. Callers only ever import RuleSet, loadRuleSet, mergeRuleSets, expandRule, and loadAndMergeDomains — never Rule itself.

Evidence

# Exported from:
src/rules.ts:14: export interface Rule {

# All imports of rules.ts:
src/cli.ts:28:    import { loadAndMergeDomains } from './rules';
src/rules.test.ts:4: import { loadRuleSet, mergeRuleSets, expandRule, loadAndMergeDomains, RuleSet } from './rules';
# Note: 'Rule' is absent from both import lists

Recommended Fix

  1. Remove the export keyword from the Rule interface, making it module-private:
    // before
    export interface Rule {
    // after
    interface Rule {
  2. Alternatively, if Rule is intended for consumers building RuleSet objects manually, keep the export but add a JSDoc comment documenting that intent.

Impact

  • Dead code risk: Low (interface only, no runtime cost)
  • Maintenance burden: Low (but leaks an internal detail into the public API surface)

Detected by Export Audit workflow. Triggered by push to main on 2026-05-04

Generated by API Surface & Export Audit · ● 489.6K ·

  • expires on Jun 3, 2026, 4:43 PM UTC

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    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