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

@@ -49,7 +49,6 @@ describe('exists', () => {
const execSpy = jest.spyOn(Exec, 'getExecOutput');
const builder = new Builder();
await builder.exists('foo');
// eslint-disable-next-line jest/no-standalone-expect
expect(execSpy).toHaveBeenCalledWith(`docker`, ['buildx', 'inspect', 'foo'], {
silent: true,
ignoreReturnCode: true

View File

@@ -91,7 +91,6 @@ describe('isAvailable', () => {
standalone: false
});
await buildx.isAvailable();
// eslint-disable-next-line jest/no-standalone-expect
expect(execSpy).toHaveBeenCalledWith(`docker`, ['buildx'], {
silent: true,
ignoreReturnCode: true
@@ -103,7 +102,6 @@ describe('isAvailable', () => {
standalone: true
});
await buildx.isAvailable();
// eslint-disable-next-line jest/no-standalone-expect
expect(execSpy).toHaveBeenCalledWith(`buildx`, [], {
silent: true,
ignoreReturnCode: true

View File

@@ -94,7 +94,6 @@ describe('download', () => {
});
describe('build', () => {
// eslint-disable-next-line jest/no-disabled-tests
it.skip('builds refs/pull/648/head', async () => {
const install = new Install();
const toolPath = await install.build('https://github.com/docker/buildx.git#refs/pull/648/head');
@@ -103,7 +102,6 @@ describe('build', () => {
expect(fs.existsSync(buildxBin)).toBe(true);
}, 100000);
// eslint-disable-next-line jest/no-disabled-tests
it.skip('builds 67bd6f4dc82a9cd96f34133dab3f6f7af803bb14', async () => {
const install = new Install();
const toolPath = await install.build('https://github.com/docker/buildx.git#67bd6f4dc82a9cd96f34133dab3f6f7af803bb14');

View File

@@ -49,7 +49,6 @@ describe('isAvailable', () => {
standalone: false
});
await compose.isAvailable();
// eslint-disable-next-line jest/no-standalone-expect
expect(execSpy).toHaveBeenCalledWith(`docker`, ['compose'], {
silent: true,
ignoreReturnCode: true
@@ -61,7 +60,6 @@ describe('isAvailable', () => {
standalone: true
});
await compose.isAvailable();
// eslint-disable-next-line jest/no-standalone-expect
expect(execSpy).toHaveBeenCalledWith(`compose`, [], {
silent: true,
ignoreReturnCode: true

View File

@@ -29,7 +29,6 @@ describe('isAvailable', () => {
const execSpy = jest.spyOn(Exec, 'getExecOutput');
const cosign = new Cosign();
await cosign.isAvailable();
// eslint-disable-next-line jest/no-standalone-expect
expect(execSpy).toHaveBeenCalledWith(`cosign`, [], {
silent: true,
ignoreReturnCode: true

View File

@@ -57,7 +57,7 @@ describe('isInsideWorkTree', () => {
const execSpy = jest.spyOn(Exec, 'getExecOutput');
try {
await Git.isInsideWorkTree();
} catch (err) {
} catch {
// noop
}
expect(execSpy).toHaveBeenCalledWith(`git`, ['rev-parse', '--is-inside-work-tree'], {
@@ -81,7 +81,7 @@ describe('remoteURL', () => {
const execSpy = jest.spyOn(Exec, 'getExecOutput');
try {
await Git.remoteURL();
} catch (err) {
} catch {
// noop
}
expect(execSpy).toHaveBeenCalledWith(`git`, ['remote', 'get-url', 'origin'], {
@@ -415,7 +415,7 @@ describe('fullCommit', () => {
const execSpy = jest.spyOn(Exec, 'getExecOutput');
try {
await Git.fullCommit();
} catch (err) {
} catch {
// noop
}
expect(execSpy).toHaveBeenCalledWith(`git`, ['show', '--format=%H', 'HEAD', '--quiet', '--'], {
@@ -430,7 +430,7 @@ describe('shortCommit', () => {
const execSpy = jest.spyOn(Exec, 'getExecOutput');
try {
await Git.shortCommit();
} catch (err) {
} catch {
// noop
}
expect(execSpy).toHaveBeenCalledWith(`git`, ['show', '--format=%h', 'HEAD', '--quiet', '--'], {
@@ -445,7 +445,7 @@ describe('tag', () => {
const execSpy = jest.spyOn(Exec, 'getExecOutput');
try {
await Git.tag();
} catch (err) {
} catch {
// noop
}
expect(execSpy).toHaveBeenCalledWith(`git`, ['tag', '--points-at', 'HEAD', '--sort', '-version:creatordate'], {

View File

@@ -141,6 +141,7 @@ describe('actionsRuntimeToken', () => {
it('malformed', async () => {
process.env.ACTIONS_RUNTIME_TOKEN = 'foo';
expect(() => {
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
GitHub.actionsRuntimeToken;
}).toThrow();
});

View File

@@ -85,7 +85,6 @@ describe('isAvailable', () => {
const execSpy = jest.spyOn(Exec, 'getExecOutput');
const regctl = new Regctl();
await regctl.isAvailable();
// eslint-disable-next-line jest/no-standalone-expect
expect(execSpy).toHaveBeenCalledWith(`regctl`, [], {
silent: true,
ignoreReturnCode: true

View File

@@ -14,8 +14,7 @@
* limitations under the License.
*/
// eslint-disable-next-line @typescript-eslint/no-var-requires
const fs = require('fs');
import fs = require('fs');
module.exports = results => {
const allSkipped = results.testResults.every(result => {

View File

@@ -46,7 +46,6 @@ describe('isAvailable', () => {
const execSpy = jest.spyOn(Exec, 'getExecOutput');
const undock = new Undock();
await undock.isAvailable();
// eslint-disable-next-line jest/no-standalone-expect
expect(execSpy).toHaveBeenCalledWith(`undock`, [], {
silent: true,
ignoreReturnCode: true