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:
parent
5e3ae14aa0
commit
6a0db6c1c4
1 changed files with 3 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue