From 8211893210812fe02d3a798df05f0434a54dd973 Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Mon, 12 Dec 2022 19:27:47 +0900 Subject: Fix lint errors (except `@typescript-eslint/prefer-nullish-coalescing`) (#9311) * `yarn workspace client run lint --fix` * `eslint-disable-next-line no-var` for service worker self * A few more manual sw fixes * word change --- packages/client/src/scripts/theme-editor.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'packages/client/src/scripts/theme-editor.ts') diff --git a/packages/client/src/scripts/theme-editor.ts b/packages/client/src/scripts/theme-editor.ts index 2c917e280d..6d88d6856c 100644 --- a/packages/client/src/scripts/theme-editor.ts +++ b/packages/client/src/scripts/theme-editor.ts @@ -54,7 +54,7 @@ export const toThemeString = (value: Color | Func | RefProp | RefConst | Css) => export const convertToMisskeyTheme = (vm: ThemeViewModel, name: string, desc: string, author: string, base: 'dark' | 'light'): Theme => { const props = { } as { [key: string]: string }; - for (const [ key, value ] of vm) { + for (const [key, value] of vm) { if (value === null) continue; props[key] = toThemeString(value); } @@ -68,13 +68,13 @@ export const convertToMisskeyTheme = (vm: ThemeViewModel, name: string, desc: st export const convertToViewModel = (theme: Theme): ThemeViewModel => { const vm: ThemeViewModel = []; // プロパティの登録 - vm.push(...themeProps.map(key => [ key, fromThemeString(theme.props[key])] as [ string, ThemeValue ])); + vm.push(...themeProps.map(key => [key, fromThemeString(theme.props[key])] as [ string, ThemeValue ])); // 定数の登録 const consts = Object .keys(theme.props) .filter(k => k.startsWith('$')) - .map(k => [ k, fromThemeString(theme.props[k]) ] as [ string, ThemeValue ]); + .map(k => [k, fromThemeString(theme.props[k])] as [ string, ThemeValue ]); vm.push(...consts); return vm; -- cgit v1.2.3-freya