From 9ad3778cf7ea7ecca5dc27e316e0762bc232a874 Mon Sep 17 00:00:00 2001 From: Amine Ben hammou Date: Tue, 26 Sep 2017 10:32:52 +0000 Subject: [PATCH] ES6 rules --- .eslintrc.es6.json | 7 +++---- assets/js/src/listing/listing.jsx | 4 ++-- assets/js/src/newsletters/listings/mixins.jsx | 10 +++++----- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.eslintrc.es6.json b/.eslintrc.es6.json index 45bc6fffa0..3241a43910 100644 --- a/.eslintrc.es6.json +++ b/.eslintrc.es6.json @@ -48,7 +48,7 @@ "camelcase": 0, "eqeqeq": 0, "no-lonely-if": 0, - "block-scoped-var": 0, + "space-unary-ops": 0, "no-extra-bind": 0, "class-methods-use-this": 0, "no-case-declarations": 0, @@ -59,12 +59,11 @@ "no-extra-boolean-cast": 0, "dot-notation": 0, "no-shadow": 0, - "one-var": 0, "no-alert": 0, - "one-var-declaration-per-line": 0, "no-script-url": 0, "wrap-iife": 0, - "vars-on-top": 0, + "space-infix-ops": 0, + "no-irregular-whitespace": 0, "padded-blocks": 0, "no-underscore-dangle": 0 } diff --git a/assets/js/src/listing/listing.jsx b/assets/js/src/listing/listing.jsx index 3832613b2b..e1716cf05e 100644 --- a/assets/js/src/listing/listing.jsx +++ b/assets/js/src/listing/listing.jsx @@ -658,8 +658,8 @@ const Listing = React.createClass({ }); }, handleSelectItem: function (id, is_checked) { - let selected_ids = this.state.selected_ids, - selection = false; + let selected_ids = this.state.selected_ids; + let selection = false; if (is_checked) { selected_ids = jQuery.merge(selected_ids, [id]); diff --git a/assets/js/src/newsletters/listings/mixins.jsx b/assets/js/src/newsletters/listings/mixins.jsx index 1aa53e2d86..77071fcb7a 100644 --- a/assets/js/src/newsletters/listings/mixins.jsx +++ b/assets/js/src/newsletters/listings/mixins.jsx @@ -179,11 +179,11 @@ const _StatisticsMixin = { const percentage_opened_display = MailPoet.Num.toLocaleFixed(percentage_opened, 1); const percentage_unsubscribed_display = MailPoet.Num.toLocaleFixed(percentage_unsubscribed, 1); - let show_stats_timeout, - newsletter_date, - sent_hours_ago, - too_early_for_stats, - show_kb_link; + let show_stats_timeout; + let newsletter_date; + let sent_hours_ago; + let too_early_for_stats; + let show_kb_link; if (current_time !== undefined) { // standard emails and post notifications: // display green box for newsletters that were just sent