From eb9311e4c59bfe0cc03210fdef524cdc786f75ba Mon Sep 17 00:00:00 2001 From: David Featherston Date: Fri, 19 Jul 2024 12:38:22 +1000 Subject: [PATCH] chore(@dpc-sdp/ripple-ui-core): cleanup some console/linting warnings --- packages/nuxt-ripple/components/TideBaseLayout.vue | 5 +++-- .../ripple-test-utils/step_definitions/components/maps.ts | 4 ++-- .../components/global/TideGrantSearchResult.vue | 4 ++-- .../components/global/TideLandingPage/Accordion.vue | 3 +++ .../components/TideSearchListingPage.vue | 2 +- packages/ripple-tide-search/components/TideSearchPage.vue | 5 +++-- .../ripple-tide-search/utils/rplAddressSuggestionsFn.ts | 4 ++-- .../ripple-ui-core/src/components/slider/RplSlider.vue | 7 +++++-- .../ripple-ui-forms/src/components/RplForm/RplForm.vue | 1 + 9 files changed, 22 insertions(+), 13 deletions(-) diff --git a/packages/nuxt-ripple/components/TideBaseLayout.vue b/packages/nuxt-ripple/components/TideBaseLayout.vue index 127e820deb..5e33f6ce6c 100644 --- a/packages/nuxt-ripple/components/TideBaseLayout.vue +++ b/packages/nuxt-ripple/components/TideBaseLayout.vue @@ -111,8 +111,8 @@ export interface Props { footerImageCaption?: string topicTags?: TideTopicTag[] updatedDate?: string | null - siteSection: TideSiteSection | null - page: any + siteSection?: TideSiteSection | null + page?: any showContentRating?: boolean } @@ -123,6 +123,7 @@ const props = withDefaults(defineProps(), { topicTags: () => [], updatedDate: null, siteSection: null, + page: null, showContentRating: false }) diff --git a/packages/ripple-test-utils/step_definitions/components/maps.ts b/packages/ripple-test-utils/step_definitions/components/maps.ts index 6fa1feb3af..86d1b7193b 100644 --- a/packages/ripple-test-utils/step_definitions/components/maps.ts +++ b/packages/ripple-test-utils/step_definitions/components/maps.ts @@ -14,7 +14,7 @@ Then(`the data map component tabs should exist`, () => { cy.get('.rpl-tabs').should('exist') }) -Then(`the data map tabs should be labelled:`, (dataTable) => { +Then(`the data map tabs should be labelled:`, (dataTable: DataTable) => { const items = dataTable.raw() cy.get('.rpl-tabs .rpl-tab').as('items') items.forEach((row, i: number) => { @@ -170,7 +170,7 @@ Then( cy.location().should((loc) => { const params = new URLSearchParams(loc.search) - items.forEach((row, i: number) => { + items.forEach((row) => { expect(params.get(`location[${row.key}]`)).to.eq(`${row.value}`) }) }) diff --git a/packages/ripple-tide-grant/components/global/TideGrantSearchResult.vue b/packages/ripple-tide-grant/components/global/TideGrantSearchResult.vue index 8bedda143d..5fa75fe2ae 100644 --- a/packages/ripple-tide-grant/components/global/TideGrantSearchResult.vue +++ b/packages/ripple-tide-grant/components/global/TideGrantSearchResult.vue @@ -29,8 +29,8 @@ const amount = computed(() => { return null }) -const isOnGoing = computed(() => - getSearchResultValue(props.result, 'field_node_on_going') +const isOnGoing = computed( + () => getSearchResultValue(props.result, 'field_node_on_going') ?? false ) const dateFrom = computed(() => diff --git a/packages/ripple-tide-landing-page/components/global/TideLandingPage/Accordion.vue b/packages/ripple-tide-landing-page/components/global/TideLandingPage/Accordion.vue index 88b5740b31..f360b40153 100644 --- a/packages/ripple-tide-landing-page/components/global/TideLandingPage/Accordion.vue +++ b/packages/ripple-tide-landing-page/components/global/TideLandingPage/Accordion.vue @@ -5,6 +5,9 @@ defineProps<{ description?: string numbered: boolean items: Array + hasSidebar?: boolean + hasTitle?: boolean + pageBackground?: string }>() diff --git a/packages/ripple-tide-search/components/TideSearchListingPage.vue b/packages/ripple-tide-search/components/TideSearchListingPage.vue index bac2d6ddda..bbd62df036 100644 --- a/packages/ripple-tide-search/components/TideSearchListingPage.vue +++ b/packages/ripple-tide-search/components/TideSearchListingPage.vue @@ -27,7 +27,7 @@ interface TideContentPage extends TidePageBase { } interface Props { - id: string + id?: string title: string introText?: string autocompleteQuery?: boolean diff --git a/packages/ripple-tide-search/components/TideSearchPage.vue b/packages/ripple-tide-search/components/TideSearchPage.vue index 9b74b231d4..501bcc9506 100644 --- a/packages/ripple-tide-search/components/TideSearchPage.vue +++ b/packages/ripple-tide-search/components/TideSearchPage.vue @@ -17,12 +17,12 @@ import { useRippleEvent } from '@dpc-sdp/ripple-ui-core' import type { rplEventPayload } from '@dpc-sdp/ripple-ui-core' interface Props { - id: string + id?: string pageTitle: string filtersConfig: AppSearchFilterConfigItem[] searchDriverOptions: Omit searchResultsMappingFn: (item: any) => MappedSearchResult - scrollToResults: boolean + scrollToResults?: boolean } const props = withDefaults(defineProps(), { @@ -316,6 +316,7 @@ watch( { +const getSuburbSuggestions = async (query) => { const suggestionsIndex = 'vicpol-postcode-localities' const searchUrl = `/api/tide/app-search/${suggestionsIndex}/elasticsearch/_search` @@ -50,7 +50,7 @@ const getSuburbSuggestions = async (query, args) => { }) } -const getAddressSuggestions = async (query, args) => { +const getAddressSuggestions = async (query) => { const geocodeServerUrl = 'https://corp-geo.mapshare.vic.gov.au/arcgis/rest/services/Geocoder/VMAddressEZIAdd/GeocodeServer' diff --git a/packages/ripple-ui-core/src/components/slider/RplSlider.vue b/packages/ripple-ui-core/src/components/slider/RplSlider.vue index 623ecc5280..6ff3ec65ea 100644 --- a/packages/ripple-ui-core/src/components/slider/RplSlider.vue +++ b/packages/ripple-ui-core/src/components/slider/RplSlider.vue @@ -1,5 +1,5 @@