Skip to content

Commit

Permalink
fix: biome check
Browse files Browse the repository at this point in the history
  • Loading branch information
rosajsx committed Nov 9, 2024
1 parent 9fab065 commit 1db94db
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/app/(main)/query-runner/_components/cql-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ export function CqlEditor() {
const [code, setCode] = useState("");
const [loadingResults, setLoadingResults] = useState(false);
const [keyspaces, setKeyspaces] = useState<Record<string, ScyllaKeyspace>>(
{}
{},
);
const [isFetchedKeys, setIsFetchedKeys] = useState(false);
const [queryResult, setQueryResult] = useState<
Array<Record<string, unknown>>
>([]);
const [queryTracing, setQueryTracing] = useState<TracingResult>(
{} as TracingResult
{} as TracingResult,
);
const [updateKey, setUpdateKey] = useState(0); // Used to force re-render when query is executed
const currentConnection = useCqlFilters((state) => state.currentConnection);
Expand Down Expand Up @@ -121,9 +121,9 @@ export function CqlEditor() {
const debouncedSave = useCallback(
debounce(
(query: string) => localStorage.setItem("cqlEditorQuery", query),
500
500,
),
[]
[],
);

const handleCodeChange = (updatedCode = "") => {
Expand All @@ -134,7 +134,7 @@ export function CqlEditor() {
// Highlights line when put ";"
const highlightQueryAtCursor = (
editor: editor.IStandaloneCodeEditor,
monaco: Monaco
monaco: Monaco,
) => {
if (!decorationsReference.current)
decorationsReference.current = editor.createDecorationsCollection();
Expand All @@ -161,7 +161,7 @@ export function CqlEditor() {
// Use the onMount lifecycle to get access to the editor and monaco instance
const handleEditorDidMount = (
editor: editor.IStandaloneCodeEditor,
monaco: Monaco
monaco: Monaco,
) => {
monaco.languages.register({
id: "cql",
Expand All @@ -181,7 +181,7 @@ export function CqlEditor() {
model: editor.ITextModel,
position: Position,
_context: languages.CompletionContext,
_token: CancellationToken
_token: CancellationToken,
): languages.ProviderResult<languages.CompletionList> {
const word = model.getWordUntilPosition(position);
const prevChar = model.getValueInRange({
Expand Down Expand Up @@ -214,10 +214,10 @@ export function CqlEditor() {
monaco,
editor,
keyspaceData,
keyspacesTables
keyspacesTables,
)
.filter((item) =>
item.label.label.toLowerCase().startsWith(word.word.toLowerCase())
item.label.label.toLowerCase().startsWith(word.word.toLowerCase()),
)
.map((item) => ({ ...item, range }));

Expand Down

0 comments on commit 1db94db

Please sign in to comment.