Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

fix: failing lints

Blue Mouse5402fb0b964c
diff --git a/web/app/pages/Project/View/ViewProject.tsx b/web/app/pages/Project/View/ViewProject.tsx
index af1ffa23b..37ca90d40 100644
--- a/web/app/pages/Project/View/ViewProject.tsx
+++ b/web/app/pages/Project/View/ViewProject.tsx
@@ -984,10 +984,9 @@ const ViewProjectContent = () => {
// 'Timebuckets selection' shortcuts
useHotkeys(SHORTCUTS_TIMEBUCKETS_LISTENERS, ({ key }) => {
const pairs = tbPeriodPairs(t, undefined, undefined, language)
- // @ts-expect-error
const pair = _find(
pairs,
- ({ period }) => period === timebucketShortcutsMap[key],
+ ({ period }) => period === timebucketShortcutsMap[key as keyof typeof timebucketShortcutsMap],
)
if (!pair) {
diff --git a/web/app/pages/Project/tabs/Performance/PerformanceView.tsx b/web/app/pages/Project/tabs/Performance/PerformanceView.tsx
index a985f0a65..8beec7188 100644
--- a/web/app/pages/Project/tabs/Performance/PerformanceView.tsx
+++ b/web/app/pages/Project/tabs/Performance/PerformanceView.tsx
@@ -600,9 +600,8 @@ const PerformanceViewInner = ({
? () => {
const countryData = panelsData.data?.cc || []
const regionData = panelsData.data?.rg || []
- // @ts-expect-error
const total = countryData.reduce(
- (acc, curr) => acc + curr.count,
+ (acc: number, curr: any) => acc + curr.count,
0,
)
diff --git a/web/app/pages/Project/tabs/Traffic/MetricCards.tsx b/web/app/pages/Project/tabs/Traffic/MetricCards.tsx
index 2b73a4cb8..ba1667182 100644
--- a/web/app/pages/Project/tabs/Traffic/MetricCards.tsx
+++ b/web/app/pages/Project/tabs/Traffic/MetricCards.tsx
@@ -344,15 +344,12 @@ export const PerformanceMetricCards = memo(
let networkChange = overall.networkChange
if (!_isEmpty(overallCompare) && activePeriodCompare !== 'previous') {
- // @ts-expect-error
frontendChange =
- overall.current?.frontend - overallCompare?.current?.frontend
- // @ts-expect-error
+ (overall.current?.frontend ?? 0) - (overallCompare?.current?.frontend ?? 0)
backendChange =
- overall.current?.backend - overallCompare?.current?.backend
- // @ts-expect-error
+ (overall.current?.backend ?? 0) - (overallCompare?.current?.backend ?? 0)
networkChange =
- overall.current?.network - overallCompare?.current?.network
+ (overall.current?.network ?? 0) - (overallCompare?.current?.network ?? 0)
}
return (