From 09bd8257c02a28e633000c88787a67fe88208bdb 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 --- 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.30.2