Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
VasilyStrelyaev committed Aug 29, 2024
1 parent dfc633d commit 377824f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
3 changes: 1 addition & 2 deletions packages/devextreme-react/src/core/configuration/comparer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function compareTemplates(
current: IConfigNode,
currentFullName: string,
prev: IConfigNode,
changesAccum: IConfigChanges
changesAccum: IConfigChanges,
) {
const currentTemplatesOptions: Record<string, any> = {};
const currentTemplates: Record<string, ITemplate> = {};
Expand Down Expand Up @@ -47,7 +47,6 @@ function compareTemplates(
});
}


function compare(current: IConfigNode, prev: IConfigNode, changesAccum: IConfigChanges) {
const fullName = buildFullName(current);

Expand Down
2 changes: 1 addition & 1 deletion packages/devextreme-react/src/core/configuration/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}` : '',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { NestedComponentMeta } from './types';

const customConfigurationComponent = <C extends {}>(component: C): C => {
const customConfigurationComponent = <C extends object>(component: C): C => {
const wrappedComponent = Object.assign<C, NestedComponentMeta>(component, { componentType: 'option' });

return wrappedComponent;
};

export default customConfigurationComponent;
export default customConfigurationComponent;
3 changes: 2 additions & 1 deletion packages/devextreme-react/src/core/nested-option.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ const NestedOption = function NestedOption<P>(props: P & { elementDescriptor: IE
const { children: stateChildren } = props;
const { elementDescriptor, ...restProps } = props;

if (!elementDescriptor)
if (!elementDescriptor) {
return null;
}

const {
parentExpectedChildren,
Expand Down
4 changes: 2 additions & 2 deletions packages/devextreme-react/src/core/use-option-scanning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 377824f

Please sign in to comment.