From d6dcda908c965ec18361a5142e3319bb46f22697 Mon Sep 17 00:00:00 2001 From: Marcus Quinn <6428977+marcusquinn@users.noreply.github.com> Date: Tue, 17 Mar 2026 21:00:19 +0000 Subject: [PATCH] fix: change comma-dangle rule to always-multiline per review feedback (#88) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Addresses Gemini review feedback from PR #66 (issue #73). Changes 'comma-dangle' from 'never' to 'always-multiline' to improve maintainability — cleaner git diffs and easier line reordering. Updates admin/js files to comply with the new rule. Closes #73 --- .eslintrc.js | 2 +- admin/js/admin-scripts.js | 14 +++++++------- admin/js/update-source-selector.js | 16 ++++++++-------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 6d22ada..3010150 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -16,7 +16,7 @@ module.exports = { sourceType: 'module' }, rules: { - 'comma-dangle': ['error', 'never'], + 'comma-dangle': ['error', 'always-multiline'], 'no-console': 'warn', 'no-unused-vars': 'warn' }, diff --git a/admin/js/admin-scripts.js b/admin/js/admin-scripts.js index 725c722..2ea8522 100644 --- a/admin/js/admin-scripts.js +++ b/admin/js/admin-scripts.js @@ -78,7 +78,7 @@ data: { action: 'wpst_save_settings', nonce: wpstData.nonce, - formData: formData + formData: formData, }, success: function (response) { if (response.success) { @@ -93,8 +93,8 @@ complete: function () { // Re-enable submit button and remove loading state. $submitButton.prop( 'disabled', false ).removeClass( 'loading' ); - } - } + }, + }, ); }, @@ -123,19 +123,19 @@ 300, function () { $( this ).remove(); - } + }, ); }, - 5000 + 5000, ); - } + }, }; // Initialize when document is ready. $( document ).ready( function () { WPSTAdmin.init(); - } + }, ); })( jQuery ); diff --git a/admin/js/update-source-selector.js b/admin/js/update-source-selector.js index af92df5..0bcddae 100644 --- a/admin/js/update-source-selector.js +++ b/admin/js/update-source-selector.js @@ -48,7 +48,7 @@ if ($( e.target ).hasClass( 'wpst-modal' )) { WPSTUpdateSourceSelector.closeModal(); } - } + }, ); // Select source option. @@ -116,7 +116,7 @@ data: { action: 'wpst_set_update_source', // AJAX action hook. nonce: wpstModalData.nonce, // Security nonce. - source: this.selectedSource + source: this.selectedSource, }, success: function (response) { if (response.success) { @@ -127,7 +127,7 @@ function () { WPSTUpdateSourceSelector.closeModal(); }, - 1500 + 1500, ); } else { WPSTUpdateSourceSelector.showMessage( 'error', response.data.message ); @@ -139,8 +139,8 @@ complete: function () { // Reset button state. $saveButton.prop( 'disabled', false ).text( wpstModalData.i18n.confirm ); - } - } + }, + }, ); }, @@ -166,17 +166,17 @@ function () { $message.fadeOut( 300 ); }, - 3000 + 3000, ); } - } + }, }; // Initialize when document is ready. $( document ).ready( function () { WPSTUpdateSourceSelector.init(); - } + }, ); })( jQuery );