From 15ebd6913acca41fdeb87a0fa05e184f07c05ad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Sun, 27 Sep 2026 23:52:47 +0200 Subject: [PATCH] lint more --- .../codeEditor/extensions/customKeyMaps.js | 21 +++++-------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/client/components/codeEditor/extensions/customKeyMaps.js b/client/components/codeEditor/extensions/customKeyMaps.js index d1c814417..b1fd87855 100644 --- a/client/components/codeEditor/extensions/customKeyMaps.js +++ b/client/components/codeEditor/extensions/customKeyMaps.js @@ -73,14 +73,11 @@ const insertTab = (view)=>{ return forEachSelection(view, (state, range)=>{ const { from, to } = range; return { - changes : { - from, - to, - insert : ' ' // Insert two spaces, not a tab char! - }, - range : EditorSelection.cursor(from + 2) + changes : { from, to, insert: ' ' }, + range : EditorSelection.cursor(from + 2) }; }); + // Insert two spaces, not a tab char! }; const wrapSelection = (prefix, suffix)=>(view)=>forEachSelection(view, (state, range)=>{ @@ -101,16 +98,8 @@ const wrapSelection = (prefix, suffix)=>(view)=>forEachSelection(view, (state, r if(hasWrapper) { return { changes : [ - { - from : to - suffix.length, - to, - insert : '' - }, - { - from, - to : from + prefix.length, - insert : '' - } + { from: to - suffix.length, to, insert: '' }, + { from, to: from + prefix.length, insert: '' } ], range : EditorSelection.range(from, to - prefix.length - suffix.length) };