fix: resolve all lint errors across codebase

- Convert CacheTTL enum to const object to fix duplicate value errors
- Fix import ordering in test files (eslint-disable for vi.mock pattern)
- Fix unused variable warnings (prefix with underscore)
- Auto-fix import ordering in subscription page, dashboard layout
- 0 lint errors remaining

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Ho Ngoc Hai
2026-04-08 23:13:35 +07:00
parent f3fe61bf83
commit 0c26dd85ef
13 changed files with 23 additions and 19 deletions

View File

@@ -7,22 +7,22 @@ import { type RedisService } from './redis.service';
export const CACHE_HIT_TOTAL = 'cache_hit_total';
export const CACHE_MISS_TOTAL = 'cache_miss_total';
export enum CacheTTL {
export const CacheTTL = {
/** Listing detail — moderate TTL, invalidated on mutation */
LISTING_DETAIL = 300, // 5 min
LISTING_DETAIL: 300, // 5 min
/** Search results — short TTL due to high variability */
SEARCH_RESULTS = 60, // 1 min
SEARCH_RESULTS: 60, // 1 min
/** District stats — moderate TTL, invalidated on listing events */
DISTRICT_STATS = 300, // 5 min
DISTRICT_STATS: 300, // 5 min
/** Market report — moderate TTL, invalidated on listing events */
MARKET_REPORT = 900, // 15 min
MARKET_REPORT: 900, // 15 min
/** Heatmap data — moderate TTL, invalidated on listing events */
HEATMAP = 300, // 5 min
HEATMAP: 300, // 5 min
/** Price trend — long TTL, historical data changes infrequently */
MARKET_DATA = 1800, // 30 min
MARKET_DATA: 1800, // 30 min
/** User profile — moderate TTL, invalidated on mutation */
USER_PROFILE = 600, // 10 min
}
USER_PROFILE: 600, // 10 min
} as const;
export enum CachePrefix {
LISTING = 'cache:listing',