From c6b546b4b01250bea1c68470e4349c8e406a7c05 Mon Sep 17 00:00:00 2001 From: Daniil Dubrava Date: Mon, 7 Feb 2022 00:02:56 +0300 Subject: [PATCH] fix(eslint-plugin): replace schema spreading with the first element from schema --- packages/eslint-plugin/src/rules/no-magic-numbers.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/eslint-plugin/src/rules/no-magic-numbers.ts b/packages/eslint-plugin/src/rules/no-magic-numbers.ts index 2bab38f752d0..7310123b85c1 100644 --- a/packages/eslint-plugin/src/rules/no-magic-numbers.ts +++ b/packages/eslint-plugin/src/rules/no-magic-numbers.ts @@ -9,7 +9,10 @@ type MessageIds = util.InferMessageIdsTypeFromRule; // Extend base schema with additional property to ignore TS numeric literal types const schema = util.deepMerge( - { ...baseRule.meta.schema }, + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument -- https://github.com/microsoft/TypeScript/issues/17002 + Array.isArray(baseRule.meta.schema) + ? baseRule.meta.schema[0] + : baseRule.meta.schema, { properties: { ignoreNumericLiteralTypes: { pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy