From 8fe484d550fd0ffa1fd69c97ac24f86b22624181 Mon Sep 17 00:00:00 2001 From: Vasily Strelyaev Date: Wed, 28 Aug 2024 18:23:29 +0300 Subject: [PATCH] lint --- packages/devextreme-react/src/core/configuration/comparer.ts | 3 +-- packages/devextreme-react/src/core/configuration/utils.ts | 2 +- .../src/core/custom-configuration-component.ts | 4 ++-- packages/devextreme-react/src/core/nested-option.tsx | 3 ++- packages/devextreme-react/src/core/use-option-scanning.ts | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/devextreme-react/src/core/configuration/comparer.ts b/packages/devextreme-react/src/core/configuration/comparer.ts index d550d6a626ea..f381bac3aee3 100644 --- a/packages/devextreme-react/src/core/configuration/comparer.ts +++ b/packages/devextreme-react/src/core/configuration/comparer.ts @@ -14,7 +14,7 @@ function compareTemplates( current: IConfigNode, currentFullName: string, prev: IConfigNode, - changesAccum: IConfigChanges + changesAccum: IConfigChanges, ) { const currentTemplatesOptions: Record = {}; const currentTemplates: Record = {}; @@ -47,7 +47,6 @@ function compareTemplates( }); } - function compare(current: IConfigNode, prev: IConfigNode, changesAccum: IConfigChanges) { const fullName = buildFullName(current); diff --git a/packages/devextreme-react/src/core/configuration/utils.ts b/packages/devextreme-react/src/core/configuration/utils.ts index 1f8d420015b6..7d497e7b0959 100644 --- a/packages/devextreme-react/src/core/configuration/utils.ts +++ b/packages/devextreme-react/src/core/configuration/utils.ts @@ -25,7 +25,7 @@ export function buildFullName(node: IConfigNode): string { let currentNode: IConfigNode | undefined = node; let fullName = ''; - while(currentNode && currentNode.name) { + while (currentNode && currentNode.name) { fullName = currentNode.name.concat( typeof currentNode.index === 'number' ? `[${currentNode.index}]` : '', fullName ? `.${fullName}` : '', diff --git a/packages/devextreme-react/src/core/custom-configuration-component.ts b/packages/devextreme-react/src/core/custom-configuration-component.ts index c114a07340c4..837e36965ae0 100644 --- a/packages/devextreme-react/src/core/custom-configuration-component.ts +++ b/packages/devextreme-react/src/core/custom-configuration-component.ts @@ -1,9 +1,9 @@ import { NestedComponentMeta } from './types'; -const customConfigurationComponent = (component: C): C => { +const customConfigurationComponent = (component: C): C => { const wrappedComponent = Object.assign(component, { componentType: 'option' }); return wrappedComponent; }; -export default customConfigurationComponent; \ No newline at end of file +export default customConfigurationComponent; diff --git a/packages/devextreme-react/src/core/nested-option.tsx b/packages/devextreme-react/src/core/nested-option.tsx index f7f548188c37..aec6f14563e0 100644 --- a/packages/devextreme-react/src/core/nested-option.tsx +++ b/packages/devextreme-react/src/core/nested-option.tsx @@ -27,8 +27,9 @@ const NestedOption = function NestedOption

(props: P & { elementDescriptor: IE const { children: stateChildren } = props; const { elementDescriptor, ...restProps } = props; - if (!elementDescriptor) + if (!elementDescriptor) { return null; + } const { parentExpectedChildren, diff --git a/packages/devextreme-react/src/core/use-option-scanning.ts b/packages/devextreme-react/src/core/use-option-scanning.ts index b54e229bac3a..5c1c62cd8288 100644 --- a/packages/devextreme-react/src/core/use-option-scanning.ts +++ b/packages/devextreme-react/src/core/use-option-scanning.ts @@ -66,9 +66,9 @@ export function useOptionScanning(optionElement: IOptionElement, children: React const getHasTranscludedContent = () => { if (optionElement.descriptor.isCollection) { return hasTranscludedContent; - } else { - return parentFullName.length > 0 ? hasTranscludedContent : false; } + + return parentFullName.length > 0 ? hasTranscludedContent : false; }; optionElement.descriptor.templates.forEach((templateMeta) => {