generated from Seekra/repository-template
style: remove unnecessary semicolons after blocks
This commit is contained in:
@@ -18,5 +18,5 @@ export class FetchError extends Error {
|
||||
constructor (message) {
|
||||
super(message);
|
||||
this.name = 'FetchError';
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
@@ -33,7 +33,7 @@ const submitSearch = function () {
|
||||
name: 'searchResults',
|
||||
query: { q: searchQuery.value }
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -31,12 +31,12 @@ export const getSettingRecursively = function getSettingRecursively (sectionPath
|
||||
return oneSettingsLevel(cursor.slice(1, cursor.length), setting);
|
||||
} else {
|
||||
return setting;
|
||||
};
|
||||
}
|
||||
} else if (cursor.length <= 1) {
|
||||
return setting;
|
||||
} else {
|
||||
return;
|
||||
};
|
||||
}
|
||||
};
|
||||
return oneSettingsLevel(sectionPath, { content: settings });
|
||||
};
|
||||
|
||||
@@ -33,7 +33,7 @@ export const assertType = function assertType (value, path) {
|
||||
export const validateSelectionOptions = function validateSelectionOptions (options, path) {
|
||||
if (!Array.isArray(options) || options.length === 0) {
|
||||
throw new Error(`[settings] "${path}.options" must be a non-empty array`);
|
||||
};
|
||||
}
|
||||
options.forEach((opt, i) => {
|
||||
assertString(opt.name, `${path}.options[${i}].name`);
|
||||
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) {
|
||||
throw new Error(`[settings] "${path}.allowMultiple" must be a boolean`);
|
||||
}
|
||||
};
|
||||
}
|
||||
if (entry.default !== undefined) {
|
||||
if (entry.type === 'bool' && typeof entry.default !== 'boolean') {
|
||||
throw new Error(`[settings] "${path}.default" must be a boolean`);
|
||||
@@ -89,12 +89,12 @@ export const validateEntry = function validateEntry (entry, path) {
|
||||
} else {
|
||||
if (typeof entry.default !== 'string') {
|
||||
throw new Error(`[settings] "${path}.default" must be a string`);
|
||||
};
|
||||
}
|
||||
if (!entry.options.map((option) => option.name).includes(entry.default)) {
|
||||
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)) {
|
||||
throw new Error(`[settings] "${path}.content" must be an array`);
|
||||
};
|
||||
}
|
||||
|
||||
section.content.forEach((entry, i) =>
|
||||
validateEntry(entry, `${path}.content[${i}]`)
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ export async function loadLanguage (locale) {
|
||||
if (loadedLanguages.has(locale)) {
|
||||
i18n.global.locale.value = locale;
|
||||
return;
|
||||
};
|
||||
}
|
||||
|
||||
const messages = (await import(`./locales/${locale}.json`)).default;
|
||||
|
||||
|
||||
+2
-2
@@ -78,7 +78,7 @@ export const updatePageTitle = function updatePageTitle (route) {
|
||||
document.title = `${title} - Seekra`;
|
||||
} else {
|
||||
document.title = 'Seekra';
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
// remove trailing slash(es)
|
||||
@@ -90,7 +90,7 @@ router.beforeEach((route) => {
|
||||
hash: route.hash,
|
||||
replace: true
|
||||
};
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
export default router;
|
||||
|
||||
@@ -25,7 +25,7 @@ export const ensureUnit = function (d) {
|
||||
// if it ends with a number
|
||||
if (/\d$/.test(d)) {
|
||||
d += 'px';
|
||||
};
|
||||
}
|
||||
|
||||
return d;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user