From 513ec97e3ea5af96a2162be893db7e9cdb1912a1 Mon Sep 17 00:00:00 2001 From: Vlad Rindevich Date: Mon, 27 Jan 2025 11:22:38 +0200 Subject: [PATCH] style: fix Eslint issues [4] --- packages/ts/react-crud/test/autogrid.spec.tsx | 7 +++---- packages/ts/react-crud/test/dataprovider.spec.tsx | 14 +++++++------- packages/ts/react-crud/test/util.spec.tsx | 6 +++--- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/packages/ts/react-crud/test/autogrid.spec.tsx b/packages/ts/react-crud/test/autogrid.spec.tsx index b6544f0277..21b0698ebb 100644 --- a/packages/ts/react-crud/test/autogrid.spec.tsx +++ b/packages/ts/react-crud/test/autogrid.spec.tsx @@ -7,18 +7,17 @@ import chaiAsPromised from 'chai-as-promised'; import { useEffect, useRef } from 'react'; import sinon from 'sinon'; import sinonChai from 'sinon-chai'; -import type { ListService } from '../crud'; -import type { HeaderFilterRendererProps } from '../header-filter'; import { AutoGrid, type AutoGridProps, type AutoGridRef } from '../src/autogrid.js'; -import type { CountService, CrudService } from '../src/crud.js'; +import type { CountService, CrudService, ListService } from '../src/crud.js'; +import type { HeaderFilterRendererProps } from '../src/header-filter.js'; import { LocaleContext } from '../src/locale.js'; import type AndFilter from '../src/types/com/vaadin/hilla/crud/filter/AndFilter.js'; +import type FilterUnion from '../src/types/com/vaadin/hilla/crud/filter/FilterUnion.js'; import Matcher from '../src/types/com/vaadin/hilla/crud/filter/PropertyStringFilter/Matcher.js'; import type PropertyStringFilter from '../src/types/com/vaadin/hilla/crud/filter/PropertyStringFilter.js'; import type Sort from '../src/types/com/vaadin/hilla/mappedtypes/Sort.js'; import Direction from '../src/types/org/springframework/data/domain/Sort/Direction.js'; import NullHandling from '../src/types/org/springframework/data/domain/Sort/NullHandling.js'; -import type FilterUnion from '../types/com/vaadin/hilla/crud/filter/FilterUnion'; import GridController from './GridController.js'; import SelectController from './SelectController.js'; import { diff --git a/packages/ts/react-crud/test/dataprovider.spec.tsx b/packages/ts/react-crud/test/dataprovider.spec.tsx index ffee63e604..0946515479 100644 --- a/packages/ts/react-crud/test/dataprovider.spec.tsx +++ b/packages/ts/react-crud/test/dataprovider.spec.tsx @@ -3,7 +3,7 @@ import type { GridDataProvider, GridSorterDefinition } from '@vaadin/react-compo import { expect, use } from 'chai'; import sinon from 'sinon'; import sinonChai from 'sinon-chai'; -import type { CountService, ListService } from '../crud.js'; +import type { CountService, ListService } from '../src/crud.js'; import { createDataProvider, DataProvider, @@ -12,12 +12,12 @@ import { useDataProvider, type ItemCounts, } from '../src/data-provider.js'; +import type AndFilter from '../src/types/com/vaadin/hilla/crud/filter/AndFilter.js'; +import type FilterUnion from '../src/types/com/vaadin/hilla/crud/filter/FilterUnion.js'; +import Matcher from '../src/types/com/vaadin/hilla/crud/filter/PropertyStringFilter/Matcher.js'; +import type PropertyStringFilter from '../src/types/com/vaadin/hilla/crud/filter/PropertyStringFilter.js'; +import type Pageable from '../src/types/com/vaadin/hilla/mappedtypes/Pageable.js'; import NullHandling from '../src/types/org/springframework/data/domain/Sort/NullHandling.js'; -import type AndFilter from '../types/com/vaadin/hilla/crud/filter/AndFilter.js'; -import type FilterUnion from '../types/com/vaadin/hilla/crud/filter/FilterUnion.js'; -import Matcher from '../types/com/vaadin/hilla/crud/filter/PropertyStringFilter/Matcher.js'; -import type PropertyStringFilter from '../types/com/vaadin/hilla/crud/filter/PropertyStringFilter.js'; -import type Pageable from '../types/com/vaadin/hilla/mappedtypes/Pageable.js'; use(sinonChai); @@ -57,7 +57,7 @@ const listService: ListService = { }, }; -const listAndCountService: CountService & ListService = { +const listAndCountService: CountService & ListService = { async list(request: Pageable): Promise { const offset = request.pageNumber * request.pageSize; return Promise.resolve(data.slice(offset, offset + request.pageSize)); diff --git a/packages/ts/react-crud/test/util.spec.tsx b/packages/ts/react-crud/test/util.spec.tsx index 5139252b89..c3ac669748 100644 --- a/packages/ts/react-crud/test/util.spec.tsx +++ b/packages/ts/react-crud/test/util.spec.tsx @@ -1,7 +1,7 @@ import { expect } from 'chai'; -import { isFilterEmpty } from '../src/util'; -import type FilterUnion from '../types/com/vaadin/hilla/crud/filter/FilterUnion'; -import Matcher from '../types/com/vaadin/hilla/crud/filter/PropertyStringFilter/Matcher'; +import type FilterUnion from '../src/types/com/vaadin/hilla/crud/filter/FilterUnion.js'; +import Matcher from '../src/types/com/vaadin/hilla/crud/filter/PropertyStringFilter/Matcher.js'; +import { isFilterEmpty } from '../src/util.js'; describe('@vaadin/hilla-react-crud', () => { describe('util', () => {