diff --git a/core/.eslintrc.passing.json b/core/.eslintrc.passing.json index abb9a63c1f0fed1bb280143cd18d79d9557f7989..3ee572f109c200f21d1b373747070a5e4afab37a 100644 --- a/core/.eslintrc.passing.json +++ b/core/.eslintrc.passing.json @@ -12,7 +12,6 @@ "no-restricted-globals": "off", "react/no-this-in-sfc": "off", "react/destructuring-assignment": "off", - "function-paren-newline": "off", "implicit-arrow-linebreak": "off", "import/named": "off", "spaced-comment": "off" diff --git a/core/misc/tabledrag.es6.js b/core/misc/tabledrag.es6.js index 93cc0349c23eb01d741aa12de547848429a59b55..6105aeeae6e63a7f37587d48d7453b5028a1ea9b 100644 --- a/core/misc/tabledrag.es6.js +++ b/core/misc/tabledrag.es6.js @@ -211,14 +211,15 @@ }); // Add a link before the table for users to show or hide weight columns. - $table.before($('<button type="button" class="link tabledrag-toggle-weight"></button>') - .attr('title', Drupal.t('Re-order rows by numerical weight instead of dragging.')) - .on('click', $.proxy(function (e) { - e.preventDefault(); - this.toggleColumns(); - }, this)) - .wrap('<div class="tabledrag-toggle-weight-wrapper"></div>') - .parent(), + $table.before( + $('<button type="button" class="link tabledrag-toggle-weight"></button>') + .attr('title', Drupal.t('Re-order rows by numerical weight instead of dragging.')) + .on('click', $.proxy(function (e) { + e.preventDefault(); + this.toggleColumns(); + }, this)) + .wrap('<div class="tabledrag-toggle-weight-wrapper"></div>') + .parent(), ); // Initialize the specified columns (for example, weight or parent columns) diff --git a/core/misc/vertical-tabs.es6.js b/core/misc/vertical-tabs.es6.js index 61ea218709ef2539f0d507beec5c61ca18621793..c0427bbf78bcc5bf36b407a87c7c62852cafd874 100644 --- a/core/misc/vertical-tabs.es6.js +++ b/core/misc/vertical-tabs.es6.js @@ -270,10 +270,10 @@ Drupal.theme.verticalTab = function (settings) { const tab = {}; tab.item = $('<li class="vertical-tabs__menu-item" tabindex="-1"></li>') - .append(tab.link = $('<a href="#"></a>') - .append(tab.title = $('<strong class="vertical-tabs__menu-item-title"></strong>').text(settings.title)) - .append(tab.summary = $('<span class="vertical-tabs__menu-item-summary"></span>'), - ), + .append( + tab.link = $('<a href="#"></a>') + .append(tab.title = $('<strong class="vertical-tabs__menu-item-title"></strong>').text(settings.title)) + .append(tab.summary = $('<span class="vertical-tabs__menu-item-summary"></span>')), ); return tab; }; diff --git a/core/modules/color/color.es6.js b/core/modules/color/color.es6.js index 01939a1f65aadac774fc11f89b617c947f64b71f..809c15e09cd0c9c978e74606e3945b1320a08d69 100644 --- a/core/modules/color/color.es6.js +++ b/core/modules/color/color.es6.js @@ -252,19 +252,23 @@ e.preventDefault(); if (toggleClick) { $(this).addClass('is-unlocked').html(Drupal.t('Lock')); - $(hooks[i - 1]).attr('class', + $(hooks[i - 1]).attr( + 'class', locks[i - 2] && $(locks[i - 2]).is(':not(.is-unlocked)') ? 'color-palette__hook is-up' : 'color-palette__hook', ); - $(hooks[i]).attr('class', + $(hooks[i]).attr( + 'class', locks[i] && $(locks[i]).is(':not(.is-unlocked)') ? 'color-palette__hook is-down' : 'color-palette__hook', ); } else { $(this).removeClass('is-unlocked').html(Drupal.t('Unlock')); - $(hooks[i - 1]).attr('class', + $(hooks[i - 1]).attr( + 'class', locks[i - 2] && $(locks[i - 2]).is(':not(.is-unlocked)') ? 'color-palette__hook is-both' : 'color-palette__hook is-down', ); - $(hooks[i]).attr('class', + $(hooks[i]).attr( + 'class', locks[i] && $(locks[i]).is(':not(.is-unlocked)') ? 'color-palette__hook is-both' : 'color-palette__hook is-up', ); } diff --git a/core/modules/contextual/js/contextual.es6.js b/core/modules/contextual/js/contextual.es6.js index 8e05f87ae3ac1a710dbe67c27587fd1e662753cc..d3e5973440f64b85f4989f5f82d5cdb8496c114c 100644 --- a/core/modules/contextual/js/contextual.es6.js +++ b/core/modules/contextual/js/contextual.es6.js @@ -4,7 +4,8 @@ */ (function ($, Drupal, drupalSettings, _, Backbone, JSON, storage) { - const options = $.extend(drupalSettings.contextual, + const options = $.extend( + drupalSettings.contextual, // Merge strings on top of drupalSettings so that they are not mutable. { strings: { @@ -109,8 +110,8 @@ aural: new contextual.AuralView(viewOptions), keyboard: new contextual.KeyboardView(viewOptions), }); - contextual.regionViews.push(new contextual.RegionView( - $.extend({ el: $region, model }, options)), + contextual.regionViews.push( + new contextual.RegionView($.extend({ el: $region, model }, options)), ); // Add the model to the collection. This must happen after the views have diff --git a/core/modules/field_ui/field_ui.es6.js b/core/modules/field_ui/field_ui.es6.js index cf1284171186bdfddf5a955988941144f8c0aa4f..bed88de05249916f3bda0eeb7b41c176fc6b9b69 100644 --- a/core/modules/field_ui/field_ui.es6.js +++ b/core/modules/field_ui/field_ui.es6.js @@ -22,7 +22,8 @@ $form.find( '.js-form-item-label label,' + '.js-form-item-field-name label,' + - '.js-form-item-existing-storage-label label') + '.js-form-item-existing-storage-label label', + ) .addClass('js-form-required form-required'); const $newFieldType = $form.find('select[name="new_storage_type"]'); diff --git a/core/modules/quickedit/js/quickedit.es6.js b/core/modules/quickedit/js/quickedit.es6.js index 145c26dc1a94636f7bdf5857fed19da760fc66b7..06e6d53dc760adc2cb49c4caa729e6f81a00f4fb 100644 --- a/core/modules/quickedit/js/quickedit.es6.js +++ b/core/modules/quickedit/js/quickedit.es6.js @@ -18,7 +18,8 @@ */ (function ($, _, Backbone, Drupal, drupalSettings, JSON, storage) { - const options = $.extend(drupalSettings.quickedit, + const options = $.extend( + drupalSettings.quickedit, // Merge strings on top of drupalSettings so that they are not mutable. { strings: {