generated from Seekra/repository-template
style: ensure function expressions
Replaced all function statements with function expressions.
This commit is contained in:
@@ -116,7 +116,7 @@ export const validateFirstLevelSection = function validateFirstLevelSection(sect
|
|||||||
* @param {unknown} raw
|
* @param {unknown} raw
|
||||||
* @returns {{ valid: true, config: import('../types/settingsConfig').SettingsConfig } | { valid: false, error: string }}
|
* @returns {{ valid: true, config: import('../types/settingsConfig').SettingsConfig } | { valid: false, error: string }}
|
||||||
*/
|
*/
|
||||||
export function validateSettingsConfig(raw) {
|
export const validateSettingsConfig = function validateSettingsConfig(raw) {
|
||||||
if (!raw || typeof raw !== 'object') {
|
if (!raw || typeof raw !== 'object') {
|
||||||
throw new Error('[settings] Config must be an object');
|
throw new Error('[settings] Config must be an object');
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -40,7 +40,7 @@ export const i18n = createI18n({
|
|||||||
|
|
||||||
const loadedLanguages = new Set();
|
const loadedLanguages = new Set();
|
||||||
|
|
||||||
export async function loadLanguage(locale) {
|
export const loadLanguage = async function loadLanguage(locale) {
|
||||||
if (!SUPPORTED_LANGUAGES.includes(locale)) {
|
if (!SUPPORTED_LANGUAGES.includes(locale)) {
|
||||||
locale = fallbackLocale;
|
locale = fallbackLocale;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user