diff --git a/src/blob-store/index.js b/src/blob-store/index.js index 6cd283e0b..5e5220212 100644 --- a/src/blob-store/index.js +++ b/src/blob-store/index.js @@ -252,8 +252,7 @@ function proxyProps(target, props) { // @ts-ignore - too much time to learn how to teach this to Typescript return new Proxy(target, { get(target, prop, receiver) { - // eslint-disable-next-line no-prototype-builtins - if (props.hasOwnProperty(prop)) { + if (Object.hasOwn(props, prop)) { return Reflect.get(props, prop, receiver) } else { return Reflect.get(target, prop, receiver) diff --git a/src/config-import.js b/src/config-import.js index 090b21aae..178f0fb39 100644 --- a/src/config-import.js +++ b/src/config-import.js @@ -140,7 +140,7 @@ export async function readConfig(configPath) { schemaName: 'field', } for (const key of Object.keys(valueSchemas.field.properties)) { - if (hasOwn(field, key)) { + if (Object.hasOwn(field, key)) { fieldValue[key] = field[key] } } @@ -188,7 +188,7 @@ export async function readConfig(configPath) { terms: [], } for (const key of Object.keys(valueSchemas.preset.properties)) { - if (hasOwn(preset, key)) { + if (Object.hasOwn(preset, key)) { presetValue[key] = preset[key] } } @@ -553,14 +553,6 @@ function isRecord(value) { return value !== null && typeof value === 'object' && !Array.isArray(value) } -/** - * @param {Record} obj - * @param {string | symbol} prop - */ -function hasOwn(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop) -} - /** * @param {Object} obj * @param {string | undefined} [obj.fileVersion] diff --git a/tsconfig.json b/tsconfig.json index fc38d3b1e..8d5195977 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "target": "es2019", - "lib": ["es2020"], + "lib": ["es2022"], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true,