From 6a0db6c1c4f200114764a97fbb29d596e6fc593c 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 --- 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 39ed9c639d..bd965d0acd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt @@ -735,13 +735,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();