diff --git a/core/misc/details-summarized-content.es6.js b/core/misc/details-summarized-content.es6.js index 4408c279fcb..2ed9f9ae6c4 100644 --- a/core/misc/details-summarized-content.es6.js +++ b/core/misc/details-summarized-content.es6.js @@ -74,11 +74,12 @@ attach(context) { const $detailsElements = $(context).find('details').once('details'); - DetailsSummarizedContent.instances = DetailsSummarizedContent.instances.concat( - $detailsElements - .map((index, details) => new DetailsSummarizedContent(details)) - .get(), - ); + DetailsSummarizedContent.instances = + DetailsSummarizedContent.instances.concat( + $detailsElements + .map((index, details) => new DetailsSummarizedContent(details)) + .get(), + ); }, }; diff --git a/core/misc/dialog/dialog.ajax.es6.js b/core/misc/dialog/dialog.ajax.es6.js index e481bdfa5f5..8dca37201b3 100644 --- a/core/misc/dialog/dialog.ajax.es6.js +++ b/core/misc/dialog/dialog.ajax.es6.js @@ -128,9 +128,8 @@ // Move the buttons to the jQuery UI dialog buttons area. if (!response.dialogOptions.buttons) { response.dialogOptions.drupalAutoButtons = true; - response.dialogOptions.buttons = Drupal.behaviors.dialog.prepareDialogButtons( - $dialog, - ); + response.dialogOptions.buttons = + Drupal.behaviors.dialog.prepareDialogButtons($dialog); } // Bind dialogButtonsChange. diff --git a/core/misc/form.es6.js b/core/misc/form.es6.js index ed9fd78cc33..526f24d8b18 100644 --- a/core/misc/form.es6.js +++ b/core/misc/form.es6.js @@ -218,9 +218,8 @@ const $context = $(context); const contextIsForm = $context.is('form'); if (trigger === 'unload') { - const $forms = (contextIsForm - ? $context - : $context.find('form') + const $forms = ( + contextIsForm ? $context : $context.find('form') ).removeOnce('form-updated'); if ($forms.length) { $.makeArray($forms).forEach((form) => { diff --git a/core/misc/tableheader.es6.js b/core/misc/tableheader.es6.js index 389a50d60b3..2debc838a3b 100644 --- a/core/misc/tableheader.es6.js +++ b/core/misc/tableheader.es6.js @@ -144,7 +144,8 @@ * * @ignore */ - 'columnschange.TableHeader drupalToolbarTrayChange': tableHeaderResizeHandler, + 'columnschange.TableHeader drupalToolbarTrayChange': + tableHeaderResizeHandler, /** * Recalculate TableHeader.topOffset when viewport is resized. diff --git a/core/modules/ckeditor/js/ckeditor.es6.js b/core/modules/ckeditor/js/ckeditor.es6.js index 698633c8e5e..fe0ebb940ff 100644 --- a/core/modules/ckeditor/js/ckeditor.es6.js +++ b/core/modules/ckeditor/js/ckeditor.es6.js @@ -257,9 +257,8 @@ : []; classes.push('ui-dialog--narrow'); dialogSettings.dialogClass = classes.join(' '); - dialogSettings.autoResize = window.matchMedia( - '(min-width: 600px)', - ).matches; + dialogSettings.autoResize = + window.matchMedia('(min-width: 600px)').matches; dialogSettings.width = 'auto'; // Add a "Loading…" message, hide it underneath the CKEditor toolbar, diff --git a/core/modules/ckeditor/js/plugins/drupalimage/plugin.es6.js b/core/modules/ckeditor/js/plugins/drupalimage/plugin.es6.js index b0258a94247..fda04cbff42 100644 --- a/core/modules/ckeditor/js/plugins/drupalimage/plugin.es6.js +++ b/core/modules/ckeditor/js/plugins/drupalimage/plugin.es6.js @@ -141,7 +141,8 @@ // CKEDITOR.style is an immutable object: we cannot modify its // definition to extend requiredContent. Hence we get the definition, // modify it, and pass it to a new CKEDITOR.style instance. - const requiredContent = widgetDefinition.requiredContent.getDefinition(); + const requiredContent = + widgetDefinition.requiredContent.getDefinition(); requiredContent.attributes['data-entity-type'] = ''; requiredContent.attributes['data-entity-uuid'] = ''; widgetDefinition.requiredContent = new CKEDITOR.style(requiredContent); @@ -156,12 +157,10 @@ // the element is already correct. We only need to update the element's // data-entity-uuid attribute. widgetDefinition.downcast = function (element) { - element.attributes['data-entity-type'] = this.data[ - 'data-entity-type' - ]; - element.attributes['data-entity-uuid'] = this.data[ - 'data-entity-uuid' - ]; + element.attributes['data-entity-type'] = + this.data['data-entity-type']; + element.attributes['data-entity-uuid'] = + this.data['data-entity-uuid']; }; // We want to upcast elements to a DOM structure required by the diff --git a/core/modules/ckeditor/js/plugins/drupalimagecaption/plugin.es6.js b/core/modules/ckeditor/js/plugins/drupalimagecaption/plugin.es6.js index 96c6f01f4a0..733e7652129 100644 --- a/core/modules/ckeditor/js/plugins/drupalimagecaption/plugin.es6.js +++ b/core/modules/ckeditor/js/plugins/drupalimagecaption/plugin.es6.js @@ -90,7 +90,8 @@ // CKEDITOR.style is an immutable object: we cannot modify its // definition to extend requiredContent. Hence we get the definition, // modify it, and pass it to a new CKEDITOR.style instance. - const requiredContent = widgetDefinition.requiredContent.getDefinition(); + const requiredContent = + widgetDefinition.requiredContent.getDefinition(); requiredContent.attributes['data-align'] = ''; requiredContent.attributes['data-caption'] = ''; widgetDefinition.requiredContent = new CKEDITOR.style( @@ -284,8 +285,8 @@ // widget.data.hasCaption as "changed" (e.g. when hasCaption === 0 // instead of hasCaption === false). This causes image2's "state // shifter" to enter the wrong branch of the algorithm and blow up. - dialogReturnValues.attributes.hasCaption = !!dialogReturnValues - .attributes.hasCaption; + dialogReturnValues.attributes.hasCaption = + !!dialogReturnValues.attributes.hasCaption; const actualWidget = saveCallback(dialogReturnValues); diff --git a/core/modules/ckeditor/js/views/ControllerView.es6.js b/core/modules/ckeditor/js/views/ControllerView.es6.js index c97a292fecd..270442ee830 100644 --- a/core/modules/ckeditor/js/views/ControllerView.es6.js +++ b/core/modules/ckeditor/js/views/ControllerView.es6.js @@ -244,9 +244,8 @@ // Get a Drupal.editorFeature object that contains all metadata for // the feature that was just added or removed. Not every feature has // such metadata. - let featureName = this.model.get('buttonsToFeatures')[ - button.toLowerCase() - ]; + let featureName = + this.model.get('buttonsToFeatures')[button.toLowerCase()]; // Features without an associated command do not have a 'feature name' by // default, so we use the lowercased button name instead. if (!featureName) { diff --git a/core/modules/editor/js/editor.admin.es6.js b/core/modules/editor/js/editor.admin.es6.js index c88b3673289..b1688ee8ff8 100644 --- a/core/modules/editor/js/editor.admin.es6.js +++ b/core/modules/editor/js/editor.admin.es6.js @@ -649,13 +649,12 @@ // If any filter's current status forbids the editor feature, return // false. Drupal.filterConfiguration.update(); - return Object.keys( - Drupal.filterConfiguration.statuses, - ).every((filterID) => - filterStatusAllowsFeature( - Drupal.filterConfiguration.statuses[filterID], - feature, - ), + return Object.keys(Drupal.filterConfiguration.statuses).every( + (filterID) => + filterStatusAllowsFeature( + Drupal.filterConfiguration.statuses[filterID], + feature, + ), ); }, }; @@ -920,24 +919,18 @@ clone.tags = this.tags.slice(0); clone.allow = this.allow; clone.restrictedTags.tags = this.restrictedTags.tags.slice(0); - clone.restrictedTags.allowed.attributes = this.restrictedTags.allowed.attributes.slice( - 0, - ); - clone.restrictedTags.allowed.styles = this.restrictedTags.allowed.styles.slice( - 0, - ); - clone.restrictedTags.allowed.classes = this.restrictedTags.allowed.classes.slice( - 0, - ); - clone.restrictedTags.forbidden.attributes = this.restrictedTags.forbidden.attributes.slice( - 0, - ); - clone.restrictedTags.forbidden.styles = this.restrictedTags.forbidden.styles.slice( - 0, - ); - clone.restrictedTags.forbidden.classes = this.restrictedTags.forbidden.classes.slice( - 0, - ); + clone.restrictedTags.allowed.attributes = + this.restrictedTags.allowed.attributes.slice(0); + clone.restrictedTags.allowed.styles = + this.restrictedTags.allowed.styles.slice(0); + clone.restrictedTags.allowed.classes = + this.restrictedTags.allowed.classes.slice(0); + clone.restrictedTags.forbidden.attributes = + this.restrictedTags.forbidden.attributes.slice(0); + clone.restrictedTags.forbidden.styles = + this.restrictedTags.forbidden.styles.slice(0); + clone.restrictedTags.forbidden.classes = + this.restrictedTags.forbidden.classes.slice(0); return clone; }; @@ -989,11 +982,10 @@ // Update current rules. if (Drupal.filterConfiguration.liveSettingParsers[filterID]) { - Drupal.filterConfiguration.statuses[ - filterID - ].rules = Drupal.filterConfiguration.liveSettingParsers[ - filterID - ].getRules(); + Drupal.filterConfiguration.statuses[filterID].rules = + Drupal.filterConfiguration.liveSettingParsers[ + filterID + ].getRules(); } }, ); @@ -1029,9 +1021,8 @@ // Create a Drupal.FilterStatus object to track the state (whether it's // active or not and its current settings, if any) of each filter. - Drupal.filterConfiguration.statuses[ - filterID - ] = new Drupal.FilterStatus(filterID); + Drupal.filterConfiguration.statuses[filterID] = + new Drupal.FilterStatus(filterID); }); }, }; diff --git a/core/modules/filter/filter.filter_html.admin.es6.js b/core/modules/filter/filter.filter_html.admin.es6.js index 3f8a4d5bae4..e4b1d31beef 100644 --- a/core/modules/filter/filter.filter_html.admin.es6.js +++ b/core/modules/filter/filter.filter_html.admin.es6.js @@ -20,9 +20,8 @@ const currentValue = $( '#edit-filters-filter-html-settings-allowed-html', ).val(); - const rules = Drupal.behaviors.filterFilterHtmlUpdating._parseSetting( - currentValue, - ); + const rules = + Drupal.behaviors.filterFilterHtmlUpdating._parseSetting(currentValue); // Build a FilterHTMLRule that reflects the hard-coded behavior that // strips all "style" attribute and all "on*" attributes. @@ -181,12 +180,10 @@ // always disallows the "style" attribute, so we only need to // support "class" attribute value restrictions. Fix once // https://www.drupal.org/node/2567801 lands. - filterRule.restrictedTags.allowed.attributes = featureRule.required.attributes.slice( - 0, - ); - filterRule.restrictedTags.allowed.classes = featureRule.required.classes.slice( - 0, - ); + filterRule.restrictedTags.allowed.attributes = + featureRule.required.attributes.slice(0); + filterRule.restrictedTags.allowed.classes = + featureRule.required.classes.slice(0); editorRequiredTags[tag] = filterRule; } // The tag is already allowed, add any additionally allowed @@ -362,9 +359,8 @@ */ Drupal.theme.filterFilterHTMLUpdateMessage = function (tags) { let html = ''; - const tagList = Drupal.behaviors.filterFilterHtmlUpdating._generateSetting( - tags, - ); + const tagList = + Drupal.behaviors.filterFilterHtmlUpdating._generateSetting(tags); html += '