style: remove unnecessary semicolons after blocks

This commit is contained in:
2026-08-07 16:58:19 +02:00
parent 636f3c4be8
commit 203d222dc9
7 changed files with 14 additions and 14 deletions
+1 -1
View File
@@ -18,5 +18,5 @@ export class FetchError extends Error {
constructor (message) { constructor (message) {
super(message); super(message);
this.name = 'FetchError'; this.name = 'FetchError';
}; }
}; };
+1 -1
View File
@@ -33,7 +33,7 @@ const submitSearch = function () {
name: 'searchResults', name: 'searchResults',
query: { q: searchQuery.value } query: { q: searchQuery.value }
}); });
}; }
}; };
</script> </script>
+2 -2
View File
@@ -31,12 +31,12 @@ export const getSettingRecursively = function getSettingRecursively (sectionPath
return oneSettingsLevel(cursor.slice(1, cursor.length), setting); return oneSettingsLevel(cursor.slice(1, cursor.length), setting);
} else { } else {
return setting; return setting;
}; }
} else if (cursor.length <= 1) { } else if (cursor.length <= 1) {
return setting; return setting;
} else { } else {
return; return;
}; }
}; };
return oneSettingsLevel(sectionPath, { content: settings }); return oneSettingsLevel(sectionPath, { content: settings });
}; };
@@ -33,7 +33,7 @@ export const assertType = function assertType (value, path) {
export const validateSelectionOptions = function validateSelectionOptions (options, path) { export const validateSelectionOptions = function validateSelectionOptions (options, path) {
if (!Array.isArray(options) || options.length === 0) { if (!Array.isArray(options) || options.length === 0) {
throw new Error(`[settings] "${path}.options" must be a non-empty array`); throw new Error(`[settings] "${path}.options" must be a non-empty array`);
}; }
options.forEach((opt, i) => { options.forEach((opt, i) => {
assertString(opt.name, `${path}.options[${i}].name`); assertString(opt.name, `${path}.options[${i}].name`);
assertString(opt.i18n, `${path}.options[${i}].i18n`); assertString(opt.i18n, `${path}.options[${i}].i18n`);
@@ -61,7 +61,7 @@ export const validateEntry = function validateEntry (entry, path) {
if (typeof entry.allowMultiple !== 'boolean' && entry.allowMultiple) { if (typeof entry.allowMultiple !== 'boolean' && entry.allowMultiple) {
throw new Error(`[settings] "${path}.allowMultiple" must be a boolean`); throw new Error(`[settings] "${path}.allowMultiple" must be a boolean`);
} }
}; }
if (entry.default !== undefined) { if (entry.default !== undefined) {
if (entry.type === 'bool' && typeof entry.default !== 'boolean') { if (entry.type === 'bool' && typeof entry.default !== 'boolean') {
throw new Error(`[settings] "${path}.default" must be a boolean`); throw new Error(`[settings] "${path}.default" must be a boolean`);
@@ -89,12 +89,12 @@ export const validateEntry = function validateEntry (entry, path) {
} else { } else {
if (typeof entry.default !== 'string') { if (typeof entry.default !== 'string') {
throw new Error(`[settings] "${path}.default" must be a string`); throw new Error(`[settings] "${path}.default" must be a string`);
}; }
if (!entry.options.map((option) => option.name).includes(entry.default)) { if (!entry.options.map((option) => option.name).includes(entry.default)) {
throw new Error(`[settings] option "${path}.default" does not exist`); throw new Error(`[settings] option "${path}.default" does not exist`);
}; }
} }
}; }
} }
}; };
@@ -104,7 +104,7 @@ export const validateFirstLevelSection = function validateFirstLevelSection (sec
if (!Array.isArray(section.content)) { if (!Array.isArray(section.content)) {
throw new Error(`[settings] "${path}.content" must be an array`); throw new Error(`[settings] "${path}.content" must be an array`);
}; }
section.content.forEach((entry, i) => section.content.forEach((entry, i) =>
validateEntry(entry, `${path}.content[${i}]`) validateEntry(entry, `${path}.content[${i}]`)
+1 -1
View File
@@ -48,7 +48,7 @@ export async function loadLanguage (locale) {
if (loadedLanguages.has(locale)) { if (loadedLanguages.has(locale)) {
i18n.global.locale.value = locale; i18n.global.locale.value = locale;
return; return;
}; }
const messages = (await import(`./locales/${locale}.json`)).default; const messages = (await import(`./locales/${locale}.json`)).default;
+2 -2
View File
@@ -78,7 +78,7 @@ export const updatePageTitle = function updatePageTitle (route) {
document.title = `${title} - Seekra`; document.title = `${title} - Seekra`;
} else { } else {
document.title = 'Seekra'; document.title = 'Seekra';
}; }
}; };
// remove trailing slash(es) // remove trailing slash(es)
@@ -90,7 +90,7 @@ router.beforeEach((route) => {
hash: route.hash, hash: route.hash,
replace: true replace: true
}; };
}; }
}); });
export default router; export default router;
+1 -1
View File
@@ -25,7 +25,7 @@ export const ensureUnit = function (d) {
// if it ends with a number // if it ends with a number
if (/\d$/.test(d)) { if (/\d$/.test(d)) {
d += 'px'; d += 'px';
}; }
return d; return d;
}; };