Skip to content

Commit 12cd9a3

Browse files
committed
PB-2064: Fix lint
1 parent e8caff3 commit 12cd9a3

File tree

5 files changed

+11
-13
lines changed

5 files changed

+11
-13
lines changed

packages/viewer/src/modules/menu/components/search/SearchBar.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const updateSearchQuery = (event: Event) => {
7474
clearTimeout(debounceSearch)
7575
}
7676
debounceSearch = setTimeout(() => {
77-
searchStore.setSearchQuery(
77+
void searchStore.setSearchQuery(
7878
(event.target as HTMLInputElement).value,
7979
{ originUrlParam: undefined },
8080
dispatcher
@@ -86,7 +86,7 @@ const clearSearchQuery = () => {
8686
showResults.value = false
8787
selectedEntry.value = undefined
8888
searchValue.value = ''
89-
searchStore.setSearchQuery('', { originUrlParam: undefined }, dispatcher)
89+
void searchStore.setSearchQuery('', { originUrlParam: undefined }, dispatcher)
9090
if (searchInput.value) {
9191
searchInput.value.focus()
9292
}

packages/viewer/src/store/modules/search/actions/setSearchQuery.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import type { CoordinateSystem, SingleCoordinate } from '@swissgeo/coordinates'
33
import { constants, coordinatesUtils, CustomCoordinateSystem, LV03 } from '@swissgeo/coordinates'
44
import log, { LogPreDefinedColor } from '@swissgeo/log'
55

6-
import type { SearchResult } from '@/api/search.api'
76
import type { SearchStore } from '@/store/modules/search/types'
87
import type { ActionDispatcher } from '@/store/types'
98

packages/viewer/src/store/modules/search/utils/redoSearch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default function redoSearch() {
44
const searchStore = useSearchStore()
55

66
if (searchStore.query.length > 2) {
7-
searchStore.setSearchQuery(
7+
void searchStore.setSearchQuery(
88
searchStore.query,
99
// necessary to select the first result if there is only one else it will not be because this redo search is done every time the page loaded
1010
{ originUrlParam: true },

packages/viewer/src/store/plugins/storeSync/params/swisssearch.param.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const swisssearchParamConfig = new UrlParamConfig<string>({
1616
extractValueFromStore: () => '',
1717
setValuesInStore: (_: RouteLocationNormalizedGeneric, urlParamValue?: string) => {
1818
if (urlParamValue) {
19-
useSearchStore().setSearchQuery(
19+
void useSearchStore().setSearchQuery(
2020
urlParamValue,
2121
{ originUrlParam: true },
2222
STORE_DISPATCHER_ROUTER_PLUGIN

packages/viewer/tests/cypress/tests-e2e/search/search-results.cy.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import type { Layer } from '@swissgeo/layers'
66
import { registerProj4, WGS84 } from '@swissgeo/coordinates'
77
import { BREAKPOINT_TABLET } from '@swissgeo/staging-config/constants'
88
import proj4 from 'proj4'
9-
import { assertDefined } from 'support/utils'
109

1110
import { DEFAULT_PROJECTION } from '@/config'
1211
import useLayersStore from '@/store/modules/layers'
@@ -101,7 +100,7 @@ function testQueryPositionCrosshairStore({
101100
cy.wrap(positionStore).its('crossHairPosition').should('not.be.undefined')
102101
cy.wrap(positionStore)
103102
.its('crossHairPosition')
104-
.should((pos) => checkLocation(expectedCrosshairPosition, pos!))
103+
.should((pos) => checkLocation(expectedCrosshairPosition, pos))
105104
} else {
106105
cy.wrap(positionStore).its('crossHairPosition').should('be.undefined')
107106
}
@@ -112,7 +111,7 @@ function testQueryPositionCrosshairStore({
112111
cy.wrap(mapStore).its('pinnedLocation').should('not.be.undefined')
113112
cy.wrap(mapStore)
114113
.its('pinnedLocation')
115-
.should((loc) => checkLocation(expectedPinnedLocation, loc!))
114+
.should((loc) => checkLocation(expectedPinnedLocation, loc))
116115
})
117116
}
118117

@@ -361,7 +360,7 @@ describe('Test the search bar result handling', () => {
361360
cy.wrap(mapStore2).its('pinnedLocation').should('not.be.undefined')
362361
cy.wrap(mapStore2)
363362
.its('pinnedLocation')
364-
.then((loc) => checkLocation(expectedCenterDefaultProjection, loc!))
363+
.then((loc) => checkLocation(expectedCenterDefaultProjection, loc))
365364
})
366365
// clearing selected entry by clearing the search bar and re-entering a search text
367366
cy.get('[data-cy="searchbar-clear"]').click()
@@ -382,7 +381,7 @@ describe('Test the search bar result handling', () => {
382381
cy.wrap(mapStore2).its('previewedPinnedLocation').should('not.be.undefined')
383382
cy.wrap(mapStore2)
384383
.its('previewedPinnedLocation')
385-
.then((loc) => checkLocation(expectedCenterDefaultProjection, loc!))
384+
.then((loc) => checkLocation(expectedCenterDefaultProjection, loc))
386385
})
387386
// Location - Leave
388387
cy.get('@locationSearchResults').first().trigger('mouseleave')
@@ -456,7 +455,7 @@ describe('Test the search bar result handling', () => {
456455
cy.wrap(mapStore2).its('pinnedLocation').should('not.be.undefined')
457456
cy.wrap(mapStore2)
458457
.its('pinnedLocation')
459-
.should((loc) => checkLocation(expectedCenterDefaultProjection, loc!))
458+
.should((loc) => checkLocation(expectedCenterDefaultProjection, loc))
460459
})
461460

462461
cy.log('Search bar dropdown should be hidden after centering on the feature')
@@ -605,8 +604,8 @@ describe('Test the search bar result handling', () => {
605604
.then((loc) => {
606605
expect(loc).to.be.a('array').that.is.not.empty
607606
expect(loc?.length).to.greaterThan(1)
608-
expect(loc![0]).to.be.approximately(coordinates[0]!, acceptableDelta)
609-
expect(loc![1]).to.be.approximately(coordinates[1]!, acceptableDelta)
607+
expect(loc[0]).to.be.approximately(coordinates[0]!, acceptableDelta)
608+
expect(loc[1]).to.be.approximately(coordinates[1]!, acceptableDelta)
610609
})
611610
})
612611

0 commit comments

Comments
 (0)