style(project): format Go with gofmt, set up Prettier for the frontend
Run gofmt -w across the backend, normalising the manually-aligned := blocks to the gofmt standard. No code behaviour changes. Add Prettier (+ prettier-plugin-svelte) to the frontend with the SvelteKit default config (tabs, single quotes) so formatting is reproducible, then run it over the whole tree. Add format / format:check npm scripts and a .prettierignore (build output, generated schema.ts, static assets). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,7 @@ export interface AppSettings {
|
||||
|
||||
const DEFAULTS: AppSettings = {
|
||||
fileLoadLimit: 100,
|
||||
tagRuleApplyToExisting: false,
|
||||
tagRuleApplyToExisting: false
|
||||
};
|
||||
|
||||
function load(): AppSettings {
|
||||
@@ -25,4 +25,4 @@ export const appSettings = writable<AppSettings>(load());
|
||||
|
||||
appSettings.subscribe((v) => {
|
||||
if (browser) localStorage.setItem('app-settings', JSON.stringify(v));
|
||||
});
|
||||
});
|
||||
|
||||
@@ -31,4 +31,4 @@ authStore.subscribe((state) => {
|
||||
}
|
||||
});
|
||||
|
||||
export const isAuthenticated = derived(authStore, ($auth) => !!$auth.accessToken);
|
||||
export const isAuthenticated = derived(authStore, ($auth) => !!$auth.accessToken);
|
||||
|
||||
@@ -8,7 +8,7 @@ interface SelectionState {
|
||||
function createSelectionStore() {
|
||||
const { subscribe, update, set } = writable<SelectionState>({
|
||||
active: false,
|
||||
ids: new Set(),
|
||||
ids: new Set()
|
||||
});
|
||||
|
||||
return {
|
||||
@@ -55,11 +55,11 @@ function createSelectionStore() {
|
||||
|
||||
clear() {
|
||||
set({ active: false, ids: new Set() });
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export const selectionStore = createSelectionStore();
|
||||
|
||||
export const selectionCount = derived(selectionStore, ($s) => $s.ids.size);
|
||||
export const selectionActive = derived(selectionStore, ($s) => $s.active);
|
||||
export const selectionActive = derived(selectionStore, ($s) => $s.active);
|
||||
|
||||
@@ -29,30 +29,30 @@ function makeSortStore<F extends string>(key: string, defaults: SortState<F>) {
|
||||
},
|
||||
toggleOrder() {
|
||||
store.update((s) => ({ ...s, order: s.order === 'asc' ? 'desc' : 'asc' }));
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export const fileSorting = makeSortStore<FileSortField>('sort:files', {
|
||||
sort: 'created',
|
||||
order: 'desc',
|
||||
order: 'desc'
|
||||
});
|
||||
|
||||
export const tagSorting = makeSortStore<TagSortField>('sort:tags', {
|
||||
sort: 'created',
|
||||
order: 'desc',
|
||||
order: 'desc'
|
||||
});
|
||||
|
||||
export type CategorySortField = 'name' | 'color' | 'created';
|
||||
|
||||
export const categorySorting = makeSortStore<CategorySortField>('sort:categories', {
|
||||
sort: 'name',
|
||||
order: 'asc',
|
||||
order: 'asc'
|
||||
});
|
||||
|
||||
export type PoolSortField = 'name' | 'created';
|
||||
|
||||
export const poolSorting = makeSortStore<PoolSortField>('sort:pools', {
|
||||
sort: 'created',
|
||||
order: 'desc',
|
||||
});
|
||||
order: 'desc'
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user