upgrade eslint and fix breaking changes
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -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,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'
|
||||
|
||||
Reference in New Issue
Block a user