make std deno-lint clean (#6240)

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This commit is contained in:
Ryan Dahl 2020-06-12 09:19:29 -04:00 committed by GitHub
parent ca1c2ee822
commit d0970daacd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 70 additions and 30 deletions

View file

@ -659,7 +659,9 @@ function readPackage(requestPath: string): PackageInfo | null {
json = new TextDecoder().decode(
Deno.readFileSync(path.toNamespacedPath(jsonPath))
);
} catch {}
} catch {
// pass
}
if (json === undefined) {
packageJsonCache.set(jsonPath, null);
@ -839,7 +841,7 @@ function applyExports(basePath: string, expansion: string): string {
}
if (typeof pkgExports === "object") {
if (pkgExports.hasOwnProperty(mappingKey)) {
if (Object.prototype.hasOwnProperty.call(pkgExports, mappingKey)) {
const mapping = pkgExports[mappingKey];
return resolveExportsTarget(
pathToFileURL(basePath + "/"),
@ -910,7 +912,6 @@ function resolveExports(
return path.resolve(nmPath, request);
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function resolveExportsTarget(
pkgPath: URL,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@ -959,7 +960,7 @@ function resolveExportsTarget(
}
} else if (typeof target === "object" && target !== null) {
// removed experimentalConditionalExports
if (target.hasOwnProperty("default")) {
if (Object.prototype.hasOwnProperty.call(target, "default")) {
try {
return resolveExportsTarget(
pkgPath,
@ -1012,7 +1013,7 @@ const CircularRequirePrototypeWarningProxy = new Proxy(
},
getOwnPropertyDescriptor(target, prop): PropertyDescriptor | undefined {
if (target.hasOwnProperty(prop)) {
if (Object.prototype.hasOwnProperty.call(target, prop)) {
return Object.getOwnPropertyDescriptor(target, prop);
}
emitCircularRequireWarning(prop);
@ -1114,7 +1115,6 @@ interface RequireResolveFunction extends RequireResolve {
}
interface RequireFunction extends Require {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
resolve: RequireResolveFunction;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
extensions: { [key: string]: (module: Module, filename: string) => any };