fix: lint warnings
Some checks failed
Build / build (pull_request) Failing after 49s
Lint / Lint Code (pull_request) Failing after 38s
Test / Svelte Checks (pull_request) Failing after 44s

This commit is contained in:
Ilia Mashkov
2026-01-14 15:14:58 +03:00
parent 3302e4a012
commit 7678ab271d
6 changed files with 11 additions and 17 deletions

View File

@@ -7,7 +7,6 @@ import {
vi,
} from 'vitest';
import {
type CacheItemInternalState,
type CacheOptions,
createCollectionCache,
} from './collectionCache';
@@ -152,7 +151,7 @@ describe('createCollectionCache', () => {
it('resets cache statistics', () => {
cache.set('key1', 100); // This increments hits
const statsBefore = cache.getStats();
const _statsBefore = cache.getStats();
cache.clear();
const statsAfter = cache.getStats();

View File

@@ -130,8 +130,8 @@ export interface CollectionCacheManager<T> {
* }
* ```
*/
export function createCollectionCache<T>(options: CacheOptions = {}): CollectionCacheManager<T> {
const { defaultTTL = 5 * 60 * 1000, maxSize = 1000 } = options;
export function createCollectionCache<T>(_options: CacheOptions = {}): CollectionCacheManager<T> {
// const { defaultTTL = 5 * 60 * 1000, maxSize = 1000 } = options;
// Stores for reactive data
const data: Writable<Record<string, T>> = writable({});
@@ -201,7 +201,7 @@ export function createCollectionCache<T>(options: CacheOptions = {}): Collection
* Set data in cache
* Marks entry as ready and stops fetching state
*/
set: (key: string, value: T, ttl?: number) => {
set: (key: string, value: T, _ttl?: number) => {
data.update(d => ({
...d,
[key]: value,