update prettier
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-02-23 14:23:46 +01:00
parent 33d1425fbb
commit cbabf43584
25 changed files with 1373 additions and 1363 deletions

View File

@@ -3,5 +3,5 @@
"singleQuote": true, "singleQuote": true,
"semi": true, "semi": true,
"printWidth": 100, "printWidth": 100,
"tabWidth": 2 "tabWidth": 4
} }

View File

@@ -65,7 +65,11 @@ export function usePaginatedResource<TItem>({
setPageSize(response.pageSize); setPageSize(response.pageSize);
} catch (err) { } catch (err) {
if (!cancelled) { if (!cancelled) {
setError(err instanceof Error ? err.message : 'Request failed. Please try again.'); setError(
err instanceof Error
? err.message
: 'Request failed. Please try again.',
);
} }
} finally { } finally {
if (!cancelled) { if (!cancelled) {

View File

@@ -76,7 +76,11 @@ export function useValidatedFields<TValues extends Record<string, string>>({
); );
const setFieldValue = useCallback( const setFieldValue = useCallback(
<K extends keyof TValues>(key: K, value: TValues[K], options: SetFieldValueOptions = {}) => { <K extends keyof TValues>(
key: K,
value: TValues[K],
options: SetFieldValueOptions = {},
) => {
const { validate: shouldValidate = true, touch = true } = options; const { validate: shouldValidate = true, touch = true } = options;
if (touch) { if (touch) {

View File

@@ -26,7 +26,9 @@ const toTitleCase = (s: string) =>
.trim() .trim()
.toLowerCase() .toLowerCase()
.split(/\s+/) .split(/\s+/)
.map((w) => (/^[A-Z]{2,4}$/.test(w) ? w : w.charAt(0).toUpperCase() + w.slice(1).toLowerCase())) .map((w) =>
/^[A-Z]{2,4}$/.test(w) ? w : w.charAt(0).toUpperCase() + w.slice(1).toLowerCase(),
)
.join(' '); .join(' ');
const splitUnderscoreHyphen = (s: string) => s.replaceAll(/[_-]+/g, ' '); const splitUnderscoreHyphen = (s: string) => s.replaceAll(/[_-]+/g, ' ');