migrate eslint config to new format required since 9.0.0

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2025-12-15 22:55:44 +01:00
parent d82a614b83
commit a198dbc46d
22 changed files with 134 additions and 72 deletions

View File

@@ -85,7 +85,7 @@ export class BuildKit {
if (!bkversion) {
try {
bkversion = await this.getVersionWithinImage(node.name || '');
} catch (e) {
} catch {
core.debug(`BuildKit.versionSatisfies ${node.name}: can't get version`);
return false;
}

View File

@@ -169,7 +169,7 @@ export class Build {
}
try {
return core.getBooleanInput(name) ? `builder-id=${GitHub.workflowRunURL(true)}` : 'false';
} catch (err) {
} catch {
// not a valid boolean, so we assume it's a string
return Build.resolveProvenanceAttrs(input);
}
@@ -302,7 +302,7 @@ export class Build {
// https://github.com/docker/buildx/blob/8abef5908705e49f7ba88ef8c957e1127b597a2a/util/buildflags/attests.go#L13-L21
const v = Util.parseBool(attr);
res.push(`disabled=${!v}`);
} catch (err) {
} catch {
res.push(attr);
}
}

View File

@@ -148,7 +148,7 @@ export class Buildx {
let url: URL;
try {
url = new URL(endpoint);
} catch (e) {
} catch {
return [];
}
if (url.protocol != 'tcp:') {
@@ -280,7 +280,7 @@ export class Buildx {
const fnGitURL = function (inp: string): GitURL | undefined {
try {
return Git.parseURL(inp);
} catch (e) {
} catch {
// noop
}
};

View File

@@ -60,7 +60,7 @@ export class Docker {
silent: true
});
return true;
} catch (e) {
} catch {
return false;
}
}

View File

@@ -69,7 +69,6 @@ export interface ContextInfo {
Name: string;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Metadata: any;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Endpoints: Record<string, EndpointInfo>;
TLSMaterial: Record<string, Array<string>>;
Storage: StorageInfo;

View File

@@ -82,7 +82,7 @@ export class Util {
let url;
try {
url = new URL(urlStr);
} catch (e) {
} catch {
return false;
}
return url.protocol === 'http:' || url.protocol === 'https:';
@@ -115,10 +115,10 @@ export class Util {
};
}
public static isDirectory(p) {
public static isDirectory(p: string) {
try {
return fs.lstatSync(p).isDirectory();
} catch (_) {
} catch {
// noop
}
return false;