Skip to content

Commit

Permalink
chore: fix eslint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
secustor committed Feb 4, 2025
1 parent 4af6e59 commit ef23533
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
3 changes: 2 additions & 1 deletion lib/modules/manager/pip-compile/extract.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import upath from 'upath';
import { logger } from '../../../logger';
import { coerceArray } from '../../../util/array';
import { readLocalFile } from '../../../util/fs';
import { ensureLocalPath } from '../../../util/fs/util';
import { extractPackageFile as extractRequirementsFile } from '../pip_requirements/extract';
Expand Down Expand Up @@ -73,7 +74,7 @@ export async function extractAllPackageFiles(
continue;
}
lockFileArgs.set(fileMatch, compileArgs);
for (const constraint in compileArgs.constraintsFiles) {
for (const constraint of coerceArray(compileArgs.constraintsFiles)) {
depsBetweenFiles.push({
sourceFile: constraint,
outputFile: fileMatch,
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/platform/github/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ export async function createFork(
await githubApi.postJson<GhRestRepo>(`repos/${repository}/forks`, {
token,
body: {
organization: forkOrg ? forkOrg : undefined,
organization: forkOrg ?? undefined,
name: config.parentRepo!.replace('/', '-_-'),
default_branch_only: true, // no baseBranches support yet
},
Expand Down
4 changes: 1 addition & 3 deletions lib/modules/versioning/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ export const getVersionings = (): Map<
> => versionings;

export function get(versioning: string | null | undefined): VersioningApi {
const res = Versioning.safeParse(
versioning ? versioning : defaultVersioning.id,
);
const res = Versioning.safeParse(versioning ?? defaultVersioning.id);

if (!res.success) {
const [issue] = res.error.issues;
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/versioning/ubuntu/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function isStable(version: string): boolean {

function getVersionByCodename(version: string): string {
const datedImgVersion = getDatedContainerImageCodename(version);
const getVersion = datedImgVersion ? datedImgVersion : version;
const getVersion = datedImgVersion ?? version;
return di.getVersionByCodename(getVersion);
}

Expand Down

0 comments on commit ef23533

Please sign in to comment.