diff --git a/packages/map2tree/src/index.ts b/packages/map2tree/src/index.ts index 322379e5..53338110 100644 --- a/packages/map2tree/src/index.ts +++ b/packages/map2tree/src/index.ts @@ -45,9 +45,9 @@ export function map2tree( root: unknown, options: { key?: string; pushMethod?: 'push' | 'unshift' } = {}, tree: Node = { name: options.key || 'state', children: [] }, - // eslint-disable-next-line @typescript-eslint/ban-types + // eslint-disable-next-line @typescript-eslint/no-empty-object-type ): Node | {} { - // eslint-disable-next-line @typescript-eslint/ban-types + // eslint-disable-next-line @typescript-eslint/no-empty-object-type if (!isPlainObject(root) && root && !(root as { toJS: () => {} }).toJS) { return {}; } @@ -60,13 +60,13 @@ export function map2tree( } mapValues( - // eslint-disable-next-line @typescript-eslint/ban-types + // eslint-disable-next-line @typescript-eslint/no-empty-object-type root && (root as { toJS: () => {} }).toJS - ? // eslint-disable-next-line @typescript-eslint/ban-types + ? // eslint-disable-next-line @typescript-eslint/no-empty-object-type (root as { toJS: () => {} }).toJS() - : // eslint-disable-next-line @typescript-eslint/ban-types + : // eslint-disable-next-line @typescript-eslint/no-empty-object-type (root as {}), - // eslint-disable-next-line @typescript-eslint/ban-types + // eslint-disable-next-line @typescript-eslint/no-empty-object-type (maybeImmutable: { toJS?: () => {} }, key) => { const value = maybeImmutable && maybeImmutable.toJS