CODEBASE: Fix lint errors 3 (#1758)

This is a really big refactor because it actually *fixes* a lot of the lint errors instead of disabling them.
This commit is contained in:
catloversg
2024-11-14 23:18:57 +07:00
committed by GitHub
parent 97ca8c5f5e
commit 75cf9c88b5
31 changed files with 187 additions and 51 deletions
+4 -1
View File
@@ -79,7 +79,10 @@ export const sanitizeTheme = (theme: IScriptEditorTheme): void => {
return;
}
for (const themeKey of getRecordKeys(theme)) {
if (typeof theme[themeKey] !== "object") delete theme[themeKey];
if (typeof theme[themeKey] !== "object") {
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
delete theme[themeKey];
}
switch (themeKey) {
case "base":
if (!["vs-dark", "vs"].includes(theme.base)) theme.base = "vs-dark";