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 lints

Blue Mouseaa5f3d07a456
diff --git a/backend/apps/cloud/src/analytics/session-replay-export.service.ts b/backend/apps/cloud/src/analytics/session-replay-export.service.ts
index 51d4af556..f7836d5b4 100644
--- a/backend/apps/cloud/src/analytics/session-replay-export.service.ts
+++ b/backend/apps/cloud/src/analytics/session-replay-export.service.ts
@@ -23,7 +23,7 @@ import { SessionReplayR2Service } from './session-replay-r2.service'
export const SESSION_REPLAY_EXPORT_QUEUE = 'session-replay-export'
-export type SessionReplayExportStatus =
+type SessionReplayExportStatus =
| 'queued'
| 'processing'
| 'ready'
diff --git a/backend/knip.jsonc b/backend/knip.jsonc
index 096b8195c..1452ee44e 100644
--- a/backend/knip.jsonc
+++ b/backend/knip.jsonc
@@ -1,6 +1,6 @@
{
"$schema": "https://unpkg.com/knip@5/schema.json",
- "ignoreDependencies": ["@faker-js/faker", "@types/ioredis"],
+ "ignoreDependencies": ["@faker-js/faker", "@types/ioredis", "rrweb"],
"ignore": [],
"exclude": ["enumMembers"],
"entry": ["./apps/cloud/src/main.ts", "./apps/community/src/main.ts"],
diff --git a/docs/content/docs/script-reference.mdx b/docs/content/docs/script-reference.mdx
index 683c3ea6b..8e3193b65 100644
--- a/docs/content/docs/script-reference.mdx
+++ b/docs/content/docs/script-reference.mdx
@@ -274,12 +274,12 @@ const replay = await startSessionReplay({
});
```
-| Name | Description | Default value |
-| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
+| Name | Description | Default value |
+| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------- |
| privacy | Controls how much page content is masked. Use `total` to mask all text and inputs and block media/canvas content, `normal` to mask all inputs, or `none` to only force password inputs to stay masked unless you add your own `rrweb` masking options. | `normal` |
-| rrweb | Advanced recorder options passed to `rrweb.record()`. If you provide an `emit` callback, Swetrix will call it and still upload replay events. | `undefined` |
-| flushIntervalMs | How often replay events are uploaded while recording. | `5000` |
-| maxEventsPerChunk | The maximum number of replay events to batch before Swetrix uploads a chunk immediately. | `100` |
+| rrweb | Advanced recorder options passed to `rrweb.record()`. If you provide an `emit` callback, Swetrix will call it and still upload replay events. | `undefined` |
+| flushIntervalMs | How often replay events are uploaded while recording. | `5000` |
+| maxEventsPerChunk | The maximum number of replay events to batch before Swetrix uploads a chunk immediately. | `100` |
The function returns a `Promise` with controls for the active replay:
diff --git a/web/app/api/api.server.ts b/web/app/api/api.server.ts
index f504e87fd..606c30eff 100644
--- a/web/app/api/api.server.ts
+++ b/web/app/api/api.server.ts
@@ -995,7 +995,7 @@ export interface SessionsResponse {
appliedFilters: AnalyticsFilter[]
}
-export type SessionReplayPrivacy = 'total' | 'normal' | 'none'
+type SessionReplayPrivacy = 'total' | 'normal' | 'none'
export interface SessionReplayListItem extends Session {
replayId: string
@@ -1197,7 +1197,7 @@ export interface SessionReplayResponse {
events: Record<string, unknown>[]
}
-export type SessionReplayExportStatus =
+type SessionReplayExportStatus =
| 'queued'
| 'processing'
| 'ready'
diff --git a/web/app/lib/constants/index.ts b/web/app/lib/constants/index.ts
index 0aa5b662f..9966f044b 100644
--- a/web/app/lib/constants/index.ts
+++ b/web/app/lib/constants/index.ts
@@ -361,7 +361,6 @@ export const DISCORD_URL = 'https://discord.gg/ZVK8Tw2E8j'
export const STATUSPAGE_URL = 'https://status.swetrix.com/'
export const MAIN_URL = 'https://swetrix.com'
export const LIVE_DEMO_URL = '/projects/STEzHcB1rALV'
-export const BOOK_A_CALL_URL = 'https://cal.com/swetrix/30min'
/** The cal.com link slug (without origin) used by the @calcom/embed-react inline widget. */
export const BOOK_A_CALL_CAL_LINK = 'swetrix/30min'
export const PERFORMANCE_LIVE_DEMO_URL =
diff --git a/web/app/lib/models/Project.ts b/web/app/lib/models/Project.ts
index 99df1ba58..557893164 100644
--- a/web/app/lib/models/Project.ts
+++ b/web/app/lib/models/Project.ts
@@ -85,7 +85,7 @@ export interface SwetrixError {
sessions: number
}
-export type SessionReplayPrivacy = 'total' | 'normal' | 'none'
+type SessionReplayPrivacy = 'total' | 'normal' | 'none'
export interface SessionReplayMetadata {
hasReplay: boolean
diff --git a/web/app/pages/Project/tabs/Replays/Replays.tsx b/web/app/pages/Project/tabs/Replays/Replays.tsx
index e7ccfe205..e564f0be2 100644
--- a/web/app/pages/Project/tabs/Replays/Replays.tsx
+++ b/web/app/pages/Project/tabs/Replays/Replays.tsx
@@ -78,7 +78,7 @@ const formatDate = (
})
}
-export const ReplayRow = ({
+const ReplayRow = ({
replay,
timeFormat,
timezone,
diff --git a/web/app/pages/Project/tabs/Sessions/Pageflow.tsx b/web/app/pages/Project/tabs/Sessions/Pageflow.tsx
index 2186d8598..9c39863a7 100644
--- a/web/app/pages/Project/tabs/Sessions/Pageflow.tsx
+++ b/web/app/pages/Project/tabs/Sessions/Pageflow.tsx
@@ -26,7 +26,7 @@ import { cn, getStringFromTime, getTimeFromSeconds } from '~/utils/generic'
dayjs.extend(utc)
-export interface PageflowMetadata {
+interface PageflowMetadata {
key: string
value: string
}
diff --git a/web/app/pages/Project/tabs/Sessions/SessionReplayModal.tsx b/web/app/pages/Project/tabs/Sessions/SessionReplayModal.tsx
index a9098a9e7..6522a54fc 100644
--- a/web/app/pages/Project/tabs/Sessions/SessionReplayModal.tsx
+++ b/web/app/pages/Project/tabs/Sessions/SessionReplayModal.tsx
@@ -1007,7 +1007,7 @@ const PageflowMarkerButton = ({
const SETTINGS_ROW_CLASS =
'flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-left text-sm text-slate-100 transition-colors duration-150 ease-out hover:bg-white/10 focus-visible:bg-white/10 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent'
-export const SessionReplayModal = ({
+const SessionReplayModal = ({
isOpen,
onClose,
projectId,
diff --git a/web/knip.jsonc b/web/knip.jsonc
index 50e55bf64..9998be0e6 100644
--- a/web/knip.jsonc
+++ b/web/knip.jsonc
@@ -4,6 +4,8 @@
"@tailwindcss/forms",
"@tailwindcss/typography",
"tailwindcss",
+ "rrweb",
+ "dom-player",
// "@swetrix/node",
],
// "ignore": [