From 98e3cac2a9fa9874002320a3b09ad1e1989cc635 Mon Sep 17 00:00:00 2001 From: Lee Rowlands Date: Fri, 1 Nov 2019 15:39:25 +1000 Subject: [PATCH] Issue #3091672 by alexpott: Fix javascript coding standards (cherry picked from commit 0a69c9c580d727e531563c3e8bb61b8c6c044913) --- core/misc/dropbutton/dropbutton.es6.js | 4 +--- core/modules/filter/filter.admin.es6.js | 9 ++++----- core/modules/quickedit/js/theme.es6.js | 4 +--- core/modules/system/js/system.date.es6.js | 5 ++--- core/modules/toolbar/js/toolbar.menu.es6.js | 4 +--- core/modules/user/user.es6.js | 4 +--- core/modules/user/user.theme.es6.js | 4 +--- core/themes/stable/js/user.theme.es6.js | 4 +--- 8 files changed, 12 insertions(+), 26 deletions(-) diff --git a/core/misc/dropbutton/dropbutton.es6.js b/core/misc/dropbutton/dropbutton.es6.js index 54fd3fe3f4b..b91b099ebd3 100644 --- a/core/misc/dropbutton/dropbutton.es6.js +++ b/core/misc/dropbutton/dropbutton.es6.js @@ -231,9 +231,7 @@ * A string representing a DOM fragment. */ dropbuttonToggle(options) { - return `
  • `; + return `
  • `; }, }, ); diff --git a/core/modules/filter/filter.admin.es6.js b/core/modules/filter/filter.admin.es6.js index fe2cca742c6..6d3b97a9e9f 100644 --- a/core/modules/filter/filter.admin.es6.js +++ b/core/modules/filter/filter.admin.es6.js @@ -56,11 +56,10 @@ // Attach summary for configurable filters (only for screen readers). if (filterSettingsTab) { - filterSettingsTab.details.drupalSetSummary( - () => - $checkbox.is(':checked') - ? Drupal.t('Enabled') - : Drupal.t('Disabled'), + filterSettingsTab.details.drupalSetSummary(() => + $checkbox.is(':checked') + ? Drupal.t('Enabled') + : Drupal.t('Disabled'), ); } diff --git a/core/modules/quickedit/js/theme.es6.js b/core/modules/quickedit/js/theme.es6.js index a528404f123..17640feec00 100644 --- a/core/modules/quickedit/js/theme.es6.js +++ b/core/modules/quickedit/js/theme.es6.js @@ -34,9 +34,7 @@ */ Drupal.theme.quickeditEntityToolbar = function(settings) { let html = ''; - html += `
    `; + html += `
    `; html += ''; html += '
    '; html += diff --git a/core/modules/system/js/system.date.es6.js b/core/modules/system/js/system.date.es6.js index 91b177309fc..46dac9f5ac9 100644 --- a/core/modules/system/js/system.date.es6.js +++ b/core/modules/system/js/system.date.es6.js @@ -38,9 +38,8 @@ */ function dateFormatHandler(e) { const baseValue = $(e.target).val() || ''; - const dateString = baseValue.replace( - /\\?(.?)/gi, - (key, value) => (dateFormats[key] ? dateFormats[key] : value), + const dateString = baseValue.replace(/\\?(.?)/gi, (key, value) => + dateFormats[key] ? dateFormats[key] : value, ); $preview.text(dateString); diff --git a/core/modules/toolbar/js/toolbar.menu.es6.js b/core/modules/toolbar/js/toolbar.menu.es6.js index 614574ef726..3117f072241 100644 --- a/core/modules/toolbar/js/toolbar.menu.es6.js +++ b/core/modules/toolbar/js/toolbar.menu.es6.js @@ -197,8 +197,6 @@ * A string representing a DOM fragment. */ Drupal.theme.toolbarMenuItemToggle = function(options) { - return ``; + return ``; }; })(jQuery, Drupal, drupalSettings); diff --git a/core/modules/user/user.es6.js b/core/modules/user/user.es6.js index a91b9a12398..d5b8d20060d 100644 --- a/core/modules/user/user.es6.js +++ b/core/modules/user/user.es6.js @@ -47,9 +47,7 @@ // If the password strength indicator is enabled, add its markup. if (settings.password.showStrengthIndicator) { - const passwordMeter = `
    ${ - translate.strengthTitle - }
    `; + const passwordMeter = `
    ${translate.strengthTitle}
    `; $confirmInput .parent() .after('
    '); diff --git a/core/modules/user/user.theme.es6.js b/core/modules/user/user.theme.es6.js index f3e14650366..7178eb8609c 100644 --- a/core/modules/user/user.theme.es6.js +++ b/core/modules/user/user.theme.es6.js @@ -11,7 +11,5 @@ * A string representing a DOM fragment. */ Drupal.theme.passwordConfirmMessage = translate => - `
    ${ - translate.confirmTitle - }
    `; + `
    ${translate.confirmTitle}
    `; })(Drupal); diff --git a/core/themes/stable/js/user.theme.es6.js b/core/themes/stable/js/user.theme.es6.js index 4f10529b007..125bb8a39c5 100644 --- a/core/themes/stable/js/user.theme.es6.js +++ b/core/themes/stable/js/user.theme.es6.js @@ -11,7 +11,5 @@ * A string representing a DOM fragment. */ Drupal.theme.passwordConfirmMessage = translate => - `
    ${ - translate.confirmTitle - }
    `; + `
    ${translate.confirmTitle}
    `; })(Drupal);