diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js b/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js index 7823d49d72..2ac7adefac 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js +++ b/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js @@ -89,6 +89,7 @@ function addExpandHandler() { $(this).hide(); var target = $(this).data("target"); var syntax = $(this).data("syntax"); + var lint_type = syntax === 'javascript'? { 'esversion': 6 } : true; $("#collapse_" + target).show(); if (syntax) { var editor = CodeMirror.fromTextArea(document.getElementById("pref_" + target), { @@ -97,7 +98,7 @@ function addExpandHandler() { lineWrapping: true, viewportMargin: Infinity, gutters: ["CodeMirror-lint-markers"], - lint: true + lint: lint_type, }); editor.on("change", function () { mark_modified.call($("#pref_" + target)[0]);