Skip to content

Commit ede7ea2

Browse files
author
Kapil Borle
committed
Remove redundant code from SelectPSSARules
1 parent 2fc6d1f commit ede7ea2

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

src/features/SelectPSSARules.ts

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ class RuleInfo {
2020
isEnabled: boolean;
2121
}
2222

23-
class SetPSSARulesRequestParams {
24-
filepath: string;
25-
ruleInfos: RuleInfo[];
26-
}
27-
2823
export class SelectPSSARulesFeature implements IFeature {
2924

3025
private command: vscode.Disposable;
@@ -51,14 +46,16 @@ export class SelectPSSARulesFeature implements IFeature {
5146
if (updatedOptions === undefined) {
5247
return;
5348
}
54-
let filepath: string = vscode.window.activeTextEditor.document.uri.fsPath;
55-
let ruleInfos: RuleInfo[] = updatedOptions.map(
56-
function (option: CheckboxQuickPickItem): RuleInfo {
57-
return { name: option.label, isEnabled: option.isSelected };
49+
this.languageClient.sendRequest(
50+
SetPSSARulesRequest.type,
51+
{
52+
filepath: vscode.window.activeTextEditor.document.uri.fsPath,
53+
ruleInfos: updatedOptions.map(
54+
function (option: CheckboxQuickPickItem): RuleInfo {
55+
return { name: option.label, isEnabled: option.isSelected };
56+
})
5857
});
59-
let requestParams: SetPSSARulesRequestParams = {filepath, ruleInfos};
60-
this.languageClient.sendRequest(SetPSSARulesRequest.type, requestParams);
61-
});
58+
});
6259
});
6360
});
6461
}

0 commit comments

Comments
 (0)