generated from Seekra/repository-template
style: ensure semicolons at line ends
This commit is contained in:
+1
-1
@@ -46,7 +46,7 @@ const updateColorScheme = function updateColorScheme (newColorScheme) {
|
||||
} else {
|
||||
document.body.classList.remove('color-scheme-auto');
|
||||
}
|
||||
}
|
||||
};
|
||||
watch(colorScheme, (newColorScheme) => {
|
||||
updateColorScheme(newColorScheme);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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}]`)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
+5
-5
@@ -15,14 +15,14 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
import { getAssetsUrl } from './config/env';
|
||||
import { createApp } from 'vue'
|
||||
import { createApp } from 'vue';
|
||||
import { createPinia } from 'pinia';
|
||||
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
|
||||
import App from './App.vue'
|
||||
import App from './App.vue';
|
||||
import { i18n, loadLanguage, fallbackLocale } from './i18n';
|
||||
import router from './router'
|
||||
import './styles/common.css'
|
||||
import './styles/variables/colors.css'
|
||||
import router from './router';
|
||||
import './styles/common.css';
|
||||
import './styles/variables/colors.css';
|
||||
import './styles/variables/dimensions.css';
|
||||
|
||||
import rawFonts from './styles/fonts.json';
|
||||
|
||||
+3
-3
@@ -14,8 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import { defineConfig } from 'vite';
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
import path from 'path';
|
||||
import { createHtmlPlugin } from 'vite-plugin-html';
|
||||
|
||||
@@ -39,4 +39,4 @@ export default defineConfig({
|
||||
globals: false,
|
||||
environment: 'jsdom'
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user