diff options
| author | Kagami Sascha Rosylight <saschanaz@outlook.com> | 2022-12-12 19:27:47 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-12 19:27:47 +0900 |
| commit | 8211893210812fe02d3a798df05f0434a54dd973 (patch) | |
| tree | 239acddeca94f87668ab2829c3f8d6cd80a2c9ca /packages/client/src/scripts/theme-editor.ts | |
| parent | update deps (diff) | |
| download | sharkey-8211893210812fe02d3a798df05f0434a54dd973.tar.gz sharkey-8211893210812fe02d3a798df05f0434a54dd973.tar.bz2 sharkey-8211893210812fe02d3a798df05f0434a54dd973.zip | |
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
Diffstat (limited to 'packages/client/src/scripts/theme-editor.ts')
| -rw-r--r-- | packages/client/src/scripts/theme-editor.ts | 6 |
1 files changed, 3 insertions, 3 deletions
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; |