From 2fffe4f32567c9536312ab5be6cb5b9fe22f315e 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 --- 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 6fdb1ad4f16..54915dcfeaa 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.30.2