Skip to content

Commit

Permalink
chore(deps): update linters to v6.20.0 (#26925)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
  • Loading branch information
renovate[bot] and rarkins committed Feb 12, 2024
1 parent 79706e6 commit cbef575
Show file tree
Hide file tree
Showing 11 changed files with 68 additions and 70 deletions.
4 changes: 1 addition & 3 deletions lib/modules/datasource/npm/get.ts
Expand Up @@ -101,9 +101,7 @@ export async function getDependency(
const cacheMinutes = process.env.RENOVATE_CACHE_NPM_MINUTES
? parseInt(process.env.RENOVATE_CACHE_NPM_MINUTES, 10)
: 15;
const softExpireAt = DateTime.local()
.plus({ minutes: cacheMinutes })
.toISO()!;
const softExpireAt = DateTime.local().plus({ minutes: cacheMinutes }).toISO();
let cacheHardTtlMinutes = GlobalConfig.get('cacheHardTtlMinutes');
if (
!(
Expand Down
4 changes: 2 additions & 2 deletions lib/modules/manager/gradle/parser/common.ts
Expand Up @@ -104,7 +104,7 @@ export function stripReservedPrefixFromKeyTokens(ctx: Ctx): Ctx {

export function coalesceVariable(ctx: Ctx): Ctx {
if (ctx.varTokens.length > 1) {
ctx.varTokens[0]!.value = ctx.varTokens
ctx.varTokens[0].value = ctx.varTokens
.map((token) => token.value)
.join('.');
ctx.varTokens.length = 1;
Expand Down Expand Up @@ -231,7 +231,7 @@ export const qVariableAccessIdentifier = q
.handler(coalesceVariable)
.handler((ctx) => {
ctx.varTokens = [
...ctx.tmpTokenStore.backupVarAccessTokens!,
...ctx.tmpTokenStore.backupVarAccessTokens,
...ctx.varTokens,
];
delete ctx.tmpTokenStore.backupVarAccessTokens;
Expand Down
4 changes: 2 additions & 2 deletions lib/modules/manager/maven-wrapper/artifacts.spec.ts
Expand Up @@ -392,7 +392,7 @@ describe('modules/manager/maven-wrapper/artifacts', () => {
},
},
]);
expect(execSnapshots[0]!.options!.env).not.toHaveProperty('MVNW_REPOURL');
expect(execSnapshots[0].options!.env).not.toHaveProperty('MVNW_REPOURL');
expect(git.getRepoStatus).toHaveBeenCalledOnce();
});

Expand Down Expand Up @@ -432,7 +432,7 @@ describe('modules/manager/maven-wrapper/artifacts', () => {
},
]);

expect(execSnapshots[0]!.options!.env).not.toHaveProperty('MVNW_REPOURL');
expect(execSnapshots[0].options!.env).not.toHaveProperty('MVNW_REPOURL');
expect(git.getRepoStatus).toHaveBeenCalledOnce();
});
});
2 changes: 1 addition & 1 deletion lib/modules/manager/npm/update/dependency/index.ts
Expand Up @@ -275,7 +275,7 @@ function overrideDepPosition(
let overrideDep: OverrideDependency = overrideBlock;
for (const parent of parents) {
if (overrideDep) {
overrideDep = overrideDep[parent]! as Record<string, RecursiveOverride>;
overrideDep = overrideDep[parent] as Record<string, RecursiveOverride>;
}
}
const overrideDepName = depName === lastParent ? '.' : depName;
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/manager/pipenv/extract.ts
Expand Up @@ -142,7 +142,7 @@ export async function extractPackageFile(
if (is.nonEmptyString(pipfile.packages?.pipenv)) {
extractedConstraints.pipenv = pipfile.packages.pipenv;
} else if (is.nonEmptyString(pipfile['dev-packages']?.pipenv)) {
extractedConstraints.pipenv = pipfile['dev-packages']!.pipenv;
extractedConstraints.pipenv = pipfile['dev-packages'].pipenv;
}

const lockFileName = `${packageFile}.lock`;
Expand Down
2 changes: 1 addition & 1 deletion lib/util/cache/package/decorator.ts
Expand Up @@ -124,7 +124,7 @@ export function cache<T>({

if (!is.undefined(newData)) {
const newRecord: DecoratorCachedRecord = {
cachedAt: DateTime.local().toISO()!,
cachedAt: DateTime.local().toISO(),
value: newData,
};
await packageCache.set(finalNamespace, finalKey, newRecord, hardTtl);
Expand Down
4 changes: 2 additions & 2 deletions lib/util/http/github.ts
Expand Up @@ -211,7 +211,7 @@ function getGraphqlPageSize(
if (now > expiry) {
const newPageSize = Math.min(oldPageSize * 2, MAX_GRAPHQL_PAGE_SIZE);
if (newPageSize < MAX_GRAPHQL_PAGE_SIZE) {
const timestamp = now.toISO()!;
const timestamp = now.toISO();

logger.debug(
{ fieldName, oldPageSize, newPageSize, timestamp },
Expand Down Expand Up @@ -242,7 +242,7 @@ function setGraphqlPageSize(fieldName: string, newPageSize: number): void {
const oldPageSize = getGraphqlPageSize(fieldName);
if (newPageSize !== oldPageSize) {
const now = DateTime.local();
const pageLastResizedAt = now.toISO()!;
const pageLastResizedAt = now.toISO();
logger.debug(
{ fieldName, oldPageSize, newPageSize, timestamp: pageLastResizedAt },
'GraphQL page size: shrinking',
Expand Down
4 changes: 2 additions & 2 deletions lib/workers/repository/process/write.ts
Expand Up @@ -52,8 +52,8 @@ export async function syncBranchState(
baseBranch: string,
): Promise<BranchCache> {
logger.debug('syncBranchState()');
const branchSha = await scm.getBranchCommit(branchName)!;
const baseBranchSha = await scm.getBranchCommit(baseBranch)!;
const branchSha = await scm.getBranchCommit(branchName);
const baseBranchSha = await scm.getBranchCommit(baseBranch);

const cache = getCache();
cache.branches ??= [];
Expand Down
Expand Up @@ -81,7 +81,7 @@ describe('workers/repository/update/pr/changelog/release-notes', () => {
[now.minus({ weeks: 2 }), 1435],
[now.minus({ years: 1 }), 14495],
])('works with string date (%s, %i)', (date, minutes) => {
expect(releaseNotesCacheMinutes(date.toISO()!)).toEqual(minutes);
expect(releaseNotesCacheMinutes(date.toISO())).toEqual(minutes);
});

it('handles date object', () => {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -308,8 +308,8 @@
"@types/url-join": "4.0.3",
"@types/validate-npm-package-name": "4.0.2",
"@types/xmldoc": "1.1.9",
"@typescript-eslint/eslint-plugin": "6.18.1",
"@typescript-eslint/parser": "6.18.1",
"@typescript-eslint/eslint-plugin": "6.20.0",
"@typescript-eslint/parser": "6.20.0",
"aws-sdk-client-mock": "3.0.1",
"callsite": "1.0.0",
"common-tags": "1.8.2",
Expand Down

0 comments on commit cbef575

Please sign in to comment.