Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e6beb31

Browse files
committed
Extract into shared
1 parent 67c0dc4 commit e6beb31

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

‎src/leetCodeExecutor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import * as fse from "fs-extra";
66
import * as path from "path";
77
import * as requireFromString from "require-from-string";
88
import * as vscode from "vscode";
9-
import { Endpoint, IProblem } from "./shared";
9+
import { Endpoint, IProblem,supportedPlugins } from "./shared";
1010
import { executeCommand, executeCommandWithProgress } from "./utils/cpUtils";
1111
import { genFileName } from "./utils/problemUtils";
1212
import { DialogOptions, openUrl } from "./utils/uiUtils";
@@ -48,7 +48,7 @@ class LeetCodeExecutor {
4848
}
4949
return false;
5050
}
51-
for (const plugin of ["company","solution.discuss","leetcode.cn"]) {
51+
for (const plugin of supportedPlugins) {
5252
try { // Check plugin
5353
await this.executeCommandEx("node", [await this.getLeetCodeBinaryPath(), "plugin", "-e", plugin]);
5454
} catch (error) { // Download plugin and activate

‎src/shared.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,9 @@ export enum Category {
9191
Company = "Company",
9292
Favorite = "Favorite",
9393
}
94+
95+
export const supportedPlugins: string[] = [
96+
"company",
97+
"solution.discuss",
98+
"leetcode.cn",
99+
];

‎tslint.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
],
66
"jsRules": {},
77
"rules": {
8+
"forin": false,
89
"object-literal-sort-keys": false,
910
"indent": [
1011
true,

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /