# types/rule.types.ts

> 45 lines of code and 7 definitions.

Tree: GovLab Stats
Language: typescript
Layer: infrastructure
Canonical: https://banes-lab.com/anatomy/stats#file-stats-types-rule-types-ts
Source text: https://banes-lab.com/source/stats/types/rule.types.ts.txt

Listed in [types](https://banes-lab.com/api/source/stats/types.md), after [types/report.types.ts](https://banes-lab.com/source/stats/types/report.types.ts.md) and before [types/site.types.ts](https://banes-lab.com/source/stats/types/site.types.ts.md).

## Definitions

- `RuleCount` (interface_declaration, line 1, exported)
- `OxlintSummary` (interface_declaration, line 6, exported)
- `ToolEntry` (interface_declaration, line 12, exported)
- `ToolMetrics` (interface_declaration, line 17, exported)
- `ActiveRuleStats` (interface_declaration, line 23, exported)
- `RegistryCounts` (interface_declaration, line 39, exported)
- `ToolCounts` (interface_declaration, line 47, exported)

## Contained in

- [types](https://banes-lab.com/anatomy/stats/folder-stats-types.md)

## Source

```typescript
export interface RuleCount {
    active: number;
    disabled: number;
}

export interface OxlintSummary {
    categories: string[];
    disabled: number;
    tuned: number;
}

export interface ToolEntry {
    ecosystem: string;
    tool: string;
}

export interface ToolMetrics {
    active: number | null;
    configuration: string;
    disabled: number | null;
}

export interface ActiveRuleStats {
    activeEcosystems: string[];
    advisory: number;
    available: boolean;
    byTool: Map<string, ToolMetrics>;
    eslint: RuleCount;
    local: RuleCount;
    excluded: number;
    fullGate: ToolEntry[];
    oxlint: OxlintSummary;
    plugins: number;
    reason: string;
    selectable: number;
    stylelint: RuleCount;
}

export interface RegistryCounts {
    advisory: number;
    excluded: number;
    fullGate: ToolEntry[];
    plugins: number;
    selectable: number;
}

export interface ToolCounts {
    readonly eslint: RuleCount;
    readonly oxlint: OxlintSummary;
    readonly stylelint: RuleCount;
}
```
