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 knip

Blue Mouseacae7fc2fe66
diff --git a/backend/apps/cloud/src/ai/dto/chat.dto.ts b/backend/apps/cloud/src/ai/dto/chat.dto.ts
index 3661ed4b4..28c03be6e 100644
--- a/backend/apps/cloud/src/ai/dto/chat.dto.ts
+++ b/backend/apps/cloud/src/ai/dto/chat.dto.ts
@@ -18,7 +18,7 @@ const MAX_MESSAGES_PER_CHAT = 50
const MAX_MESSAGE_LENGTH = 5000
const MAX_CHAT_NAME_LENGTH = 200
-export class ChatMessageDto {
+class ChatMessageDto {
@ApiProperty({
enum: ['user', 'assistant'],
description: 'The role of the message sender',
diff --git a/backend/apps/cloud/src/experiment/dto/experiment.dto.ts b/backend/apps/cloud/src/experiment/dto/experiment.dto.ts
index d102e7b9f..0f9d6a9ec 100644
--- a/backend/apps/cloud/src/experiment/dto/experiment.dto.ts
+++ b/backend/apps/cloud/src/experiment/dto/experiment.dto.ts
@@ -26,7 +26,7 @@ import { PID_REGEX } from '../../common/constants'
const KEY_REGEX = /^[a-zA-Z0-9_-]+$/
-export class ExperimentVariantDto {
+class ExperimentVariantDto {
@ApiProperty()
@IsString()
@IsNotEmpty()
@@ -302,7 +302,7 @@ export class VariantResultDto {
improvement: number
}
-export class ExperimentChartDataDto {
+class ExperimentChartDataDto {
@ApiProperty({ type: [String], description: 'X-axis timestamps' })
x: string[]
diff --git a/backend/apps/cloud/src/feature-flag/dto/feature-flag.dto.ts b/backend/apps/cloud/src/feature-flag/dto/feature-flag.dto.ts
index 54153ccf4..83e49d533 100644
--- a/backend/apps/cloud/src/feature-flag/dto/feature-flag.dto.ts
+++ b/backend/apps/cloud/src/feature-flag/dto/feature-flag.dto.ts
@@ -28,7 +28,7 @@ const VALID_TARGETING_COLUMNS = [
'os', // operating system
] as const
-export class TargetingRuleDto implements TargetingRule {
+class TargetingRuleDto implements TargetingRule {
@ApiProperty({
description: 'Column/attribute to filter on (cc, ct, rg, dv, br, os)',
enum: VALID_TARGETING_COLUMNS,
@@ -240,7 +240,7 @@ export class EvaluatedFlagsResponseDto {
flags: Record<string, boolean>
}
-export class FeatureFlagProfileDto {
+class FeatureFlagProfileDto {
@ApiProperty({ description: 'Profile ID' })
profileId: string
diff --git a/backend/apps/cloud/src/goal/dto/goal.dto.ts b/backend/apps/cloud/src/goal/dto/goal.dto.ts
index e180c1f03..a7ac60fba 100644
--- a/backend/apps/cloud/src/goal/dto/goal.dto.ts
+++ b/backend/apps/cloud/src/goal/dto/goal.dto.ts
@@ -17,7 +17,7 @@ import { GoalType, GoalMatchType, MetadataFilter } from '../entity/goal.entity'
// Allowed match types for API (regex is disabled for now)
const ALLOWED_MATCH_TYPES = [GoalMatchType.EXACT, GoalMatchType.CONTAINS]
-export class MetadataFilterDto implements MetadataFilter {
+class MetadataFilterDto implements MetadataFilter {
@ApiProperty()
@IsString()
@IsNotEmpty()
diff --git a/backend/apps/community/src/feature-flag/dto/feature-flag.dto.ts b/backend/apps/community/src/feature-flag/dto/feature-flag.dto.ts
index 54153ccf4..83e49d533 100644
--- a/backend/apps/community/src/feature-flag/dto/feature-flag.dto.ts
+++ b/backend/apps/community/src/feature-flag/dto/feature-flag.dto.ts
@@ -28,7 +28,7 @@ const VALID_TARGETING_COLUMNS = [
'os', // operating system
] as const
-export class TargetingRuleDto implements TargetingRule {
+class TargetingRuleDto implements TargetingRule {
@ApiProperty({
description: 'Column/attribute to filter on (cc, ct, rg, dv, br, os)',
enum: VALID_TARGETING_COLUMNS,
@@ -240,7 +240,7 @@ export class EvaluatedFlagsResponseDto {
flags: Record<string, boolean>
}
-export class FeatureFlagProfileDto {
+class FeatureFlagProfileDto {
@ApiProperty({ description: 'Profile ID' })
profileId: string
diff --git a/backend/apps/community/src/goal/dto/goal.dto.ts b/backend/apps/community/src/goal/dto/goal.dto.ts
index 780f87ad9..0e0519c97 100644
--- a/backend/apps/community/src/goal/dto/goal.dto.ts
+++ b/backend/apps/community/src/goal/dto/goal.dto.ts
@@ -16,7 +16,7 @@ import { GoalType, GoalMatchType, MetadataFilter } from '../entity/goal.entity'
// Allowed match types for API (regex is disabled for now)
const ALLOWED_MATCH_TYPES = [GoalMatchType.EXACT, GoalMatchType.CONTAINS]
-export class MetadataFilterDto implements MetadataFilter {
+class MetadataFilterDto implements MetadataFilter {
@IsString()
@IsNotEmpty()
@MaxLength(100)
diff --git a/backend/knip.jsonc b/backend/knip.jsonc
index 41a85aff9..34cc19be7 100644
--- a/backend/knip.jsonc
+++ b/backend/knip.jsonc
@@ -3,7 +3,7 @@
"ignoreDependencies": [
"@faker-js/faker", "@types/ioredis", "@types/multer"
],
- "ignore": ["./ecosystem.config.js"],
+ "ignore": [],
"exclude": ["enumMembers"],
"entry": ["./apps/cloud/src/main.ts", "./apps/community/src/main.ts"],
"project": ["./apps/cloud/src/**/*.ts", "./apps/community/src/**/*.ts"]
diff --git a/web/app/api/api.server.ts b/web/app/api/api.server.ts
index 14789e06c..632cd1cc8 100644
--- a/web/app/api/api.server.ts
+++ b/web/app/api/api.server.ts
@@ -2358,7 +2358,7 @@ export async function getRevenueDataServer(
// MARK: Tools API
// ============================================================================
-export interface IpLookupResponse {
+interface IpLookupResponse {
ip: string
country: string | null
countryName: string | null
diff --git a/web/knip.jsonc b/web/knip.jsonc
index 67f999edc..7dcfc7be4 100644
--- a/web/knip.jsonc
+++ b/web/knip.jsonc
@@ -7,10 +7,6 @@
"@swetrix/node",
],
"ignore": [
- "./ecosystem.config.js",
- "./app/routes.ts",
- "./react-router.config.ts",
- "./app/routes/[robots.txt].tsx",
"./app/utils/analytics.server.ts",
],
"project": ["./app/**/*.{js,ts,tsx,jsx,cjs}"],