From 47925e394d8c22baf90c09bdef3da87ddaad4025 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 13 Mar 2024 16:20:18 +0000 Subject: [PATCH] Lint and remove outdated comment --- .../src/components/common/bindings/BindingSidePanel.svelte | 2 -- .../src/components/common/bindings/SnippetDrawer.svelte | 6 ------ 2 files changed, 8 deletions(-) diff --git a/packages/builder/src/components/common/bindings/BindingSidePanel.svelte b/packages/builder/src/components/common/bindings/BindingSidePanel.svelte index 4c54ef2698..f364b39ba9 100644 --- a/packages/builder/src/components/common/bindings/BindingSidePanel.svelte +++ b/packages/builder/src/components/common/bindings/BindingSidePanel.svelte @@ -3,7 +3,6 @@ import { convertToJS } from "@budibase/string-templates" import { Input, Layout, Icon, Popover } from "@budibase/bbui" import { handlebarsCompletions } from "constants/completions" - import { tick } from "svelte" export let addHelper export let addBinding @@ -154,7 +153,6 @@ -
{#if selectedCategory} diff --git a/packages/builder/src/components/common/bindings/SnippetDrawer.svelte b/packages/builder/src/components/common/bindings/SnippetDrawer.svelte index a8973c753b..d6b6f92b17 100644 --- a/packages/builder/src/components/common/bindings/SnippetDrawer.svelte +++ b/packages/builder/src/components/common/bindings/SnippetDrawer.svelte @@ -59,12 +59,6 @@ loading = false } - // Validating function names is not as easy as you think. A simple regex does - // not work, as there are a bunch of reserved words. The correct regex for - // this is about 12K characters long. - // Instead, we can run a simple regex to roughly validate it, then basically - // try executing it and see if it's valid JS. The initial regex prevents - // against any potential XSS attacks here. const validateName = (name, snippets) => { if (!name?.length) { return "Name is required"