Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix eslint problems
dominik-zeglen5fd4cb50a004
diff --git a/saleor/static/dashboard/js/components/async-form.js b/saleor/static/dashboard/js/components/async-form.jsindex d0b8deaf95..275ad5ff52 100644--- a/saleor/static/dashboard/js/components/async-form.js+++ b/saleor/static/dashboard/js/components/async-form.js@@ -8,8 +8,8 @@ const onAsyncFormSubmit = (e) => {body: new FormData($target[0]),credentials: 'same-origin',headers: {- 'X-CSRFToken': $.cookie('csrftoken'),- },+ 'X-CSRFToken': $.cookie('csrftoken')+ }}).then((res) => {let output;if (res.status !== 200) {diff --git a/saleor/static/dashboard/js/components/datepicker.js b/saleor/static/dashboard/js/components/datepicker.jsindex 2fac9ac1a9..646bdb7392 100644--- a/saleor/static/dashboard/js/components/datepicker.js+++ b/saleor/static/dashboard/js/components/datepicker.js@@ -45,5 +45,5 @@ $('.datepicker').pickadate({formatSubmit: 'yyyy-mm-dd',selectMonths: true,hiddenName: true,- onClose: () => $(document.activeElement).blur(),+ onClose: () => $(document.activeElement).blur()});diff --git a/saleor/static/dashboard/js/components/image-gallery.js b/saleor/static/dashboard/js/components/image-gallery.jsindex 7404789340..9eb50b462b 100644--- a/saleor/static/dashboard/js/components/image-gallery.js+++ b/saleor/static/dashboard/js/components/image-gallery.js@@ -1,10 +1,11 @@+// eslint-disable-next-line no-unused-varsimport Dropzone from 'dropzone';import Sortable from 'sortablejs';function createLink (link, index, replacement) {const outputLink = link.attr('data-href-template').split('/');outputLink[outputLink.length + index] = replacement;- return outputLink.join('/')+ return outputLink.join('/');}const productGallery = document.getElementById('product-gallery');diff --git a/saleor/static/dashboard/js/components/messages.js b/saleor/static/dashboard/js/components/messages.jsindex f4a7cf46fb..bdc3677052 100644--- a/saleor/static/dashboard/js/components/messages.js+++ b/saleor/static/dashboard/js/components/messages.js@@ -6,7 +6,7 @@ const firstMessageOffset = 250;// ------if(data) {+if (data) {Object.keys(data).forEach((key) => {Materialize.toast(data[key], 5000);});diff --git a/saleor/static/dashboard/js/components/misc.js b/saleor/static/dashboard/js/components/misc.jsindex b3b62d3145..3e8af4571c 100644--- a/saleor/static/dashboard/js/components/misc.js+++ b/saleor/static/dashboard/js/components/misc.js@@ -49,7 +49,7 @@ $('#product-is-published').on('click', (e) => {window.location.reload();}).catch(() => {window.location.reload();- })+ });}});diff --git a/saleor/static/dashboard/js/components/selects.js b/saleor/static/dashboard/js/components/selects.jsindex 1f69b75fb4..cd839ee51e 100644--- a/saleor/static/dashboard/js/components/selects.js+++ b/saleor/static/dashboard/js/components/selects.js@@ -35,4 +35,4 @@ function initSelects() {export {initSelects-}+};diff --git a/saleor/static/dashboard/js/components/tab.js b/saleor/static/dashboard/js/components/tab.jsindex f32c817965..ff157d42e8 100644--- a/saleor/static/dashboard/js/components/tab.js+++ b/saleor/static/dashboard/js/components/tab.js@@ -1,12 +1,12 @@const $tabs = $('ul.tabs');if ($tabs.length) {$tabs.find('.tab').on('click', (e) => {- const tabSelector = $(e.currentTarget)- .find('a')- .attr('href');- $('.btn-fab').addClass('btn-fab-hidden');- $(tabSelector + '-btn').removeClass('btn-fab-hidden');- });+ const tabSelector = $(e.currentTarget)+ .find('a')+ .attr('href');+ $('.btn-fab').addClass('btn-fab-hidden');+ $(tabSelector + '-btn').removeClass('btn-fab-hidden');+ });$tabs.find('a.active').parent()diff --git a/saleor/static/dashboard/js/components/utils.js b/saleor/static/dashboard/js/components/utils.jsindex c977d0c4f0..10b64e99df 100644--- a/saleor/static/dashboard/js/components/utils.js+++ b/saleor/static/dashboard/js/components/utils.js@@ -2,7 +2,7 @@ import detectPassiveEvents from 'detect-passive-events';function onScroll(func) {window.addEventListener('scroll', func, detectPassiveEvents.hasSupport ? {- passive: true,+ passive: true} : false);}