Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
/**
* Loads all commands for our parser.
*/
export function load(client: any): any {

Check warning on line 5 in src/commands/index.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unexpected any. Specify a different type

Check warning on line 5 in src/commands/index.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unexpected any. Specify a different type
function loadCommand(name: string) {

Check warning on line 6 in src/commands/index.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Missing return type on function
const t0 = process.hrtime.bigint();
const { command: cmd } = require(`./${name}`);

Check warning on line 8 in src/commands/index.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Require statement not part of import statement

Check warning on line 8 in src/commands/index.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe assignment of an `any` value
cmd.register(client);

Check warning on line 9 in src/commands/index.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe call of an `any` typed value

Check warning on line 9 in src/commands/index.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe member access .register on an `any` value
const t1 = process.hrtime.bigint();
const diffMS = (t1 - t0) / BigInt(1e6);
if (diffMS > 75) {
Expand All @@ -14,7 +14,7 @@
// console.error(`Loading ${name} took ${diffMS}ms`);
}

return cmd.runner();

Check warning on line 17 in src/commands/index.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe call of an `any` typed value

Check warning on line 17 in src/commands/index.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe member access .runner on an `any` value

Check warning on line 17 in src/commands/index.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe return of an `any` typed value
}

const t0 = process.hrtime.bigint();
Expand All @@ -25,11 +25,11 @@
client.appdistribution.testers.list = loadCommand("appdistribution-testers-list");
client.appdistribution.testers.add = loadCommand("appdistribution-testers-add");
client.appdistribution.testers.delete = loadCommand("appdistribution-testers-remove");
client.appdistribution.group = {};
client.appdistribution.group.list = loadCommand("appdistribution-groups-list");
client.appdistribution.group.create = loadCommand("appdistribution-groups-create");
client.appdistribution.group.delete = loadCommand("appdistribution-groups-delete");
client.appdistribution.groups = client.appdistribution.group;
client.appdistribution.groups = {};
client.appdistribution.groups.list = loadCommand("appdistribution-groups-list");
client.appdistribution.groups.create = loadCommand("appdistribution-groups-create");
client.appdistribution.groups.delete = loadCommand("appdistribution-groups-delete");
client.appdistribution.group = client.appdistribution.groups;
client.apps = {};
client.apps.create = loadCommand("apps-create");
client.apps.list = loadCommand("apps-list");
Expand Down
Loading