chore: Remove console.log left in code and added eslint rule to prevent it happening again

This commit is contained in:
Tom Moor
2023-04-11 22:15:52 -04:00
parent a9800165c1
commit 49d903d6d4
19 changed files with 59 additions and 47 deletions

View File

@@ -16,6 +16,7 @@ import { Portal } from "~/components/Portal";
import Scrollable from "~/components/Scrollable";
import useDictionary from "~/hooks/useDictionary";
import useToasts from "~/hooks/useToasts";
import Logger from "~/utils/Logger";
import { useEditor } from "./EditorContext";
import Input from "./Input";
@@ -99,7 +100,7 @@ function SuggestionsMenu<T extends MenuItem>(props: Props<T>) {
fromPos = view.coordsAtPos(selection.from);
toPos = view.coordsAtPos(selection.to, -1);
} catch (err) {
console.warn(err);
Logger.warn("Unable to calculate caret position", err);
return {
top: 0,
bottom: 0,