Commit 802cf3aa authored by Winnie Hellmann's avatar Winnie Hellmann Committed by Natalia Tepluhina

Enable ESLint rule no-jquery/no-sizzle

parent 0431f9d9
......@@ -51,7 +51,6 @@ rules:
no-jquery/no-animate-toggle: off
no-jquery/no-event-shorthand: off
no-jquery/no-serialize: error
no-jquery/no-sizzle: off
promise/always-return: off
promise/no-callback-in-promise: off
overrides:
......
......@@ -1359,7 +1359,8 @@ export default class Notes {
const $systemNote = $(systemNote);
const headerMessage = $systemNote
.find('.note-text')
.find('p:first')
.find('p')
.first()
.text()
.replace(':', '');
......
......@@ -11,7 +11,9 @@ export default function notificationsDropdown() {
}
const notificationLevel = $(this).data('notificationLevel');
const form = $(this).parents('.notification-form:first');
const form = $(this)
.parents('.notification-form')
.first();
form.find('.js-notification-loading').toggleClass('fa-bell fa-spin fa-spinner');
if (form.hasClass('no-label')) {
......
......@@ -31,7 +31,7 @@ export default class NotificationsForm {
}
saveEvent($checkbox, $parent) {
const form = $parent.parents('form:first');
const form = $parent.parents('form').first();
this.showCheckboxLoadingSpinner($parent);
......
......@@ -21,7 +21,9 @@ export default class TreeView {
}
});
// Show the "Loading commit data" for only the first element
$('span.log_loading:first').removeClass('hide');
$('span.log_loading')
.first()
.removeClass('hide');
}
initKeyNav() {
......
......@@ -90,7 +90,10 @@ const bindEvents = () => {
projectNew.onProjectNameChange($activeTabProjectName, $activeTabProjectPath),
);
$projectFieldsForm.find('.js-select-namespace:first').val(subgroupId);
$projectFieldsForm
.find('.js-select-namespace')
.first()
.val(subgroupId);
}
$useCustomTemplateBtn.on('change', chooseTemplate);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment