use oxfmt instead of prettier

This commit is contained in:
pa
2026-03-13 22:30:12 +09:00
parent 82122a4fab
commit 7b7c1b4568
155 changed files with 3467 additions and 1631 deletions

View File

@@ -511,9 +511,7 @@
}
function handleSelectCustomFont() {
const cssVarValue = getComputedStyle(document.documentElement)
.getPropertyValue('--font-western-primary')
.trim();
const cssVarValue = getComputedStyle(document.documentElement).getPropertyValue('--font-western-primary').trim();
const currentKey = String(appFontFamily.value || APP_FONT_DEFAULT_KEY)
.trim()
.toLowerCase();

View File

@@ -28,7 +28,9 @@ vi.mock('pinia', async (i) => ({ ...(await i()), storeToRefs: (s) => s }));
vi.mock('vue-i18n', () => ({ useI18n: () => ({ t: (k) => k }) }));
vi.mock('../../../../../stores', () => ({
useDiscordPresenceSettingsStore: () => mocks.discordStore,
useAdvancedSettingsStore: () => ({ showVRChatConfig: (...a) => mocks.showVRChatConfig(...a) })
useAdvancedSettingsStore: () => ({
showVRChatConfig: (...a) => mocks.showVRChatConfig(...a)
})
}));
vi.mock('../../SimpleSwitch.vue', () => ({
@@ -56,7 +58,13 @@ describe('DiscordPresenceTab.vue', () => {
const tooltipRow = wrapper
.findAll('div.options-container-item')
.find((node) => node.text().includes('view.settings.discord_presence.discord_presence.enable_tooltip'));
.find((node) =>
node
.text()
.includes(
'view.settings.discord_presence.discord_presence.enable_tooltip'
)
);
await tooltipRow.trigger('click');
expect(mocks.showVRChatConfig).toHaveBeenCalledTimes(1);

View File

@@ -12,7 +12,8 @@ vi.mock('../../WristOverlaySettings.vue', () => ({
vi.mock('../../../dialogs/FeedFiltersDialog.vue', () => ({
default: {
props: ['feedFiltersDialogMode'],
template: '<div data-testid="feed-dialog" :data-mode="feedFiltersDialogMode" />'
template:
'<div data-testid="feed-dialog" :data-mode="feedFiltersDialogMode" />'
}
}));
@@ -22,10 +23,14 @@ describe('WristOverlayTab.vue', () => {
it('sets feed dialog mode to wrist when child emits open-feed-filters', async () => {
const wrapper = mount(WristOverlayTab);
expect(wrapper.get('[data-testid="feed-dialog"]').attributes('data-mode')).toBe('');
expect(
wrapper.get('[data-testid="feed-dialog"]').attributes('data-mode')
).toBe('');
await wrapper.get('[data-testid="open-filters"]').trigger('click');
expect(wrapper.get('[data-testid="feed-dialog"]').attributes('data-mode')).toBe('wrist');
expect(
wrapper.get('[data-testid="feed-dialog"]').attributes('data-mode')
).toBe('wrist');
});
});

View File

@@ -25,7 +25,9 @@ describe('SimpleSwitch.vue', () => {
},
global: {
stubs: {
TooltipWrapper: { template: '<span data-testid="tooltip"><slot /></span>' }
TooltipWrapper: {
template: '<span data-testid="tooltip"><slot /></span>'
}
}
}
});
@@ -45,13 +47,19 @@ describe('SimpleSwitch.vue', () => {
},
global: {
stubs: {
TooltipWrapper: { template: '<span data-testid="tooltip"><slot /></span>' }
TooltipWrapper: {
template: '<span data-testid="tooltip"><slot /></span>'
}
}
}
});
expect(wrapper.get('.name').attributes('style')).toContain('width: 300px');
expect(wrapper.get('.name').attributes('style')).toContain(
'width: 300px'
);
expect(wrapper.find('[data-testid="tooltip"]').exists()).toBe(true);
expect(wrapper.get('[data-testid="switch"]').attributes('data-disabled')).toBe('true');
expect(
wrapper.get('[data-testid="switch"]').attributes('data-disabled')
).toBe('true');
});
});

View File

@@ -39,7 +39,9 @@ vi.mock('vue-i18n', () => ({ useI18n: () => ({ t: (k) => k }) }));
vi.mock('../../../../stores', () => ({
useNotificationsSettingsStore: () => mocks.notificationsStore,
useWristOverlaySettingsStore: () => mocks.wristStore,
useVrStore: () => ({ saveOpenVROption: (...a) => mocks.saveOpenVROption(...a) })
useVrStore: () => ({
saveOpenVROption: (...a) => mocks.saveOpenVROption(...a)
})
}));
vi.mock('@/components/ui/button', () => ({