Lint more
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: Sam Therapy <sam@samtherapy.net>
This commit is contained in:
Sam Therapy 2022-06-11 14:15:15 +02:00
parent b9e294da14
commit 8fcbc8ee1d
Signed by: sam
GPG key ID: 4D8B07C18F31ACBD
7 changed files with 11 additions and 12 deletions

View file

@ -1,8 +1,8 @@
import { createReadStream, ReadStream } from "fs";
import { readdir } from "fs/promises";
import { exit } from "process";
import args from "./helpers/cli.js";
import crashHandler from "./helpers/error.js";
import args from "./helpers/args.js";
import crashHandler from "./helpers/crashHandler.js";
import { config } from "./helpers/types.js";
import postImage from "./postImage.js";

View file

@ -6,8 +6,8 @@ import got from "got-cjs";
import stream from "node:stream";
import { promisify } from "node:util";
import { exit } from "process";
import args from "./helpers/cli.js";
import crashHandler from "./helpers/error.js";
import args from "./helpers/args.js";
import crashHandler from "./helpers/crashHandler.js";
import { config } from "./helpers/types.js";
import postImage from "./postImage.js";

View file

@ -1,5 +1,5 @@
import { exit } from "process";
import args from "./cli.js";
import args from "./args.js";
/**
* The function that gets called when the program runs into an error.

View file

@ -1,7 +1,7 @@
import { readFile } from "fs/promises";
import stripJsonComments from "strip-json-comments";
import args from "./cli.js";
import crashHandler from "./error.js";
import args from "./args.js";
import crashHandler from "./crashHandler.js";
import { config } from "./types.js";
/**
@ -9,11 +9,10 @@ import { config } from "./types.js";
* @returns The config object
*/
async function readConfig(): Promise<string> {
const conf = await readFile(args.config, "utf8").catch((err) => {
return readFile(args.config, "utf8").catch((err) => {
crashHandler("Error reading config file.", err);
return "CRASH";
});
return conf;
}
/**
* Parses the config file and returns it as a JSON object

View file

@ -1,4 +1,4 @@
import getConfig from "./helpers/config.js";
import getConfig from "./helpers/getConfig.js";
import { config } from "./helpers/types.js";
import getLocalImage from "./getLocalImage.js";
import getRemoteImage from "./getRemoteImage.js";

View file

@ -1,8 +1,8 @@
import { ReadStream } from "fs";
import generator, { Entity, Response } from "megalodon";
import { Readable } from "stream";
import args from "./helpers/cli.js";
import crashHandler from "./helpers/error.js";
import args from "./helpers/args.js";
import crashHandler from "./helpers/crashHandler.js";
import { config } from "./helpers/types.js";
/**