Merged in feat/sw-3596-console (pull request #3100)
feat(SW-3596): added lint rule for no console.log. Use logger instead. * feat(SW-3596): added lint rule for no console.log. Use logger instead. Approved-by: Joakim Jäderberg
This commit is contained in:
@@ -30,6 +30,7 @@ export default defineConfig([
|
||||
},
|
||||
|
||||
rules: {
|
||||
"no-console": "warn",
|
||||
"no-unused-vars": "off",
|
||||
"import/no-relative-packages": "error",
|
||||
"simple-import-sort/imports": [
|
||||
|
||||
@@ -177,7 +177,7 @@ export const enterDetails = safeProtectedServiceProcedure
|
||||
}
|
||||
|
||||
if (selectedRooms.some((sr) => !sr)) {
|
||||
console.log("DEBUG: REDIRECTING TO SELECT RATE", selectedRooms)
|
||||
logger.debug("DEBUG: REDIRECTING TO SELECT RATE", selectedRooms)
|
||||
return selectRateRedirectURL(input, selectedRooms.map(Boolean))
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { logger } from "@scandic-hotels/common/logger"
|
||||
|
||||
import type { FacilityEnum } from "@scandic-hotels/common/constants/facilities"
|
||||
import type { Lang } from "@scandic-hotels/common/constants/language"
|
||||
|
||||
@@ -140,7 +142,7 @@ function getLocalizedCountryByCountryCode(
|
||||
const country = new Intl.DisplayNames([lang], { type: "region" })
|
||||
const localizedCountry = country.of(countryCode)
|
||||
if (!localizedCountry) {
|
||||
console.error(`Could not map ${countryCode} to localized country.`)
|
||||
logger.error(`Could not map ${countryCode} to localized country.`)
|
||||
return null
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user