diff --git a/core/.eslintrc.passing.json b/core/.eslintrc.passing.json index 8489a7d061867c3cd313c284eaa3bad5bad26007..d33b7cb1775018970d5ad310a06dc420d55ac285 100644 --- a/core/.eslintrc.passing.json +++ b/core/.eslintrc.passing.json @@ -1,7 +1,6 @@ { "extends": "./.eslintrc.json", "rules": { - "no-useless-escape": "off", "no-use-before-define": "off", "no-throw-literal": "off", "no-shadow": "off", diff --git a/core/misc/tableresponsive.es6.js b/core/misc/tableresponsive.es6.js index 69d72679f9554ddc721d0604522cda5bf810b7b4..8d1ae0115e77f647a8a02592cce076e42eedee34 100644 --- a/core/misc/tableresponsive.es6.js +++ b/core/misc/tableresponsive.es6.js @@ -144,7 +144,7 @@ // should be returned to the same state it was in before the columns // were revealed, so it is necessary to remove the display none value // from the style attribute. - const match = /^display\s*\:\s*none$/; + const match = /^display\s*:\s*none$/; for (let i = 0; i < properties.length; i++) { const prop = properties[i]; prop.trim(); diff --git a/core/misc/tableresponsive.js b/core/misc/tableresponsive.js index b955012cb3b6844b9aee42d2e22d0068589d9ddd..d4fa6315cc11dfca2a2b0ccc45447f12b16e187d 100644 --- a/core/misc/tableresponsive.js +++ b/core/misc/tableresponsive.js @@ -79,7 +79,7 @@ var properties = $cell.attr('style').split(';'); var newProps = []; - var match = /^display\s*\:\s*none$/; + var match = /^display\s*:\s*none$/; for (var i = 0; i < properties.length; i++) { var prop = properties[i]; prop.trim(); diff --git a/core/modules/ckeditor/js/ckeditor.admin.es6.js b/core/modules/ckeditor/js/ckeditor.admin.es6.js index c875fd64a09ca6287b1c11aa3b4f5da6eaa8b8b2..4cf6a63e44be1750eb3554fb4da850cd5e49bf57 100644 --- a/core/modules/ckeditor/js/ckeditor.admin.es6.js +++ b/core/modules/ckeditor/js/ckeditor.admin.es6.js @@ -194,7 +194,7 @@ .find('input') .addClass('error') .attr('aria-invalid', 'true'); - $(`<div class=\"description\" >${Drupal.t('Please provide a name for the button group.')}</div>`).insertAfter(form.elements[0]); + $(`<div class="description" >${Drupal.t('Please provide a name for the button group.')}</div>`).insertAfter(form.elements[0]); } return true; } diff --git a/core/modules/locale/locale.bulk.es6.js b/core/modules/locale/locale.bulk.es6.js index 1d72a0bad7922baad382c6091a68ed52625457f7..4fe32c3470fa3ba22ff4910fc4c442ae9ea6ed6f 100644 --- a/core/modules/locale/locale.bulk.es6.js +++ b/core/modules/locale/locale.bulk.es6.js @@ -23,7 +23,7 @@ .on('change', function () { // If the filename is fully the language code or the filename // ends with a language code, pre-select that one. - const matches = $(this).val().match(/([^.][\.]*)([\w-]+)\.po$/); + const matches = $(this).val().match(/([^.][.]*)([\w-]+)\.po$/); if (matches && $langcode.find(`option[value="${matches[2]}"]`).length) { $langcode.val(matches[2]); } diff --git a/core/modules/locale/locale.bulk.js b/core/modules/locale/locale.bulk.js index f0ad15f963eccdfab9031d42ec88498a5047dcb2..dd84cf793c0b8a54a803a7de524c1230c40b0b82 100644 --- a/core/modules/locale/locale.bulk.js +++ b/core/modules/locale/locale.bulk.js @@ -12,7 +12,7 @@ if ($form.length) { var $langcode = $form.find('.langcode-input'); $form.find('.file-import-input').on('change', function () { - var matches = $(this).val().match(/([^.][\.]*)([\w-]+)\.po$/); + var matches = $(this).val().match(/([^.][.]*)([\w-]+)\.po$/); if (matches && $langcode.find('option[value="' + matches[2] + '"]').length) { $langcode.val(matches[2]); } diff --git a/core/modules/quickedit/js/editors/formEditor.es6.js b/core/modules/quickedit/js/editors/formEditor.es6.js index be658d37a95412580c8b6406d5331ede830accbf..c12308403d9c9581ad8a98100119ea1cdd46aa5a 100644 --- a/core/modules/quickedit/js/editors/formEditor.es6.js +++ b/core/modules/quickedit/js/editors/formEditor.es6.js @@ -92,7 +92,7 @@ const fieldModel = this.fieldModel; // Generate a DOM-compatible ID for the form container DOM element. - const id = `quickedit-form-for-${fieldModel.id.replace(/[\/\[\]]/g, '_')}`; + const id = `quickedit-form-for-${fieldModel.id.replace(/[/[\]]/g, '_')}`; // Render form container. const $formContainer = $(Drupal.theme('quickeditFormContainer', { diff --git a/core/modules/quickedit/js/editors/formEditor.js b/core/modules/quickedit/js/editors/formEditor.js index c4d875047435f98ac2f4212e20521f4353ecd2b3..8a872edc57ef94b770f1083e7e2d932c4050dc1d 100644 --- a/core/modules/quickedit/js/editors/formEditor.js +++ b/core/modules/quickedit/js/editors/formEditor.js @@ -57,7 +57,7 @@ loadForm: function loadForm() { var fieldModel = this.fieldModel; - var id = 'quickedit-form-for-' + fieldModel.id.replace(/[\/\[\]]/g, '_'); + var id = 'quickedit-form-for-' + fieldModel.id.replace(/[/[\]]/g, '_'); var $formContainer = $(Drupal.theme('quickeditFormContainer', { id: id, diff --git a/core/modules/quickedit/js/views/EditorView.es6.js b/core/modules/quickedit/js/views/EditorView.es6.js index 12908943ada5a56931e898c5184cf48a329e2805..1a1a9845d53d9748d7f437ba01707b87bdb2985b 100644 --- a/core/modules/quickedit/js/views/EditorView.es6.js +++ b/core/modules/quickedit/js/views/EditorView.es6.js @@ -185,7 +185,7 @@ save() { const fieldModel = this.fieldModel; const editorModel = this.model; - const backstageId = `quickedit_backstage-${this.fieldModel.id.replace(/[\/\[\]\_\s]/g, '-')}`; + const backstageId = `quickedit_backstage-${this.fieldModel.id.replace(/[/[\]_\s]/g, '-')}`; function fillAndSubmitForm(value) { const $form = $(`#${backstageId}`).find('form'); diff --git a/core/modules/quickedit/js/views/EditorView.js b/core/modules/quickedit/js/views/EditorView.js index a4b05f45ea6a483bbf6ca67a01c7de59e5fb3655..f69238c2a34d41beacc689f90f87c1e21e3a504d 100644 --- a/core/modules/quickedit/js/views/EditorView.js +++ b/core/modules/quickedit/js/views/EditorView.js @@ -73,7 +73,7 @@ save: function save() { var fieldModel = this.fieldModel; var editorModel = this.model; - var backstageId = 'quickedit_backstage-' + this.fieldModel.id.replace(/[\/\[\]\_\s]/g, '-'); + var backstageId = 'quickedit_backstage-' + this.fieldModel.id.replace(/[/[\]_\s]/g, '-'); function fillAndSubmitForm(value) { var $form = $('#' + backstageId).find('form'); diff --git a/core/modules/quickedit/js/views/FieldToolbarView.es6.js b/core/modules/quickedit/js/views/FieldToolbarView.es6.js index 13e0457b5d327f8ade7cbf1dd79095afa5fbf422..12d23170b96292c44cff23fd4128421ad0952bb8 100644 --- a/core/modules/quickedit/js/views/FieldToolbarView.es6.js +++ b/core/modules/quickedit/js/views/FieldToolbarView.es6.js @@ -47,7 +47,7 @@ this.$root = this.$el; // Generate a DOM-compatible ID for the form container DOM element. - this._id = `quickedit-toolbar-for-${this.model.id.replace(/[\/\[\]]/g, '_')}`; + this._id = `quickedit-toolbar-for-${this.model.id.replace(/[/[\]]/g, '_')}`; this.listenTo(this.model, 'change:state', this.stateChange); }, diff --git a/core/modules/quickedit/js/views/FieldToolbarView.js b/core/modules/quickedit/js/views/FieldToolbarView.js index 578526b20bc816a6779058db15c553272042f787..0405f40da4ead9974c1584a8bf29960b4fd1b8c1 100644 --- a/core/modules/quickedit/js/views/FieldToolbarView.js +++ b/core/modules/quickedit/js/views/FieldToolbarView.js @@ -19,7 +19,7 @@ this.$root = this.$el; - this._id = 'quickedit-toolbar-for-' + this.model.id.replace(/[\/\[\]]/g, '_'); + this._id = 'quickedit-toolbar-for-' + this.model.id.replace(/[/[\]]/g, '_'); this.listenTo(this.model, 'change:state', this.stateChange); }, diff --git a/core/modules/tour/js/tour.es6.js b/core/modules/tour/js/tour.es6.js index f3b11072b1ace3421574138f3d8ea31a33fc4b6d..669a82db71a8c2dcfc7d396faddd151ac47d0ec4 100644 --- a/core/modules/tour/js/tour.es6.js +++ b/core/modules/tour/js/tour.es6.js @@ -154,8 +154,8 @@ }, // HTML segments for tip layout. template: { - link: '<a href=\"#close\" class=\"joyride-close-tip\">×</a>', - button: '<a href=\"#\" class=\"button button--primary joyride-next-tip\"></a>', + link: '<a href="#close" class="joyride-close-tip">×</a>', + button: '<a href="#" class="button button--primary joyride-next-tip"></a>', }, }); this.model.set({ isActive: true, activeTour: $tour }); diff --git a/core/modules/tour/js/tour.js b/core/modules/tour/js/tour.js index f20796a43681dafa2debb41c54b80bc98b633992..afe1b14bd72c44feb0c16f6558d44e4a964d3545 100644 --- a/core/modules/tour/js/tour.js +++ b/core/modules/tour/js/tour.js @@ -71,8 +71,8 @@ }, template: { - link: '<a href=\"#close\" class=\"joyride-close-tip\">×</a>', - button: '<a href=\"#\" class=\"button button--primary joyride-next-tip\"></a>' + link: '<a href="#close" class="joyride-close-tip">×</a>', + button: '<a href="#" class="button button--primary joyride-next-tip"></a>' } }); this.model.set({ isActive: true, activeTour: $tour });