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");
|
var syntax = $(this).data("syntax");
|
||||||
$("#collapse_" + target ).show();
|
$("#collapse_" + target ).show();
|
||||||
if( syntax ){
|
if( syntax ){
|
||||||
|
var esLintConfig = { 'esversion': 6 };
|
||||||
|
var lint_type = syntax === 'javascript' ? esLintConfig : true;
|
||||||
var editor = CodeMirror.fromTextArea( document.getElementById( target ), {
|
var editor = CodeMirror.fromTextArea( document.getElementById( target ), {
|
||||||
lineNumbers: true,
|
lineNumbers: true,
|
||||||
mode: syntax,
|
mode: syntax,
|
||||||
lineWrapping: true,
|
lineWrapping: true,
|
||||||
viewportMargin: Infinity,
|
viewportMargin: Infinity,
|
||||||
gutters: ["CodeMirror-lint-markers"],
|
gutters: ["CodeMirror-lint-markers"],
|
||||||
lint: true
|
lint: lint_type,
|
||||||
});
|
});
|
||||||
editor.on("blur", function(){
|
editor.on("blur", function(){
|
||||||
editor.save();
|
editor.save();
|
||||||
|
|
Loading…
Reference in a new issue