Skip to content

Commit d6b9f7d

Browse files
committed
chore: add back IRuleDefinition on internals
1 parent af64d48 commit d6b9f7d

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { Flow } from "../models/Flow";
2+
import { RuleResult } from "../models/RuleResult";
3+
4+
export interface IRuleDefinition {
5+
autoFixable: boolean;
6+
description: string;
7+
docRefs: Array<{ label: string; path: string }>;
8+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
9+
execute(flow: Flow, ruleOptions?: {}): RuleResult;
10+
isConfigurable: boolean;
11+
label: string;
12+
name: string;
13+
severity?: string;
14+
supportedTypes: string[];
15+
16+
uri?: string;
17+
}

src/main/libs/DynamicRule.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import { IRuleDefinition } from "../interfaces/IRuleDefinition";
21
import { AdvancedRule } from "../models/AdvancedRule";
32
import { BetaRuleStore, DefaultRuleStore } from "../store/DefaultRuleStore";
43

5-
export class DynamicRule<T extends AdvancedRule | IRuleDefinition> {
4+
export class DynamicRule<T extends AdvancedRule> {
65
constructor(className: string) {
76
if (!DefaultRuleStore.hasOwnProperty(className) && BetaRuleStore.hasOwnProperty(className)) {
87
return new BetaRuleStore[className]() as T;

0 commit comments

Comments
 (0)