mirror of
https://github.com/thelounge/thelounge.git
synced 2024-06-10 09:42:18 +02:00
linting
This commit is contained in:
parent
96aa50c673
commit
3d4d29bca4
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
||||
import log from "../log";
|
||||
import colors from "chalk";
|
||||
import semver from "semver";
|
||||
|
@ -5,6 +6,13 @@ import Helper from "../helper";
|
|||
import Config from "../config";
|
||||
import Utils from "./utils";
|
||||
import {Command} from "commander";
|
||||
import {FullMetadata} from "package-json";
|
||||
|
||||
type CustomMetadata = FullMetadata & {
|
||||
thelounge: {
|
||||
supports: string;
|
||||
};
|
||||
};
|
||||
|
||||
const program = new Command("install");
|
||||
program
|
||||
|
@ -50,7 +58,7 @@ program
|
|||
}
|
||||
|
||||
readFile
|
||||
.then((json) => {
|
||||
.then((json: CustomMetadata) => {
|
||||
const humanVersion = isLocalFile ? packageName : `${json.name} v${json.version}`;
|
||||
|
||||
if (!("thelounge" in json)) {
|
||||
|
|
|
@ -8,9 +8,8 @@ program
|
|||
.usage("list")
|
||||
.description("List all users")
|
||||
.on("--help", Utils.extraHelp)
|
||||
.action(function () {
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const ClientManager = require("../../clientManager");
|
||||
.action(async function () {
|
||||
const ClientManager = (await import("../../clientManager")).default;
|
||||
const users = new ClientManager().getUsers();
|
||||
|
||||
if (users === undefined) {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import Client from "../../client";
|
||||
import log from "../../log";
|
||||
import Chan, {Channel} from "../../models/chan";
|
||||
import Network, {NetworkWithIrcFramework} from "../../models/network";
|
||||
import {PackageInfo} from "../packages";
|
||||
|
@ -59,7 +60,8 @@ const builtInInputs = [
|
|||
];
|
||||
|
||||
for (const input of builtInInputs) {
|
||||
import(`./${input}`).then(
|
||||
import(`./${input}`)
|
||||
.then(
|
||||
(plugin: {
|
||||
default: {
|
||||
commands: string[];
|
||||
|
@ -71,7 +73,10 @@ for (const input of builtInInputs) {
|
|||
userInputs.set(command, plugin.default)
|
||||
);
|
||||
}
|
||||
);
|
||||
)
|
||||
.catch((err) => {
|
||||
log.error(err);
|
||||
});
|
||||
}
|
||||
|
||||
// .reduce(async function (plugins, name) {
|
||||
|
|
2
test/fixtures/.thelounge/sts-policies.json
vendored
2
test/fixtures/.thelounge/sts-policies.json
vendored
|
@ -3,6 +3,6 @@
|
|||
"host": "irc.example.com",
|
||||
"port": 7000,
|
||||
"duration": 3600,
|
||||
"expires": 1654033556780
|
||||
"expires": 1654033745673
|
||||
}
|
||||
]
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-empty-function */
|
||||
"use strict";
|
||||
|
||||
import {expect} from "chai";
|
||||
|
|
Loading…
Reference in a new issue