From 39bcd04878dde29e383a098ed431369240867b7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Meneghini=20Fauth?= Date: Wed, 29 May 2019 19:27:48 -0300 Subject: [PATCH] Disable no-eval rule only on the specified line MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: MaurĂ­cio Meneghini Fauth --- js/functions.js | 2 +- js/gis_data_editor.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/functions.js b/js/functions.js index ea5cebea45..a0f339a7f3 100644 --- a/js/functions.js +++ b/js/functions.js @@ -4141,7 +4141,7 @@ Functions.toggleButton = function ($obj) { .animate({ 'left': operator + move + 'px' }, function () { $container.removeClass('isActive'); }); - /* eslint no-eval: "warn" */ + // eslint-disable-next-line no-eval eval(callback); } else { Functions.ajaxShowMessage(data.error, false); diff --git a/js/gis_data_editor.js b/js/gis_data_editor.js index 7840f25eec..dc4eca998a 100644 --- a/js/gis_data_editor.js +++ b/js/gis_data_editor.js @@ -251,7 +251,7 @@ AJAX.registerOnload('gis_data_editor.js', function () { $('#placeholder').empty().removeClass('hasSVG').html(data.visualization); $('#openlayersmap').empty(); /* TODO: the gis_data_editor should rather return JSON than JS code to eval */ - /* eslint no-eval: "warn" */ + // eslint-disable-next-line no-eval eval(data.openLayers); initGISEditorVisualization(); } else {