style: ensure semicolons at line ends

This commit is contained in:
2026-08-07 16:58:15 +02:00
parent 05cf1df307
commit 977560ae7c
13 changed files with 32 additions and 32 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ const updateColorScheme = function updateColorScheme (newColorScheme) {
} else { } else {
document.body.classList.remove('color-scheme-auto'); document.body.classList.remove('color-scheme-auto');
} }
} };
watch(colorScheme, (newColorScheme) => { watch(colorScheme, (newColorScheme) => {
updateColorScheme(newColorScheme); updateColorScheme(newColorScheme);
}); });
@@ -21,7 +21,7 @@ import { describe, expect, test } from 'vitest';
const { getSetting } = useSettings(); const { getSetting } = useSettings();
const colorSchemeSettingPath = ['appearance', 'colorScheme'] const colorSchemeSettingPath = ['appearance', 'colorScheme'];
const getWrapper = function getWrapper () { const getWrapper = function getWrapper () {
return mountComponent(ColorSchemeButton); return mountComponent(ColorSchemeButton);
+3 -3
View File
@@ -21,13 +21,13 @@ import { useI18n } from 'vue-i18n';
const { t } = useI18n(); const { t } = useI18n();
const startYear = 2026 const startYear = 2026;
const currentYear = new Date().getFullYear() const currentYear = new Date().getFullYear();
const copyrightPeriod = const copyrightPeriod =
startYear === currentYear startYear === currentYear
? `${currentYear}` ? `${currentYear}`
: `${startYear}-${currentYear}` : `${startYear}-${currentYear}`;
</script> </script>
+4 -4
View File
@@ -27,16 +27,16 @@ const props = defineProps({
type: [Number, String], type: [Number, String],
default: 24 default: 24
} }
}) });
const icons = import.meta.glob('@/assets/icons/*.svg', { const icons = import.meta.glob('@/assets/icons/*.svg', {
eager: true, eager: true,
import: 'default' 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> </script>
<template> <template>
+3 -3
View File
@@ -24,8 +24,8 @@ import { useI18n } from 'vue-i18n';
const { t } = useI18n(); const { t } = useI18n();
const router = useRouter() const router = useRouter();
const props = defineProps(['autoSubmit']) const props = defineProps(['autoSubmit']);
const submitSearch = function () { const submitSearch = function () {
if (props.autoSubmit !== undefined) { if (props.autoSubmit !== undefined) {
@@ -34,7 +34,7 @@ const submitSearch = function () {
query: { q: searchQuery.value } query: { q: searchQuery.value }
}); });
}; };
} };
</script> </script>
<template> <template>
@@ -237,7 +237,7 @@ describe('Selection', () => {
const inputO2 = inputs[2]; const inputO2 = inputs[2];
await check(inputO0); await check(inputO0);
expectSelectionValue(['o0']) expectSelectionValue(['o0']);
await uncheck(inputO0); await uncheck(inputO0);
expectSelectionValue([]); expectSelectionValue([]);
@@ -32,7 +32,7 @@ const getWrapper = function getWrapper({ type = 'string', i18n = 'input', defaul
path: 'input' path: 'input'
} }
}, {}, [], piniaOptions); }, {}, [], piniaOptions);
} };
describe('SettingsInput', () => { describe('SettingsInput', () => {
test('uses correct input type', () => { test('uses correct input type', () => {
@@ -117,7 +117,7 @@ describe('Switch', () => {
const wrapper = getWrapper({ const wrapper = getWrapper({
translations: { switch1: translation } translations: { switch1: translation }
}) });
const label = wrapper.find('label'); const label = wrapper.find('label');
expect(label.text()).toBe(translation); expect(label.text()).toBe(translation);
@@ -59,5 +59,5 @@ describe('settingsPage', () => {
])('returns $expected', async ({ path, expected }) => { ])('returns $expected', async ({ path, expected }) => {
expect(getSettingsPagePathSegments(path)).toStrictEqual(expected); expect(getSettingsPagePathSegments(path)).toStrictEqual(expected);
}); });
}) });
}) });
@@ -527,8 +527,8 @@ describe('settingsValidator', () => {
] ]
} } } }
])('throws error', ({ settings }) => { ])('throws error', ({ settings }) => {
expect(() => validateSettingsConfig(settings)).toThrow(Error) expect(() => validateSettingsConfig(settings)).toThrow(Error);
}) });
}); });
describe('validateEntry', () => { describe('validateEntry', () => {
@@ -20,7 +20,7 @@ export const assertString = function assertString (value, path) {
if (typeof value !== 'string' || value.trim() === '') { if (typeof value !== 'string' || value.trim() === '') {
throw new Error(`[settings] "${path}" must be a non-empty string`); throw new Error(`[settings] "${path}" must be a non-empty string`);
} }
} };
export const assertType = function assertType (value, path) { export const assertType = function assertType (value, path) {
if (!VALID_TYPES.includes(value)) { 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(', ')}` `[settings] "${path}" has invalid type "${value}". Must be one of: ${VALID_TYPES.join(', ')}`
); );
} }
} };
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) {
@@ -38,7 +38,7 @@ export const validateSelectionOptions = function validateSelectionOptions (optio
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`);
}); });
} };
export const validateEntry = function validateEntry (entry, path) { export const validateEntry = function validateEntry (entry, path) {
assertType(entry.type, `${path}.type`); assertType(entry.type, `${path}.type`);
@@ -96,7 +96,7 @@ export const validateEntry = function validateEntry (entry, path) {
} }
}; };
} }
} };
export const validateFirstLevelSection = function validateFirstLevelSection (section, path) { export const validateFirstLevelSection = function validateFirstLevelSection (section, path) {
assertString(section.name); assertString(section.name);
@@ -126,4 +126,4 @@ export function validateSettingsConfig(raw) {
raw.contents.forEach((entry, i) => raw.contents.forEach((entry, i) =>
validateFirstLevelSection(entry, `contents[${i}]`) validateFirstLevelSection(entry, `contents[${i}]`)
); );
} };
+5 -5
View File
@@ -15,14 +15,14 @@ limitations under the License.
*/ */
import { getAssetsUrl } from './config/env'; import { getAssetsUrl } from './config/env';
import { createApp } from 'vue' import { createApp } from 'vue';
import { createPinia } from 'pinia'; import { createPinia } from 'pinia';
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'; import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
import App from './App.vue' import App from './App.vue';
import { i18n, loadLanguage, fallbackLocale } from './i18n'; import { i18n, loadLanguage, fallbackLocale } from './i18n';
import router from './router' import router from './router';
import './styles/common.css' import './styles/common.css';
import './styles/variables/colors.css' import './styles/variables/colors.css';
import './styles/variables/dimensions.css'; import './styles/variables/dimensions.css';
import rawFonts from './styles/fonts.json'; import rawFonts from './styles/fonts.json';
+3 -3
View File
@@ -14,8 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import { defineConfig } from 'vite' import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue' import vue from '@vitejs/plugin-vue';
import path from 'path'; import path from 'path';
import { createHtmlPlugin } from 'vite-plugin-html'; import { createHtmlPlugin } from 'vite-plugin-html';
@@ -39,4 +39,4 @@ export default defineConfig({
globals: false, globals: false,
environment: 'jsdom' environment: 'jsdom'
} }
}) });