Enable ESLint no-unused-expressions rule (#4363)

# Description of Changes
Enable ESLint [no-unused-expressions
rule](https://typescript-eslint.io/rules/no-unused-expressions/)
This commit is contained in:
James Brunton
2025-09-04 16:12:38 +01:00
committed by GitHub
parent 74609e54fe
commit 94e8f603ff
3 changed files with 6 additions and 4 deletions

View File

@@ -126,7 +126,7 @@ const ToolSearch = ({
key={id}
variant="subtle"
onClick={() => {
onToolSelect && onToolSelect(id);
onToolSelect?.(id);
setDropdownOpen(false);
}}
leftSection={<div style={{ color: "var(--tools-text-and-icon-color)" }}>{tool.icon}</div>}

View File

@@ -35,8 +35,11 @@ function updatePosthogConsent(){
return;
}
const optIn = (window.CookieConsent as any).acceptedCategory('analytics');
optIn?
posthog.opt_in_capturing() : posthog.opt_out_capturing();
if (optIn) {
posthog.opt_in_capturing();
} else {
posthog.opt_out_capturing();
}
console.log("Updated analytics consent: ", optIn? "opted in" : "opted out");
}