Bug 35718: Remove ES6 warnings branches.tt

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Lucas Gass 2024-02-29 22:20:12 +00:00 committed by Katrin Fischer
parent 5e3ae14aa0
commit 6a0db6c1c4
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

View file

@ -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();