fix: change comma-dangle rule to always-multiline per review feedback (#88)
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
This commit is contained in:
@@ -16,7 +16,7 @@ module.exports = {
|
|||||||
sourceType: 'module'
|
sourceType: 'module'
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
'comma-dangle': ['error', 'never'],
|
'comma-dangle': ['error', 'always-multiline'],
|
||||||
'no-console': 'warn',
|
'no-console': 'warn',
|
||||||
'no-unused-vars': 'warn'
|
'no-unused-vars': 'warn'
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
data: {
|
data: {
|
||||||
action: 'wpst_save_settings',
|
action: 'wpst_save_settings',
|
||||||
nonce: wpstData.nonce,
|
nonce: wpstData.nonce,
|
||||||
formData: formData
|
formData: formData,
|
||||||
},
|
},
|
||||||
success: function (response) {
|
success: function (response) {
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
@@ -93,8 +93,8 @@
|
|||||||
complete: function () {
|
complete: function () {
|
||||||
// Re-enable submit button and remove loading state.
|
// Re-enable submit button and remove loading state.
|
||||||
$submitButton.prop( 'disabled', false ).removeClass( 'loading' );
|
$submitButton.prop( 'disabled', false ).removeClass( 'loading' );
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -123,19 +123,19 @@
|
|||||||
300,
|
300,
|
||||||
function () {
|
function () {
|
||||||
$( this ).remove();
|
$( this ).remove();
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
5000
|
5000,
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
// Initialize when document is ready.
|
// Initialize when document is ready.
|
||||||
$( document ).ready(
|
$( document ).ready(
|
||||||
function () {
|
function () {
|
||||||
WPSTAdmin.init();
|
WPSTAdmin.init();
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
})( jQuery );
|
})( jQuery );
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
if ($( e.target ).hasClass( 'wpst-modal' )) {
|
if ($( e.target ).hasClass( 'wpst-modal' )) {
|
||||||
WPSTUpdateSourceSelector.closeModal();
|
WPSTUpdateSourceSelector.closeModal();
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
// Select source option.
|
// Select source option.
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
data: {
|
data: {
|
||||||
action: 'wpst_set_update_source', // AJAX action hook.
|
action: 'wpst_set_update_source', // AJAX action hook.
|
||||||
nonce: wpstModalData.nonce, // Security nonce.
|
nonce: wpstModalData.nonce, // Security nonce.
|
||||||
source: this.selectedSource
|
source: this.selectedSource,
|
||||||
},
|
},
|
||||||
success: function (response) {
|
success: function (response) {
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
function () {
|
function () {
|
||||||
WPSTUpdateSourceSelector.closeModal();
|
WPSTUpdateSourceSelector.closeModal();
|
||||||
},
|
},
|
||||||
1500
|
1500,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
WPSTUpdateSourceSelector.showMessage( 'error', response.data.message );
|
WPSTUpdateSourceSelector.showMessage( 'error', response.data.message );
|
||||||
@@ -139,8 +139,8 @@
|
|||||||
complete: function () {
|
complete: function () {
|
||||||
// Reset button state.
|
// Reset button state.
|
||||||
$saveButton.prop( 'disabled', false ).text( wpstModalData.i18n.confirm );
|
$saveButton.prop( 'disabled', false ).text( wpstModalData.i18n.confirm );
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -166,17 +166,17 @@
|
|||||||
function () {
|
function () {
|
||||||
$message.fadeOut( 300 );
|
$message.fadeOut( 300 );
|
||||||
},
|
},
|
||||||
3000
|
3000,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
// Initialize when document is ready.
|
// Initialize when document is ready.
|
||||||
$( document ).ready(
|
$( document ).ready(
|
||||||
function () {
|
function () {
|
||||||
WPSTUpdateSourceSelector.init();
|
WPSTUpdateSourceSelector.init();
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
})( jQuery );
|
})( jQuery );
|
||||||
|
|||||||
Reference in New Issue
Block a user