From 70d9614fb18325718b302e3008a603e5d0f4cad0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Sun, 10 May 2026 19:39:26 +0200 Subject: [PATCH] lint --- client/components/codeEditor/codeEditor.jsx | 32 ++++++--------------- 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/client/components/codeEditor/codeEditor.jsx b/client/components/codeEditor/codeEditor.jsx index 90ab1fde0..c70e1109b 100644 --- a/client/components/codeEditor/codeEditor.jsx +++ b/client/components/codeEditor/codeEditor.jsx @@ -17,13 +17,13 @@ import { crosshairCursor, } from '@codemirror/view'; import { EditorState, Compartment, StateEffect, StateField } from '@codemirror/state'; -import { - foldAll as foldAllCmd, +import { + foldAll as foldAllCmd, unfoldAll as unfoldAllCmd, - foldGutter, - foldKeymap, - foldEffect, - foldState, + foldGutter, + foldKeymap, + foldEffect, + foldState, syntaxHighlighting, syntaxTree, ensureSyntaxTree @@ -152,30 +152,14 @@ const createHighlightPlugin = (renderer, tab)=>{ class : `cm-${tok.type}` }).range(line.from) ); - if(tok.type === 'pageLine' && tab === 'brewText') { pageCount++; if(line.from === 0) pageCount--; - - decos.push( - Decoration.line({ - attributes : { - 'data-page-number' : pageCount - } - }).range(line.from) - ); + decos.push(Decoration.line({ attributes: { 'data-page-number': pageCount } }).range(line.from)); } - if(tok.type === 'snippetLine' && tab === 'brewSnippets') { snippetCount++; - - decos.push( - Decoration.line({ - attributes : { - 'data-page-number' : snippetCount - } - }).range(line.from) - ); + decos.push(Decoration.line({ attributes: { 'data-page-number': snippetCount } }).range(line.from)); } } });