From 704f53bf4e39f1d08ed254af9c5525feb28eacf4 Mon Sep 17 00:00:00 2001 From: Valerii Sidorenko Date: Tue, 26 Nov 2024 13:25:27 +0100 Subject: [PATCH] chore(eslint): disable complexity rule (#1960) --- .eslintrc | 3 ++- src/components/Button/Button.tsx | 1 - src/components/controls/TextArea/TextArea.tsx | 1 - src/components/controls/TextInput/TextInput.tsx | 1 - 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.eslintrc b/.eslintrc index f11af1b6e1..b38843c8a8 100644 --- a/.eslintrc +++ b/.eslintrc @@ -31,7 +31,8 @@ "import/no-extraneous-dependencies": "off", "import/consistent-type-specifier-style": ["error", "prefer-top-level"], "@typescript-eslint/prefer-ts-expect-error": "error", - "@typescript-eslint/consistent-type-imports": ["error", {"prefer": "type-imports", "fixStyle": "separate-type-imports"}] + "@typescript-eslint/consistent-type-imports": ["error", {"prefer": "type-imports", "fixStyle": "separate-type-imports"}], + "complexity": "off" }, "overrides": [ { diff --git a/src/components/Button/Button.tsx b/src/components/Button/Button.tsx index 6ffa7adef4..173ffa2282 100644 --- a/src/components/Button/Button.tsx +++ b/src/components/Button/Button.tsx @@ -178,7 +178,6 @@ const isButtonIconComponent = isOfType(ButtonIcon); const isSpan = isOfType<{className?: string}>('span'); const buttonIconClassRe = RegExp(`^${b('icon')}($|\\s+\\w)`); -// eslint-disable-next-line complexity function prepareChildren(children: React.ReactNode) { const items = React.Children.toArray(children); diff --git a/src/components/controls/TextArea/TextArea.tsx b/src/components/controls/TextArea/TextArea.tsx index 53e3250087..127e6b112e 100644 --- a/src/components/controls/TextArea/TextArea.tsx +++ b/src/components/controls/TextArea/TextArea.tsx @@ -37,7 +37,6 @@ export type TextAreaPin = InputControlPin; export type TextAreaSize = InputControlSize; export type TextAreaView = InputControlView; -// eslint-disable-next-line complexity export const TextArea = React.forwardRef( function TextArea(props, ref) { const { diff --git a/src/components/controls/TextInput/TextInput.tsx b/src/components/controls/TextInput/TextInput.tsx index 2c7f51a782..1d48b73872 100644 --- a/src/components/controls/TextInput/TextInput.tsx +++ b/src/components/controls/TextInput/TextInput.tsx @@ -62,7 +62,6 @@ export type TextInputSize = InputControlSize; export type TextInputView = InputControlView; export const TextInput = React.forwardRef( - // eslint-disable-next-line complexity function TextInput(props, ref) { const { view = 'normal',