Update typescript-eslint monorepo to v8 (major) (#1843)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -28,7 +28,7 @@ async function downloadToFile(url: string, filename: string): Promise<void> {
|
||||
console.error(e);
|
||||
try {
|
||||
await fs.unlink(filename);
|
||||
} catch (_) {}
|
||||
} catch {}
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
@@ -150,14 +150,14 @@ async function main(): Promise<number | undefined> {
|
||||
await fs.opendir(expectedDeployDir);
|
||||
console.log(expectedDeployDir + "already exists");
|
||||
haveDeploy = true;
|
||||
} catch (e) {}
|
||||
} catch {}
|
||||
|
||||
if (!haveDeploy) {
|
||||
const outPath = path.join(pkgDir, filename);
|
||||
try {
|
||||
await fs.stat(outPath);
|
||||
console.log("Already have " + filename + ": not redownloading");
|
||||
} catch (e) {
|
||||
} catch {
|
||||
try {
|
||||
await downloadToFile(url, outPath);
|
||||
} catch (e) {
|
||||
@@ -170,7 +170,7 @@ async function main(): Promise<number | undefined> {
|
||||
try {
|
||||
await fs.stat(outPath + ".asc");
|
||||
console.log("Already have " + filename + ".asc: not redownloading");
|
||||
} catch (e) {
|
||||
} catch {
|
||||
try {
|
||||
await downloadToFile(url + ".asc", outPath + ".asc");
|
||||
} catch (e) {
|
||||
@@ -206,7 +206,7 @@ async function main(): Promise<number | undefined> {
|
||||
await fs.stat(ASAR_PATH);
|
||||
console.log(ASAR_PATH + " already present: removing");
|
||||
await fs.unlink(ASAR_PATH);
|
||||
} catch (e) {}
|
||||
} catch {}
|
||||
|
||||
if (cfgDir.length) {
|
||||
const configJsonSource = path.join(cfgDir, "config.json");
|
||||
|
||||
@@ -18,7 +18,7 @@ export default async function fetch(hakEnv: HakEnv, moduleInfo: DependencyInfo):
|
||||
try {
|
||||
const stats = await fsProm.stat(moduleInfo.moduleBuildDir);
|
||||
haveModuleBuildDir = stats.isDirectory();
|
||||
} catch (e) {
|
||||
} catch {
|
||||
haveModuleBuildDir = false;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,11 @@ export default async function fetch(hakEnv: HakEnv, moduleInfo: DependencyInfo):
|
||||
shell: hakEnv.isWin(),
|
||||
});
|
||||
proc.on("exit", (code) => {
|
||||
code ? reject(code) : resolve();
|
||||
if (code) {
|
||||
reject(code);
|
||||
} else {
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -31,8 +31,9 @@ async function main(): Promise<void> {
|
||||
const prefix = path.join(__dirname, "..", "..");
|
||||
let packageJson;
|
||||
try {
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||
packageJson = require(path.join(prefix, "package.json"));
|
||||
} catch (e) {
|
||||
} catch {
|
||||
console.error("Can't find a package.json!");
|
||||
process.exit(1);
|
||||
}
|
||||
@@ -69,8 +70,9 @@ async function main(): Promise<void> {
|
||||
const hakJsonPath = path.join(prefix, "hak", dep, "hak.json");
|
||||
let hakJson: Record<string, any>;
|
||||
try {
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||
hakJson = await require(hakJsonPath);
|
||||
} catch (e) {
|
||||
} catch {
|
||||
console.error("No hak.json found for " + dep + ".");
|
||||
console.log("Expecting " + hakJsonPath);
|
||||
process.exit(1);
|
||||
|
||||
@@ -24,7 +24,7 @@ export default async function link(hakEnv: HakEnv, moduleInfo: DependencyInfo):
|
||||
// Also we do this for each module which is unnecessary, but meh.
|
||||
try {
|
||||
await fsProm.stat(yarnrc);
|
||||
} catch (e) {
|
||||
} catch {
|
||||
await fsProm.writeFile(
|
||||
yarnrc,
|
||||
// XXX: 1. This must be absolute, as yarn will resolve link directories
|
||||
@@ -50,7 +50,11 @@ export default async function link(hakEnv: HakEnv, moduleInfo: DependencyInfo):
|
||||
shell: hakEnv.isWin(),
|
||||
});
|
||||
proc.on("exit", (code) => {
|
||||
code ? reject(code) : resolve();
|
||||
if (code) {
|
||||
reject(code);
|
||||
} else {
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -63,7 +67,11 @@ export default async function link(hakEnv: HakEnv, moduleInfo: DependencyInfo):
|
||||
shell: hakEnv.isWin(),
|
||||
});
|
||||
proc.on("exit", (code) => {
|
||||
code ? reject(code) : resolve();
|
||||
if (code) {
|
||||
reject(code);
|
||||
} else {
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import * as childProcess from "child_process";
|
||||
export async function versionFromAsar(): Promise<string> {
|
||||
try {
|
||||
await fs.stat("webapp.asar");
|
||||
} catch (e) {
|
||||
} catch {
|
||||
throw new Error("No 'webapp.asar' found. Run 'yarn run fetch'");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user