Skip to content

Commit d11faef

Browse files
committed
PB-1383: update libs and adapt to newer linter version
1 parent fb627b9 commit d11faef

10 files changed

Lines changed: 2636 additions & 2314 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
],
5757
"patchedDependencies": {
5858
"@geoblocks/mapfishprint@0.2.22": "patches/@geoblocks__mapfishprint@0.2.22.patch",
59-
"ol@10.7.0": "patches/ol@10.7.0.patch"
59+
"ol@10.8.0": "patches/ol@10.8.0.patch"
6060
},
6161
"ignoredBuiltDependencies": [
6262
"core-js",

packages/api/src/topics.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ async function loadTopicTreeForTopic(
149149
titleColor: LogPreDefinedColor.Amber,
150150
messages: [errorMessage, error],
151151
})
152-
throw new Error(errorMessage)
152+
throw new Error(errorMessage, { cause: error})
153153
}
154154
}
155155

@@ -169,7 +169,7 @@ async function loadTopics(): Promise<ServicesResponse> {
169169
titleColor: LogPreDefinedColor.Amber,
170170
messages: [errorMessage, error],
171171
})
172-
throw new Error(errorMessage)
172+
throw new Error(errorMessage, { cause: error})
173173
}
174174
}
175175

packages/config/eslint/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const commonTsAndJsRules: PartialRules = {
3434
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
3535
// has some issue (with typescript-eslint for instance), so we disable it (TS does already a good job at detecting unresolved imports)
3636
'import/no-unresolved': 'off',
37+
'no-useless-assignment': 'off',
3738
}
3839

3940
const noUnusedVarsRules: PartialRules = {

packages/mapviewer/src/modules/drawing/components/ShareWarningPopup.vue

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,9 @@ updateAdminShareUrl().catch((error: Error) =>
6565
)
6666
6767
let adminTimeout: ReturnType<typeof setTimeout> | undefined
68-
let fileTimeout: ReturnType<typeof setTimeout> | undefined
6968
7069
onUnmounted(() => {
7170
clearTimeout(adminTimeout)
72-
clearTimeout(fileTimeout)
7371
})
7472
7573
function onAccept() {
@@ -92,9 +90,9 @@ async function updateShareUrl() {
9290
if (fileUrl.value) {
9391
try {
9492
shareUrl.value = await shortLinkAPI.createShortLink({
95-
url: fileUrl.value,
93+
url: fileUrl.value,
9694
withCrosshair: !!shareUrl.value,
97-
staging: ENVIRONMENT
95+
staging: ENVIRONMENT,
9896
})
9997
} catch (_) {
10098
// Fallback to normal url
@@ -107,7 +105,7 @@ async function updateAdminShareUrl() {
107105
try {
108106
adminShareUrl.value = await shortLinkAPI.createShortLink({
109107
url: adminUrl.value,
110-
staging: ENVIRONMENT
108+
staging: ENVIRONMENT,
111109
})
112110
} catch (_) {
113111
// Fallback to normal url

packages/mapviewer/src/modules/map/components/openlayers/OpenLayersScale.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ onBeforeUnmount(() => olMap.removeControl(scaleLine))
5353
v-show="showScaleLine"
5454
ref="scaleLineElement"
5555
class="scale-line-container"
56-
:class="withRelativeSize"
56+
:class="{ 'with-relative-size': withRelativeSize }"
5757
data-cy="scaleline"
5858
/>
5959
</template>

packages/mapviewer/src/store/plugins/storeSync/urlToStore.plugin.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,8 @@ let hasBeenInitialized: boolean = false
232232
const urlToStorePlugin: PiniaPlugin = (context: PiniaPluginContext) => {
233233
const { store } = context
234234

235+
queryParamsStoredAtStartup = store.router.currentRoute.value.query
236+
235237
store.$onAction(({ after }) => {
236238
const appStore = useAppStore()
237239
if (appStore.isParsingUrl && !hasBeenInitialized) {

packages/mapviewer/tests/cypress/tests-e2e/reportProblem.cy.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,6 @@ describe('Testing the report problem form', () => {
244244
})
245245

246246
it('reports a problem with drawing attachment', () => {
247-
let kmlBody: string | FormData | undefined
248-
249247
interceptPostKml()
250248
cy.goToMapView()
251249
interceptFeedback(true)
@@ -392,7 +390,6 @@ describe('Testing the report problem form', () => {
392390

393391
cy.wait('@post-kml')
394392

395-
console.log('KML Body:', kmlBody)
396393
cy.get('@reportForm').should('exist')
397394
cy.get('[data-cy="drawing-header-title"]').should('not.exist')
398395
cy.get('@textArea').should('have.value', text)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git a/style/Icon.js b/style/Icon.js
2-
index bfd9abd6cb1cee531f4feb651149d6b406606569..26fcfe2b58738a97bf6619c621f491571bd76f9b 100644
2+
index 50d5aa80b0331adc0b6021e53e921026cb483999..b7d1774f664aac3153c49a0e531f41ad6d4725e9 100644
33
--- a/style/Icon.js
44
+++ b/style/Icon.js
5-
@@ -380,8 +380,8 @@ class Icon extends ImageStyle {
5+
@@ -391,8 +391,8 @@ class Icon extends ImageStyle {
66
// anchor is scaled by renderer but displacement should not be scaled
77
// so divide by scale here
88
return [

0 commit comments

Comments
 (0)