upgrade eslint and fix breaking changes

This commit is contained in:
Namrata Jha
2022-02-15 13:52:11 +00:00
committed by GitHub
parent d6bf5f6a97
commit 5263253279
7 changed files with 9028 additions and 11020 deletions
+1
View File
@@ -1,3 +1,4 @@
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import {from, Observable, merge, throwError, of} from 'rxjs'
import {catchError, map, tap} from 'rxjs/operators'
import {graphql} from './graphql'
+5 -3
View File
@@ -1,4 +1,6 @@
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import {GraphQlQueryResponse} from '@octokit/graphql/dist-types/types'
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import {Observable, from, throwError} from 'rxjs'
import {catchError, map} from 'rxjs/operators'
import {graphql} from './graphql'
@@ -107,7 +109,7 @@ export function queryForOldestVersions(
}
}) as Promise<GetVersionsQueryResponse>
).pipe(
catchError((err: GraphQlQueryResponse) => {
catchError((err: GraphQlQueryResponse<unknown>) => {
const msg = 'query for oldest version failed.'
return throwError(
err.errors && err.errors.length > 0
@@ -129,7 +131,7 @@ export function queryForOldestVersions(
}
}) as Promise<GetVersionsQueryResponse>
).pipe(
catchError((err: GraphQlQueryResponse) => {
catchError((err: GraphQlQueryResponse<unknown>) => {
const msg = 'query for oldest version failed.'
return throwError(
err.errors && err.errors.length > 0
@@ -164,7 +166,7 @@ export function getOldestVersions(
`package: ${packageName} not found for owner: ${owner} in repo: ${repo}`
)
r = {
versions: <VersionInfo[]>[],
versions: [] as VersionInfo[],
cursor: '',
paginate: false,
totalCount: 0
+1
View File
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import {GitHub} from '@actions/github'
import {GraphQlQueryResponseData} from '@octokit/graphql/dist-types/types'
import {RequestParameters} from '@octokit/types/dist-types/RequestParameters'