Merge pull request 'fix: lint warnings' (#15) from fixex/lint into main
Reviewed-on: #15
This commit was merged in pull request #15.
This commit is contained in:
@@ -1,8 +1,4 @@
|
|||||||
import {
|
import { type Filter } from '$shared/lib';
|
||||||
type Filter,
|
|
||||||
type FilterModel,
|
|
||||||
createFilter,
|
|
||||||
} from '$shared/lib';
|
|
||||||
import { SvelteMap } from 'svelte/reactivity';
|
import { SvelteMap } from 'svelte/reactivity';
|
||||||
import type { FontProvider } from '../types';
|
import type { FontProvider } from '../types';
|
||||||
import type { CheckboxFilter } from '../types/common';
|
import type { CheckboxFilter } from '../types/common';
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import {
|
|||||||
vi,
|
vi,
|
||||||
} from 'vitest';
|
} from 'vitest';
|
||||||
import {
|
import {
|
||||||
type CacheItemInternalState,
|
|
||||||
type CacheOptions,
|
type CacheOptions,
|
||||||
createCollectionCache,
|
createCollectionCache,
|
||||||
} from './collectionCache';
|
} from './collectionCache';
|
||||||
@@ -152,7 +151,7 @@ describe('createCollectionCache', () => {
|
|||||||
|
|
||||||
it('resets cache statistics', () => {
|
it('resets cache statistics', () => {
|
||||||
cache.set('key1', 100); // This increments hits
|
cache.set('key1', 100); // This increments hits
|
||||||
const statsBefore = cache.getStats();
|
const _statsBefore = cache.getStats();
|
||||||
|
|
||||||
cache.clear();
|
cache.clear();
|
||||||
const statsAfter = cache.getStats();
|
const statsAfter = cache.getStats();
|
||||||
|
|||||||
@@ -130,8 +130,8 @@ export interface CollectionCacheManager<T> {
|
|||||||
* }
|
* }
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
export function createCollectionCache<T>(options: CacheOptions = {}): CollectionCacheManager<T> {
|
export function createCollectionCache<T>(_options: CacheOptions = {}): CollectionCacheManager<T> {
|
||||||
const { defaultTTL = 5 * 60 * 1000, maxSize = 1000 } = options;
|
// const { defaultTTL = 5 * 60 * 1000, maxSize = 1000 } = options;
|
||||||
|
|
||||||
// Stores for reactive data
|
// Stores for reactive data
|
||||||
const data: Writable<Record<string, T>> = writable({});
|
const data: Writable<Record<string, T>> = writable({});
|
||||||
@@ -201,7 +201,7 @@ export function createCollectionCache<T>(options: CacheOptions = {}): Collection
|
|||||||
* Set data in cache
|
* Set data in cache
|
||||||
* Marks entry as ready and stops fetching state
|
* 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 => ({
|
data.update(d => ({
|
||||||
...d,
|
...d,
|
||||||
[key]: value,
|
[key]: value,
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
import {
|
import { createFilter } from '$shared/lib';
|
||||||
type Filter,
|
|
||||||
type Property,
|
|
||||||
createFilter,
|
|
||||||
} from '$shared/lib';
|
|
||||||
import {
|
import {
|
||||||
describe,
|
describe,
|
||||||
expect,
|
expect,
|
||||||
|
|||||||
@@ -632,7 +632,7 @@ describe('ComboControl Component', () => {
|
|||||||
await fireEvent.click(controlBtn);
|
await fireEvent.click(controlBtn);
|
||||||
|
|
||||||
// Both should be present
|
// Both should be present
|
||||||
const slider = await screen.findByRole('slider');
|
const _slider = await screen.findByRole('slider');
|
||||||
const input = await screen.findByTestId('combo-control-input') as HTMLInputElement;
|
const input = await screen.findByTestId('combo-control-input') as HTMLInputElement;
|
||||||
|
|
||||||
// Input should show initial value
|
// Input should show initial value
|
||||||
@@ -843,7 +843,7 @@ describe('ComboControl Component', () => {
|
|||||||
|
|
||||||
it('letter spacing control with decimal precision', async () => {
|
it('letter spacing control with decimal precision', async () => {
|
||||||
const control = createTestControl(0, { min: -0.1, max: 0.5, step: 0.01 });
|
const control = createTestControl(0, { min: -0.1, max: 0.5, step: 0.01 });
|
||||||
const { container } = render(ComboControl, {
|
const { container: _container } = render(ComboControl, {
|
||||||
control,
|
control,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
import TypographyMenu from './ui/TypographyMenu.svelte';
|
||||||
|
|
||||||
|
export { TypographyMenu };
|
||||||
|
|||||||
Reference in New Issue
Block a user