refactor: Upgrade to ESLint 8 (#3722)

* ⬆️ Upgrade to ESLint 8

* 📦 Update package-lock.json

* 👕 Add lint exceptions

* 👕 Add more lint exceptions

*  Remove `tslint` from some packages

* 👕 Except init file

* 📦 Update `package-lock.json`

* 📦 Update `package-lock.json`

* 👕 Add exceptions to new lines coming from `master `

Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
Iván Ovejero
2022-07-24 17:25:01 +02:00
committed by GitHub
parent 8be36c261b
commit f9f05621a1
48 changed files with 1809 additions and 2230 deletions

View File

@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-unsafe-argument */
/* eslint-disable no-lonely-if */
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable no-prototype-builtins */
@@ -955,8 +956,10 @@ export async function requestOAuth2(
newRequestOptions?.headers?.Authorization.split(' ')[1];
}
// @ts-ignore
if (oAuth2Options?.keyToIncludeInAccessTokenHeader) {
Object.assign(newRequestOptions.headers, {
// @ts-ignore
[oAuth2Options.keyToIncludeInAccessTokenHeader]: token.accessToken,
});
}
@@ -1011,8 +1014,10 @@ export async function requestOAuth2(
);
const refreshedRequestOption = newToken.sign(requestOptions as clientOAuth2.RequestObject);
// @ts-ignore
if (oAuth2Options?.keyToIncludeInAccessTokenHeader) {
Object.assign(newRequestOptions.headers, {
// @ts-ignore
[oAuth2Options.keyToIncludeInAccessTokenHeader]: token.accessToken,
});
}
@@ -1088,8 +1093,10 @@ export async function requestOAuth2(
// Make the request again with the new token
const newRequestOptions = newToken.sign(requestOptions as clientOAuth2.RequestObject);
// @ts-ignore
if (oAuth2Options?.keyToIncludeInAccessTokenHeader) {
Object.assign(newRequestOptions.headers, {
// @ts-ignore
[oAuth2Options.keyToIncludeInAccessTokenHeader]: token.accessToken,
});
}