From b8bc451938d0f7347018c25ff92b53e5b5b3100b Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Thu, 29 Feb 2024 22:20:12 +0000 Subject: [PATCH] Bug 35718: Remove ES6 warnings branches.tt Signed-off-by: Julian Maurice Signed-off-by: Katrin Fischer (cherry picked from commit 6a0db6c1c4f200114764a97fbb29d596e6fc593c) Signed-off-by: Fridolin Somers --- koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt index 6fdb1ad4f1..54915dcfea 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt @@ -733,13 +733,15 @@ var syntax = $(this).data("syntax"); $("#collapse_" + target ).show(); if( syntax ){ + var esLintConfig = { 'esversion': 6 }; + var lint_type = syntax === 'javascript' ? esLintConfig : true; var editor = CodeMirror.fromTextArea( document.getElementById( target ), { lineNumbers: true, mode: syntax, lineWrapping: true, viewportMargin: Infinity, gutters: ["CodeMirror-lint-markers"], - lint: true + lint: lint_type, }); editor.on("blur", function(){ editor.save(); -- 2.39.5