Commit cff37dd7 authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch 'winh-eslint-no-jquery/no-sizzle' into 'master'

Enable ESLint rule no-jquery/no-sizzle

See merge request gitlab-org/gitlab!21875
parents 0431f9d9 802cf3aa
...@@ -51,7 +51,6 @@ rules: ...@@ -51,7 +51,6 @@ rules:
no-jquery/no-animate-toggle: off no-jquery/no-animate-toggle: off
no-jquery/no-event-shorthand: off no-jquery/no-event-shorthand: off
no-jquery/no-serialize: error no-jquery/no-serialize: error
no-jquery/no-sizzle: off
promise/always-return: off promise/always-return: off
promise/no-callback-in-promise: off promise/no-callback-in-promise: off
overrides: overrides:
......
...@@ -1359,7 +1359,8 @@ export default class Notes { ...@@ -1359,7 +1359,8 @@ export default class Notes {
const $systemNote = $(systemNote); const $systemNote = $(systemNote);
const headerMessage = $systemNote const headerMessage = $systemNote
.find('.note-text') .find('.note-text')
.find('p:first') .find('p')
.first()
.text() .text()
.replace(':', ''); .replace(':', '');
......
...@@ -11,7 +11,9 @@ export default function notificationsDropdown() { ...@@ -11,7 +11,9 @@ export default function notificationsDropdown() {
} }
const notificationLevel = $(this).data('notificationLevel'); 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'); form.find('.js-notification-loading').toggleClass('fa-bell fa-spin fa-spinner');
if (form.hasClass('no-label')) { if (form.hasClass('no-label')) {
......
...@@ -31,7 +31,7 @@ export default class NotificationsForm { ...@@ -31,7 +31,7 @@ export default class NotificationsForm {
} }
saveEvent($checkbox, $parent) { saveEvent($checkbox, $parent) {
const form = $parent.parents('form:first'); const form = $parent.parents('form').first();
this.showCheckboxLoadingSpinner($parent); this.showCheckboxLoadingSpinner($parent);
......
...@@ -21,7 +21,9 @@ export default class TreeView { ...@@ -21,7 +21,9 @@ export default class TreeView {
} }
}); });
// Show the "Loading commit data" for only the first element // Show the "Loading commit data" for only the first element
$('span.log_loading:first').removeClass('hide'); $('span.log_loading')
.first()
.removeClass('hide');
} }
initKeyNav() { initKeyNav() {
......
...@@ -90,7 +90,10 @@ const bindEvents = () => { ...@@ -90,7 +90,10 @@ const bindEvents = () => {
projectNew.onProjectNameChange($activeTabProjectName, $activeTabProjectPath), projectNew.onProjectNameChange($activeTabProjectName, $activeTabProjectPath),
); );
$projectFieldsForm.find('.js-select-namespace:first').val(subgroupId); $projectFieldsForm
.find('.js-select-namespace')
.first()
.val(subgroupId);
} }
$useCustomTemplateBtn.on('change', chooseTemplate); $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