enforce prototype builtin lint rule

This commit is contained in:
callumalpass 2026-06-22 12:15:54 +10:00
parent 846d328d9f
commit e948a7ebd9
2 changed files with 2 additions and 2 deletions

View file

@ -321,7 +321,7 @@ export default [
"warn",
{ args: "none", varsIgnorePattern: "^_" },
],
"no-prototype-builtins": "off",
"no-prototype-builtins": "error",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/ban-ts-comment": [
"warn",

View file

@ -272,6 +272,6 @@ function isInstanceOf<T extends Element>(
): element is T {
return (
element.instanceOf?.(constructor) === true ||
constructor.prototype.isPrototypeOf(element)
Object.prototype.isPrototypeOf.call(constructor.prototype, element)
);
}