Skip to content

Commit 4c04281

Browse files
committed
chore: refactor rules defined in action a
1 parent b7f262f commit 4c04281

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

src/main/rules/APIVersion.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
import * as core from "../internals/internals";
22
import { AdvancedRule } from "../models/AdvancedRule";
33

4-
export class APIVersion extends AdvancedRule implements core.IRuleDefinition {
4+
export class APIVersion extends AdvancedRule {
55
constructor() {
66
super({
7-
name: "APIVersion",
8-
label: "Outdated API Version",
7+
autoFixable: false,
98
description:
109
"Introducing newer API components may lead to unexpected issues with older versions of Flows, as they might not align with the underlying mechanics. Starting from API version 50.0, the 'Api Version' attribute has been readily available on the Flow Object. To ensure smooth operation and reduce discrepancies between API versions, it is strongly advised to regularly update and maintain them.",
11-
supportedTypes: core.FlowType.allTypes(),
1210
docRefs: [],
1311
isConfigurable: true,
14-
autoFixable: false,
12+
label: "Outdated API Version",
13+
name: "APIVersion",
14+
supportedTypes: core.FlowType.allTypes(),
1515
});
1616
}
1717

1818
public execute(flow: core.Flow, options?: { expression: string }): core.RuleResult {
19-
let flowAPIVersionNumber: number | null = null;
19+
let flowAPIVersionNumber: null | number = null;
2020
if (flow.xmldata.apiVersion) {
2121
const flowAPIVersion = flow.xmldata.apiVersion;
2222
flowAPIVersionNumber = +flowAPIVersion;

src/main/rules/ActionCallsInLoop.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { FlowType, IRuleDefinition } from "../internals/internals";
1+
import { FlowType } from "../internals/internals";
22
import { LoopRuleCommon } from "../models/LoopRuleCommon";
33

4-
export class ActionCallsInLoop extends LoopRuleCommon implements IRuleDefinition {
4+
export class ActionCallsInLoop extends LoopRuleCommon {
55
constructor() {
66
super(
77
{

src/main/rules/AutoLayout.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ import { AdvancedRule } from "../models/AdvancedRule";
44
export class AutoLayout extends AdvancedRule implements core.IRuleDefinition {
55
constructor() {
66
super({
7-
name: "AutoLayout",
8-
label: "Auto-Layout Mode",
7+
autoFixable: false,
98
description:
109
"With Canvas Mode set to Auto-Layout, Elements are spaced, connected, and aligned automatically, keeping your Flow neatly organized thus saving you time.",
11-
supportedTypes: core.FlowType.allTypes(),
1210
docRefs: [],
1311
isConfigurable: true,
14-
autoFixable: false,
12+
label: "Auto-Layout Mode",
13+
name: "AutoLayout",
14+
supportedTypes: core.FlowType.allTypes(),
1515
});
1616
}
1717

0 commit comments

Comments
 (0)