From cefc0c0f4e2ade272d0b37835515178504329e5b Mon Sep 17 00:00:00 2001 From: Andrew Michael McNutt Date: Thu, 29 Feb 2024 15:06:18 -0800 Subject: [PATCH] ui tweak --- src/linting/Eval.svelte | 17 ++++++++++++++++- ...Modal.svelte => LintCustomizationTab.svelte} | 0 2 files changed, 16 insertions(+), 1 deletion(-) rename src/linting/{LintCustomizationModal.svelte => LintCustomizationTab.svelte} (100%) diff --git a/src/linting/Eval.svelte b/src/linting/Eval.svelte index d0f438d7..74a2718a 100644 --- a/src/linting/Eval.svelte +++ b/src/linting/Eval.svelte @@ -6,7 +6,7 @@ import { lint } from "../lib/api-calls"; import { buttonStyle } from "../lib/styles"; import LintDisplay from "./LintDisplay.svelte"; - import LintCustomizationModal from "./LintCustomizationModal.svelte"; + import LintCustomizationModal from "./LintCustomizationTab.svelte"; import Nav from "../components/Nav.svelte"; import NewLintSuggestion from "./NewLintSuggestion.svelte"; import { titleCase } from "../lib/utils"; @@ -59,6 +59,21 @@ tabs={["regular", "compact", "lint-customization"]} isTabSelected={(x) => x === displayMode} selectTab={(x) => { + // TODO: maybe need to update the lints on change? + if (displayMode === "lint-customization") { + const outPal = { + ...currentPal, + evalConfig: { + ...currentPal.evalConfig, + globallyIgnoredLints: $lintStore.globallyIgnoredLints, + }, + }; + loadLints() + .then(() => lint(outPal, false)) + .then((res) => { + checks = res; + }); + } //@ts-ignore configStore.setEvalDisplayMode(x); }} diff --git a/src/linting/LintCustomizationModal.svelte b/src/linting/LintCustomizationTab.svelte similarity index 100% rename from src/linting/LintCustomizationModal.svelte rename to src/linting/LintCustomizationTab.svelte