diff options
author | Vendicated <vendicated@riseup.net> | 2022-10-20 11:58:20 +0200 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2022-10-20 11:58:20 +0200 |
commit | 36f4478a4f10cb1e8f7b33ebb5d097dd028b9399 (patch) | |
tree | b6c9268cf4c25017e8244065e0ffd1416a809044 /src/components | |
parent | 350e7b0a6a2f19728a1839dc7db85717af3399d8 (diff) | |
download | Vencord-36f4478a4f10cb1e8f7b33ebb5d097dd028b9399.tar.gz Vencord-36f4478a4f10cb1e8f7b33ebb5d097dd028b9399.tar.bz2 Vencord-36f4478a4f10cb1e8f7b33ebb5d097dd028b9399.zip |
more eslint
Diffstat (limited to 'src/components')
5 files changed, 5 insertions, 5 deletions
diff --git a/src/components/PluginSettings/components/SettingBooleanComponent.tsx b/src/components/PluginSettings/components/SettingBooleanComponent.tsx index 939ca70..2267996 100644 --- a/src/components/PluginSettings/components/SettingBooleanComponent.tsx +++ b/src/components/PluginSettings/components/SettingBooleanComponent.tsx @@ -18,7 +18,7 @@ export function SettingBooleanComponent({ option, pluginSettings, id, onChange, ]; function handleChange(newValue: boolean): void { - let isValid = (option.isValid && option.isValid(newValue)) ?? true; + const isValid = (option.isValid && option.isValid(newValue)) ?? true; if (typeof isValid === "string") setError(isValid); else if (!isValid) setError("Invalid input provided."); else { diff --git a/src/components/PluginSettings/components/SettingNumericComponent.tsx b/src/components/PluginSettings/components/SettingNumericComponent.tsx index a54d281..f5cc566 100644 --- a/src/components/PluginSettings/components/SettingNumericComponent.tsx +++ b/src/components/PluginSettings/components/SettingNumericComponent.tsx @@ -18,7 +18,7 @@ export function SettingNumericComponent({ option, pluginSettings, id, onChange, }, [error]); function handleChange(newValue) { - let isValid = (option.isValid && option.isValid(newValue)) ?? true; + const isValid = (option.isValid && option.isValid(newValue)) ?? true; if (typeof isValid === "string") setError(isValid); else if (!isValid) setError("Invalid input provided."); else if (option.type === OptionType.NUMBER && BigInt(newValue) >= MAX_SAFE_NUMBER) { diff --git a/src/components/PluginSettings/components/SettingSelectComponent.tsx b/src/components/PluginSettings/components/SettingSelectComponent.tsx index 20ff7a5..ede15e5 100644 --- a/src/components/PluginSettings/components/SettingSelectComponent.tsx +++ b/src/components/PluginSettings/components/SettingSelectComponent.tsx @@ -13,7 +13,7 @@ export function SettingSelectComponent({ option, pluginSettings, onChange, onErr }, [error]); function handleChange(newValue) { - let isValid = (option.isValid && option.isValid(newValue)) ?? true; + const isValid = (option.isValid && option.isValid(newValue)) ?? true; if (typeof isValid === "string") setError(isValid); else if (!isValid) setError("Invalid input provided."); else { diff --git a/src/components/PluginSettings/components/SettingSliderComponent.tsx b/src/components/PluginSettings/components/SettingSliderComponent.tsx index 64466c1..c11f4ec 100644 --- a/src/components/PluginSettings/components/SettingSliderComponent.tsx +++ b/src/components/PluginSettings/components/SettingSliderComponent.tsx @@ -20,7 +20,7 @@ export function SettingSliderComponent({ option, pluginSettings, id, onChange, o }, [error]); function handleChange(newValue: number): void { - let isValid = (option.isValid && option.isValid(newValue)) ?? true; + const isValid = (option.isValid && option.isValid(newValue)) ?? true; if (typeof isValid === "string") setError(isValid); else if (!isValid) setError("Invalid input provided."); else { diff --git a/src/components/PluginSettings/components/SettingTextComponent.tsx b/src/components/PluginSettings/components/SettingTextComponent.tsx index 898f66b..b93bcd8 100644 --- a/src/components/PluginSettings/components/SettingTextComponent.tsx +++ b/src/components/PluginSettings/components/SettingTextComponent.tsx @@ -11,7 +11,7 @@ export function SettingInputComponent({ option, pluginSettings, id, onChange, on }, [error]); function handleChange(newValue) { - let isValid = (option.isValid && option.isValid(newValue)) ?? true; + const isValid = (option.isValid && option.isValid(newValue)) ?? true; if (typeof isValid === "string") setError(isValid); else if (!isValid) setError("Invalid input provided."); else { |