chore: re-enable node/no-deprecated-api linting (#38899)

* chore: re-enable node/no-deprecated-api linting

* chore: re-enable no-global-assign linting
This commit is contained in:
Milan Burda 2023-06-26 19:51:59 +02:00 committed by GitHub
parent acba6d79fb
commit 81a454d148
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 5 deletions

View file

@ -209,6 +209,7 @@ type ExtraURLLoaderOptions = {
allowNonHttpProtocols: boolean;
}
function parseOptions (optionsIn: ClientRequestConstructorOptions | string): NodeJS.CreateURLLoaderOptions & ExtraURLLoaderOptions {
// eslint-disable-next-line node/no-deprecated-api
const options: any = typeof optionsIn === 'string' ? url.parse(optionsIn) : { ...optionsIn };
let urlStr: string = options.url;
@ -241,6 +242,7 @@ function parseOptions (optionsIn: ClientRequestConstructorOptions | string): Nod
// an invalid request.
throw new TypeError('Request path contains unescaped characters');
}
// eslint-disable-next-line node/no-deprecated-api
const pathObj = url.parse(options.path || '/');
urlObj.pathname = pathObj.pathname;
urlObj.search = pathObj.search;