style: ensure semicolons at line ends

This commit is contained in:
2026-08-09 13:09:39 +02:00
committed by Gitea
parent 18ba0f2a70
commit dc60b968e7
14 changed files with 33 additions and 33 deletions
@@ -21,7 +21,7 @@ import { describe, expect, test } from 'vitest';
const { getSetting } = useSettings();
const colorSchemeSettingPath = ['appearance', 'colorScheme']
const colorSchemeSettingPath = ['appearance', 'colorScheme'];
const getWrapper = function getWrapper () {
return mountComponent(ColorSchemeButton);
+3 -3
View File
@@ -21,13 +21,13 @@ import { useI18n } from 'vue-i18n';
const { t } = useI18n();
const startYear = 2026
const currentYear = new Date().getFullYear()
const startYear = 2026;
const currentYear = new Date().getFullYear();
const copyrightPeriod =
startYear === currentYear
? `${currentYear}`
: `${startYear}-${currentYear}`
: `${startYear}-${currentYear}`;
</script>
+4 -4
View File
@@ -27,16 +27,16 @@ const props = defineProps({
type: [Number, String],
default: 24
}
})
});
const icons = import.meta.glob('@/assets/icons/*.svg', {
eager: true,
import: 'default'
})
});
const Icon = computed(() => icons[`/src/assets/icons/${props.name}.svg`])
const Icon = computed(() => icons[`/src/assets/icons/${props.name}.svg`]);
const size = computed(() => ensureUnit(props.size))
const size = computed(() => ensureUnit(props.size));
</script>
<template>
@@ -97,7 +97,7 @@ describe('fetchLegalContent', () => {
test('throws FetchError on HTTP error', async () => {
fetchSpy.mockResolvedValue(
new Response(null, { status: 404 })
)
);
await expect(getLegalNotice()).rejects.toThrow(FetchError);
});
+3 -3
View File
@@ -24,8 +24,8 @@ import { useI18n } from 'vue-i18n';
const { t } = useI18n();
const router = useRouter()
const props = defineProps(['autoSubmit'])
const router = useRouter();
const props = defineProps(['autoSubmit']);
const submitSearch = function () {
if (props.autoSubmit !== undefined) {
@@ -34,7 +34,7 @@ const submitSearch = function () {
query: { q: searchQuery.value }
});
};
}
};
</script>
<template>
@@ -237,7 +237,7 @@ describe('Selection', () => {
const inputO2 = inputs[2];
await check(inputO0);
expectSelectionValue(['o0'])
expectSelectionValue(['o0']);
await uncheck(inputO0);
expectSelectionValue([]);
@@ -32,7 +32,7 @@ const getWrapper = function getWrapper({ type = 'string', i18n = 'input', defaul
path: 'input'
}
}, {}, [], piniaOptions);
}
};
describe('SettingsInput', () => {
test('uses correct input type', () => {
@@ -117,7 +117,7 @@ describe('Switch', () => {
const wrapper = getWrapper({
translations: { switch1: translation }
})
});
const label = wrapper.find('label');
expect(label.text()).toBe(translation);
@@ -59,5 +59,5 @@ describe('settingsPage', () => {
])('returns $expected', async ({ path, expected }) => {
expect(getSettingsPagePathSegments(path)).toStrictEqual(expected);
});
})
})
});
});
@@ -527,8 +527,8 @@ describe('settingsValidator', () => {
]
} }
])('throws error', ({ settings }) => {
expect(() => validateSettingsConfig(settings)).toThrow(Error)
})
expect(() => validateSettingsConfig(settings)).toThrow(Error);
});
});
describe('validateEntry', () => {
@@ -20,7 +20,7 @@ export const assertString = function assertString (value, path) {
if (typeof value !== 'string' || value.trim() === '') {
throw new Error(`[settings] "${path}" must be a non-empty string`);
}
}
};
export const assertType = function assertType (value, path) {
if (!VALID_TYPES.includes(value)) {
@@ -28,7 +28,7 @@ export const assertType = function assertType (value, path) {
`[settings] "${path}" has invalid type "${value}". Must be one of: ${VALID_TYPES.join(', ')}`
);
}
}
};
export const validateSelectionOptions = function validateSelectionOptions (options, path) {
if (!Array.isArray(options) || options.length === 0) {
@@ -38,7 +38,7 @@ export const validateSelectionOptions = function validateSelectionOptions (optio
assertString(opt.name, `${path}.options[${i}].name`);
assertString(opt.i18n, `${path}.options[${i}].i18n`);
});
}
};
export const validateEntry = function validateEntry (entry, path) {
assertType(entry.type, `${path}.type`);
@@ -96,7 +96,7 @@ export const validateEntry = function validateEntry (entry, path) {
}
};
}
}
};
export const validateFirstLevelSection = function validateFirstLevelSection (section, path) {
assertString(section.name);
@@ -126,4 +126,4 @@ export function validateSettingsConfig(raw) {
raw.contents.forEach((entry, i) =>
validateFirstLevelSection(entry, `contents[${i}]`)
);
}
};