+ {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
{`${currentIndex + 1} / ${totalImages}`}
diff --git a/packages/design-system/lib/components/Map/InteractiveMap/HotelListingMapContent/HotelPin/index.tsx b/packages/design-system/lib/components/Map/InteractiveMap/HotelListingMapContent/HotelPin/index.tsx
index 064d28817..e0871de33 100644
--- a/packages/design-system/lib/components/Map/InteractiveMap/HotelListingMapContent/HotelPin/index.tsx
+++ b/packages/design-system/lib/components/Map/InteractiveMap/HotelListingMapContent/HotelPin/index.tsx
@@ -1,8 +1,8 @@
import { useIntl } from 'react-intl'
import { formatPrice } from '@scandic-hotels/common/utils/numberFormatting'
-import { MaterialIcon } from '@scandic-hotels/design-system/Icons/MaterialIcon'
-import { Typography } from '@scandic-hotels/design-system/Typography'
+import { MaterialIcon } from '../../../../Icons/MaterialIcon'
+import { Typography } from '../../../../Typography'
import HotelMarker from '../../../Markers/HotelMarker'
@@ -15,7 +15,7 @@ interface HotelPinProps {
hotelAdditionalPrice?: number
hotelAdditionalCurrency?: string
}
-
+const NOT_AVAILABLE = '-'
export function HotelPin({
isActive,
hotelPrice,
@@ -45,7 +45,7 @@ export function HotelPin({
{isNotAvailable
- ? '—'
+ ? NOT_AVAILABLE
: formatPrice(
intl,
hotelPrice,
diff --git a/packages/design-system/lib/components/Map/InteractiveMap/PoiMapMarkers/index.tsx b/packages/design-system/lib/components/Map/InteractiveMap/PoiMapMarkers/index.tsx
index c8a6d26a7..481a65dbd 100644
--- a/packages/design-system/lib/components/Map/InteractiveMap/PoiMapMarkers/index.tsx
+++ b/packages/design-system/lib/components/Map/InteractiveMap/PoiMapMarkers/index.tsx
@@ -4,15 +4,13 @@ import {
} from '@vis.gl/react-google-maps'
import { useIntl } from 'react-intl'
-import { Typography } from '@scandic-hotels/design-system/Typography'
+import { Typography } from '../../../Typography'
import { HotelMarkerByType } from '../../Markers/HotelMarkerByType'
import { PoiMarker } from '../../Markers/PoiMarker'
import styles from './poiMapMarkers.module.css'
-
-import type { PointOfInterest } from '@scandic-hotels/trpc/types/hotel'
-import type { MarkerInfo } from '@scandic-hotels/trpc/types/marker'
+import { MarkerInfo, PointOfInterest } from '../../types'
export type PoiMapMarkersProps = {
activePoi?: string | null
diff --git a/packages/design-system/lib/components/Map/InteractiveMap/index.tsx b/packages/design-system/lib/components/Map/InteractiveMap/index.tsx
index 00d4269ea..5ecc8dc9d 100644
--- a/packages/design-system/lib/components/Map/InteractiveMap/index.tsx
+++ b/packages/design-system/lib/components/Map/InteractiveMap/index.tsx
@@ -4,8 +4,8 @@ import { Map, type MapProps, useMap } from '@vis.gl/react-google-maps'
import { useEffect, useState } from 'react'
import { useIntl } from 'react-intl'
-import { IconButton } from '@scandic-hotels/design-system/IconButton'
-import { MaterialIcon } from '@scandic-hotels/design-system/Icons/MaterialIcon'
+import { IconButton } from '../../IconButton'
+import { MaterialIcon } from '../../Icons/MaterialIcon'
import {
DEFAULT_ZOOM,
@@ -21,9 +21,7 @@ import PoiMapMarkers from './PoiMapMarkers'
import styles from './interactiveMap.module.css'
-import type { PointOfInterest } from '@scandic-hotels/trpc/types/hotel'
-import type { MarkerInfo } from '@scandic-hotels/trpc/types/marker'
-import { HotelPin } from '../types'
+import { HotelPin, MarkerInfo, PointOfInterest } from '../types'
import { Lang } from '@scandic-hotels/common/constants/language'
export type InteractiveMapProps = {
@@ -32,7 +30,7 @@ export type InteractiveMapProps = {
lat: number
lng: number
}
- activePoi?: PointOfInterest['name'] | null
+ activePoi?: string | null
hotelPins?: HotelPin[]
pointsOfInterest?: PointOfInterest[]
markerInfo?: MarkerInfo
@@ -44,7 +42,7 @@ export type InteractiveMapProps = {
isUserLoggedIn: boolean
onTilesLoaded?: () => void
- onActivePoiChange?: (poi: PointOfInterest['name'] | null) => void
+ onActivePoiChange?: (poi: string | null) => void
onClickHotel?: (hotelId: string) => void
diff --git a/packages/design-system/lib/components/Map/Markers/HotelMarkerByType.stories.tsx b/packages/design-system/lib/components/Map/Markers/HotelMarkerByType.stories.tsx
index 44d6ab436..8c066f331 100644
--- a/packages/design-system/lib/components/Map/Markers/HotelMarkerByType.stories.tsx
+++ b/packages/design-system/lib/components/Map/Markers/HotelMarkerByType.stories.tsx
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/nextjs-vite'
import { HotelMarkerByType } from './HotelMarkerByType'
import { SignatureHotelEnum } from '@scandic-hotels/common/constants/signatureHotels'
-import { Typography } from 'lib/components/Typography'
+import { Typography } from '../../Typography'
const meta: Meta = {
title: 'Components/Map/Hotel Marker By Type',
@@ -48,7 +48,7 @@ type Story = StoryObj
export const PrimaryDefault: Story = {
args: {
hotelId: 'Other',
- hotelType: 'Regular',
+ hotelType: 'regular',
size: 'large',
},
}
@@ -56,7 +56,7 @@ export const PrimaryDefault: Story = {
export const ScandicGo: Story = {
args: {
hotelId: 'Other',
- hotelType: 'Scandic Go',
+ hotelType: 'scandicgo',
size: 'large',
},
argTypes: {
@@ -76,7 +76,7 @@ export const ScandicGo: Story = {
export const Signature: Story = {
args: {
hotelId: 'DowntownCamper',
- hotelType: 'Signature',
+ hotelType: 'signature',
size: 'large',
},
argTypes: {
@@ -100,7 +100,7 @@ const exampleMarkers = [
{
name: 'Default',
hotelId: 'Other',
- hotelType: 'Regular',
+ hotelType: 'regular',
},
{
name: 'Scandic Go',
diff --git a/packages/design-system/lib/components/Map/Markers/HotelMarkerByType.tsx b/packages/design-system/lib/components/Map/Markers/HotelMarkerByType.tsx
index 6eeedc198..da2036a76 100644
--- a/packages/design-system/lib/components/Map/Markers/HotelMarkerByType.tsx
+++ b/packages/design-system/lib/components/Map/Markers/HotelMarkerByType.tsx
@@ -1,5 +1,3 @@
-import { HotelTypeEnum } from '@scandic-hotels/trpc/enums/hotelType'
-
import { DowntownCamperMarker } from './HotelMarker/SignatureHotel/DowntownCamper'
import { DowntownCamperSmallMarker } from './HotelMarker/SignatureHotel/DowntownCamperSmall'
import { GrandHotelMarker } from './HotelMarker/SignatureHotel/GrandHotel'
@@ -17,9 +15,14 @@ import { ScandicSmallMarker } from './HotelMarker/SignatureHotel/ScandicSmall'
import { TheDockMarker } from './HotelMarker/SignatureHotel/TheDock'
import { TheDockSmallMarker } from './HotelMarker/SignatureHotel/TheDockSmall'
-import type { MarkerInfo } from '@scandic-hotels/trpc/types/marker'
import { SignatureHotelEnum } from '@scandic-hotels/common/constants/signatureHotels'
+import {
+ HotelTypes,
+ type HotelType,
+} from '@scandic-hotels/common/constants/hotelType'
+import { MarkerInfo } from '../types'
+
export interface HotelMarkerByTypeProps
extends MarkerInfo,
React.SVGAttributes {
@@ -35,12 +38,6 @@ export function HotelMarkerByType({
size = 'large',
...props
}: HotelMarkerByTypeProps) {
- const typeEntry = byHotelType[hotelType as keyof typeof byHotelType]
- if (typeEntry) {
- const Cmp = typeEntry[size]
- return
- }
-
const sigatureHotelEntry =
bySignatureHotel[hotelId as keyof typeof bySignatureHotel]
if (sigatureHotelEntry) {
@@ -48,6 +45,12 @@ export function HotelMarkerByType({
return
}
+ const typeEntry = byHotelType[hotelType as keyof typeof byHotelType]
+ if (typeEntry) {
+ const Cmp = typeEntry[size]
+ return
+ }
+
const Cmp = defaultMarkers[size]
return
}
@@ -58,10 +61,10 @@ const defaultMarkers: Record<'large' | 'small', MarkerComponent> = {
}
const byHotelType: Record<
- Exclude,
+ Exclude,
Record<'large' | 'small', MarkerComponent>
> = {
- [HotelTypeEnum.ScandicGo]: {
+ [HotelTypes.ScandicGo]: {
large: ScandicGoMarker,
small: ScandicGoSmallMarker,
},
diff --git a/packages/design-system/lib/components/Map/Markers/PoiMarker/index.tsx b/packages/design-system/lib/components/Map/Markers/PoiMarker/index.tsx
index f0d38aed4..7ec361224 100644
--- a/packages/design-system/lib/components/Map/Markers/PoiMarker/index.tsx
+++ b/packages/design-system/lib/components/Map/Markers/PoiMarker/index.tsx
@@ -1,4 +1,4 @@
-import { IconByIconName } from '@scandic-hotels/design-system/Icons/IconByIconName'
+import { IconByIconName } from '../../../Icons/IconByIconName'
import { getIconByPoiGroupAndCategory } from '../utils'
import { poiVariants } from './variants'
diff --git a/packages/design-system/lib/components/Map/Markers/utils.ts b/packages/design-system/lib/components/Map/Markers/utils.ts
index 533fcabf0..5a17879c0 100644
--- a/packages/design-system/lib/components/Map/Markers/utils.ts
+++ b/packages/design-system/lib/components/Map/Markers/utils.ts
@@ -1,4 +1,4 @@
-import { IconName } from '@scandic-hotels/design-system/Icons/iconName'
+import { IconName } from '../../Icons/iconName'
import { PointOfInterestGroup } from './PoiMarker'
export function getIconByPoiGroupAndCategory(
diff --git a/packages/design-system/lib/components/Map/types.ts b/packages/design-system/lib/components/Map/types.ts
index f3f3a4548..450f14f1f 100644
--- a/packages/design-system/lib/components/Map/types.ts
+++ b/packages/design-system/lib/components/Map/types.ts
@@ -1,5 +1,6 @@
import { CurrencyEnum } from '@scandic-hotels/common/constants/currency'
import { FacilityEnum } from '@scandic-hotels/common/constants/facilities'
+import { HotelType } from '@scandic-hotels/common/constants/hotelType'
export type HotelPin = {
bookingCode?: string | null
@@ -40,3 +41,29 @@ export type HotelPin = {
facilityIds: number[]
hasEnoughPoints: boolean
}
+
+export const PointOfInterestGroups = {
+ PublicTransport: 'Public transport',
+ Attractions: 'Attractions',
+ Business: 'Business',
+ Location: 'Location',
+ Parking: 'Parking',
+ ShoppingAndDining: 'Shopping & Dining',
+} as const
+
+export type PointOfInterestGroup =
+ (typeof PointOfInterestGroups)[keyof typeof PointOfInterestGroups]
+
+export type PointOfInterest = {
+ id: string
+ categoryName: string
+ coordinates: { lat: number; lng: number }
+ distance: number
+ group: PointOfInterestGroup
+ name: string
+}
+
+export type MarkerInfo = {
+ hotelId: string
+ hotelType: HotelType
+}
diff --git a/packages/design-system/lib/components/OpeningHours/AlternateOpeningHours/index.tsx b/packages/design-system/lib/components/OpeningHours/AlternateOpeningHours/index.tsx
index 056dbc646..d3eeca70a 100644
--- a/packages/design-system/lib/components/OpeningHours/AlternateOpeningHours/index.tsx
+++ b/packages/design-system/lib/components/OpeningHours/AlternateOpeningHours/index.tsx
@@ -2,8 +2,8 @@
import { useIntl } from 'react-intl'
-import { Divider } from '@scandic-hotels/design-system/Divider'
-import { Typography } from '@scandic-hotels/design-system/Typography'
+import { Divider } from '../../Divider'
+import { Typography } from '../../Typography'
import { getGroupedOpeningHours } from '../utils'
diff --git a/packages/design-system/lib/components/OpeningHours/openingHours.test.ts b/packages/design-system/lib/components/OpeningHours/openingHours.test.ts
index 36d2bdcbb..3162ee847 100644
--- a/packages/design-system/lib/components/OpeningHours/openingHours.test.ts
+++ b/packages/design-system/lib/components/OpeningHours/openingHours.test.ts
@@ -2,8 +2,8 @@ import { describe, expect, it } from 'vitest'
import { getGroupedOpeningHours } from './utils'
-import type { RestaurantOpeningHours } from '@scandic-hotels/trpc/types/hotel'
import type { IntlShape } from 'react-intl'
+import { OpeningHours } from './openingHoursTypes'
// Mock IntlShape for testing
const mockIntl = {
@@ -25,7 +25,7 @@ const mockIntl = {
describe('getGroupedOpeningHours', () => {
it('should group all days as closed', () => {
- const allDaysClosed: RestaurantOpeningHours = {
+ const allDaysClosed: OpeningHours = {
isActive: true,
name: 'Opening hours',
nameEnglish: 'Opening hours',
@@ -84,7 +84,7 @@ describe('getGroupedOpeningHours', () => {
})
it('should group all days with same opening hours', () => {
- const allDaysSameHours: RestaurantOpeningHours = {
+ const allDaysSameHours: OpeningHours = {
isActive: true,
name: 'Opening hours',
nameEnglish: 'Opening hours',
@@ -143,7 +143,7 @@ describe('getGroupedOpeningHours', () => {
})
it('should handle mixed opening hours', () => {
- const mixedOpeningHours: RestaurantOpeningHours = {
+ const mixedOpeningHours: OpeningHours = {
isActive: true,
name: 'Opening hours',
nameEnglish: 'Opening hours',
@@ -206,7 +206,7 @@ describe('getGroupedOpeningHours', () => {
})
it('should handle always open days', () => {
- const someAlwaysOpen: RestaurantOpeningHours = {
+ const someAlwaysOpen: OpeningHours = {
isActive: true,
name: 'Opening hours',
nameEnglish: 'Opening hours',
@@ -269,7 +269,7 @@ describe('getGroupedOpeningHours', () => {
})
it('should handle missing days', () => {
- const missingDays: RestaurantOpeningHours = {
+ const missingDays: OpeningHours = {
isActive: true,
name: 'Opening hours',
nameEnglish: 'Opening hours',
@@ -304,7 +304,7 @@ describe('getGroupedOpeningHours', () => {
})
it('should not group non-consecutive days with same hours', () => {
- const nonConsecutiveSameHours: RestaurantOpeningHours = {
+ const nonConsecutiveSameHours: OpeningHours = {
isActive: true,
name: 'Opening hours',
nameEnglish: 'Opening hours',
@@ -339,7 +339,7 @@ describe('getGroupedOpeningHours', () => {
})
it('should handle nullable opening/closing times', () => {
- const nullableHours: RestaurantOpeningHours = {
+ const nullableHours: OpeningHours = {
isActive: true,
name: 'Opening hours',
nameEnglish: 'Opening hours',
@@ -374,7 +374,7 @@ describe('getGroupedOpeningHours', () => {
})
it('should handle inactive restaurant hours', () => {
- const inactiveHours: RestaurantOpeningHours = {
+ const inactiveHours: OpeningHours = {
isActive: false,
name: 'Opening hours',
nameEnglish: 'Opening hours',
diff --git a/packages/design-system/lib/components/ParkingInformation/ParkingPrices/index.tsx b/packages/design-system/lib/components/ParkingInformation/ParkingPrices/index.tsx
index f9be58309..b98daae85 100644
--- a/packages/design-system/lib/components/ParkingInformation/ParkingPrices/index.tsx
+++ b/packages/design-system/lib/components/ParkingInformation/ParkingPrices/index.tsx
@@ -73,6 +73,7 @@ export default function ParkingPrices({
{intl.formatMessage({ defaultMessage: 'From' })}
+ {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
{`${startTime}-${endTime}`}
diff --git a/packages/design-system/lib/components/RateCard/Campaign/index.tsx b/packages/design-system/lib/components/RateCard/Campaign/index.tsx
index f9101e45c..e56c2952b 100644
--- a/packages/design-system/lib/components/RateCard/Campaign/index.tsx
+++ b/packages/design-system/lib/components/RateCard/Campaign/index.tsx
@@ -99,6 +99,7 @@ export default function CampaignRateCard({
{rateTitle}
+ {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
{` / ${paymentTerm}`}
@@ -116,6 +117,7 @@ export default function CampaignRateCard({
+ {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
{`${rate.price} `}
{rate.unit}
@@ -130,6 +132,7 @@ export default function CampaignRateCard({
+ {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
{`${memberRate.price} `}
{memberRate.unit}
@@ -144,6 +147,7 @@ export default function CampaignRateCard({
{comparisonRate.price}
+ {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
{' '}
diff --git a/packages/design-system/lib/components/RateCard/Code/index.tsx b/packages/design-system/lib/components/RateCard/Code/index.tsx
index 0ec9e0c45..c1d4e86df 100644
--- a/packages/design-system/lib/components/RateCard/Code/index.tsx
+++ b/packages/design-system/lib/components/RateCard/Code/index.tsx
@@ -95,6 +95,7 @@ export default function CodeRateCard({
{rateTitle}
+ {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
{` / ${paymentTerm}`}
@@ -112,6 +113,7 @@ export default function CodeRateCard({
+ {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
{`${rate.price} `}
{rate.unit}
@@ -125,6 +127,7 @@ export default function CodeRateCard({
{comparisonRate.price}
+ {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
{' '}
diff --git a/packages/design-system/lib/components/RateCard/NoRateAvailable/index.tsx b/packages/design-system/lib/components/RateCard/NoRateAvailable/index.tsx
index b69fae1f0..594ed3ea1 100644
--- a/packages/design-system/lib/components/RateCard/NoRateAvailable/index.tsx
+++ b/packages/design-system/lib/components/RateCard/NoRateAvailable/index.tsx
@@ -37,6 +37,7 @@ export default function NoRateAvailableCard({
+ {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
{`${rateTitle} / ${paymentTerm}`}
diff --git a/packages/design-system/lib/components/RateCard/Points/index.tsx b/packages/design-system/lib/components/RateCard/Points/index.tsx
index 2829a1348..05a57c961 100644
--- a/packages/design-system/lib/components/RateCard/Points/index.tsx
+++ b/packages/design-system/lib/components/RateCard/Points/index.tsx
@@ -77,6 +77,7 @@ export default function PointsRateCard({
{rateTitle}
+ {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
{` / ${paymentTerm}`}
@@ -97,9 +98,11 @@ export default function PointsRateCard({
+ {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
{`${rate.points} `}
+ {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
{`${rate.currency} ${rate.additionalPrice ? ' + ' : ''}`}
@@ -108,6 +111,7 @@ export default function PointsRateCard({
{rate.additionalPrice && (
+ {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
{`${rate.additionalPrice.price} `}
{rate.additionalPrice.currency}
diff --git a/packages/design-system/lib/components/RateCard/Regular/index.tsx b/packages/design-system/lib/components/RateCard/Regular/index.tsx
index bf50ae152..8b5ba1f7b 100644
--- a/packages/design-system/lib/components/RateCard/Regular/index.tsx
+++ b/packages/design-system/lib/components/RateCard/Regular/index.tsx
@@ -88,6 +88,7 @@ export default function RegularRateCard({
{rateTitle}
+ {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
{` / ${paymentTerm}`}
@@ -104,6 +105,7 @@ export default function RegularRateCard({
+ {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
{`${rate.price} `}
{rate.unit}
@@ -119,6 +121,7 @@ export default function RegularRateCard({
+ {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
{`${memberRate.price} `}
{memberRate.unit}
@@ -133,6 +136,7 @@ export default function RegularRateCard({
className={`${styles.rateRow} ${styles.strikeThroughRate}`}
>
+ {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
{`${rate.price} `}
{rate.unit}
diff --git a/packages/design-system/lib/components/SkeletonShimmer/index.tsx b/packages/design-system/lib/components/SkeletonShimmer/index.tsx
index a07b3a4ac..80f3feeb4 100644
--- a/packages/design-system/lib/components/SkeletonShimmer/index.tsx
+++ b/packages/design-system/lib/components/SkeletonShimmer/index.tsx
@@ -42,6 +42,7 @@ export default function SkeletonShimmer({
}}
>
{/* zero width space, allows for font styles to affect height */}
+ {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
)
diff --git a/packages/design-system/lib/components/TripAdvisorChip/index.tsx b/packages/design-system/lib/components/TripAdvisorChip/index.tsx
index 878d56c94..4eea72bfb 100644
--- a/packages/design-system/lib/components/TripAdvisorChip/index.tsx
+++ b/packages/design-system/lib/components/TripAdvisorChip/index.tsx
@@ -1,7 +1,7 @@
import { cva, type VariantProps } from 'class-variance-authority'
-import TripadvisorIcon from '@scandic-hotels/design-system/Icons/TripadvisorIcon'
+import TripadvisorIcon from '../Icons/Customised/Socials/Tripadvisor'
import styles from './tripAdvisorChip.module.css'
-import { Typography } from '@scandic-hotels/design-system/Typography'
+import { Typography } from '../Typography'
const container = cva(styles.container, {
variants: {
diff --git a/packages/design-system/lib/tokens/Colors.tsx b/packages/design-system/lib/tokens/Colors.tsx
index 4b47fd644..5ba418fef 100644
--- a/packages/design-system/lib/tokens/Colors.tsx
+++ b/packages/design-system/lib/tokens/Colors.tsx
@@ -1,3 +1,4 @@
+/* eslint-disable formatjs/no-literal-string-in-jsx */
import copy from 'copy-to-clipboard'
import { kebabify } from '../../generate/utils'
diff --git a/packages/design-system/lint-staged.config.js b/packages/design-system/lint-staged.config.js
index 33b4f7b24..b5e8f3b6c 100644
--- a/packages/design-system/lint-staged.config.js
+++ b/packages/design-system/lint-staged.config.js
@@ -1,5 +1,9 @@
const config = {
- '*.{ts,tsx}': [() => 'tsc -p tsconfig.json --noEmit', 'prettier --write'],
+ '*.{ts,tsx}': [
+ () => 'yarn lint',
+ () => 'tsc -p tsconfig.json --noEmit',
+ 'prettier --write',
+ ],
'*.{json,md}': 'prettier --write',
'*.{html,js,cjs,mjs,css}': 'prettier --write',
}
diff --git a/packages/design-system/package.json b/packages/design-system/package.json
index bf88d6050..0c268c126 100644
--- a/packages/design-system/package.json
+++ b/packages/design-system/package.json
@@ -133,6 +133,7 @@
"./Map/mapConstants": "./lib/components/Map/mapConstants.ts",
"./Map/Markers/HotelMarkerByType": "./lib/components/Map/Markers/HotelMarkerByType.tsx",
"./Map/Markers/PoiMarker": "./lib/components/Map/Markers/PoiMarker/index.tsx",
+ "./Map/types": "./lib/components/Map/types.ts",
"./Modal": "./lib/components/Modal/index.tsx",
"./Modal/ModalContentWithActions": "./lib/components/Modal/ModalContentWithActions/index.tsx",
"./NoRateAvailableCard": "./lib/components/RateCard/NoRateAvailable/index.tsx",
@@ -198,6 +199,8 @@
"@scandic-hotels/common": "workspace:*"
},
"peerDependencies": {
+ "@babel/core": "^7.27.4",
+ "@hookform/error-message": "^2.0.1",
"@internationalized/date": "^3.8.0",
"@radix-ui/react-slot": "^1.2.2",
"@vis.gl/react-google-maps": "^1.5.2",
@@ -233,6 +236,7 @@
"copy-to-clipboard": "^3.3.3",
"deepmerge-ts": "^7.1.5",
"eslint": "^9",
+ "eslint-plugin-formatjs": "^5.3.1",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.20",
diff --git a/packages/trpc/eslint.config.mjs b/packages/trpc/eslint.config.mjs
index 6aa5464e2..2ddf3bd80 100644
--- a/packages/trpc/eslint.config.mjs
+++ b/packages/trpc/eslint.config.mjs
@@ -33,7 +33,7 @@ export default defineConfig([
"no-unused-vars": "off",
"import/no-relative-packages": "error",
"simple-import-sort/imports": [
- "error",
+ "warn",
{
groups: [
["^\\u0000"],
diff --git a/packages/trpc/lint-staged.config.mjs b/packages/trpc/lint-staged.config.mjs
index e6ae14b2a..ae7bcfcb5 100644
--- a/packages/trpc/lint-staged.config.mjs
+++ b/packages/trpc/lint-staged.config.mjs
@@ -1,5 +1,9 @@
const config = {
- "*.{ts,tsx}": [() => "tsc -p tsconfig.json --noEmit", "prettier --write"],
+ "*.{ts,tsx}": [
+ () => "yarn lint",
+ () => "tsc -p tsconfig.json --noEmit",
+ "prettier --write",
+ ],
"*.{js,cjs,mjs}": "prettier --write",
}
diff --git a/turbo.json b/turbo.json
index c166ec478..06f204cb4 100644
--- a/turbo.json
+++ b/turbo.json
@@ -1,17 +1,17 @@
{
- "$schema": "https://turbo.build/schema.json",
- "tasks": {
- "build": {
- "inputs": ["$TURBO_DEFAULT$", ".env*"],
- "dependsOn": ["^build"],
- "outputs": [".next/**", "!.next/cache/**"]
- },
- "dev": {
- "persistent": true,
- "cache": false
- },
- "lint": {},
- "test": {},
- "check-types": {}
- }
+ "$schema": "https://turbo.build/schema.json",
+ "tasks": {
+ "build": {
+ "inputs": ["$TURBO_DEFAULT$", ".env*"],
+ "dependsOn": ["^build"],
+ "outputs": [".next/**", "!.next/cache/**"]
+ },
+ "dev": {
+ "persistent": true,
+ "cache": false
+ },
+ "lint": { "dependsOn": [] },
+ "test": {},
+ "check-types": {}
+ }
}
diff --git a/yarn.lock b/yarn.lock
index f71e4b58d..3256bead1 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -6192,6 +6192,7 @@ __metadata:
copy-to-clipboard: "npm:^3.3.3"
deepmerge-ts: "npm:^7.1.5"
eslint: "npm:^9"
+ eslint-plugin-formatjs: "npm:^5.3.1"
eslint-plugin-import: "npm:^2.31.0"
eslint-plugin-react-hooks: "npm:^5.2.0"
eslint-plugin-react-refresh: "npm:^0.4.20"
@@ -6217,6 +6218,8 @@ __metadata:
vitest: "npm:^3.2.4"
vitest-browser-react: "npm:^1.0.1"
peerDependencies:
+ "@babel/core": ^7.27.4
+ "@hookform/error-message": ^2.0.1
"@internationalized/date": ^3.8.0
"@radix-ui/react-slot": ^1.2.2
"@vis.gl/react-google-maps": ^1.5.2