Use explicit jQuery import, remove unused eslint globals (#18435)

- Don't rely on globals (window.$) for jQuery import
- Remove eslint globals no longer in use
This commit is contained in:
silverwind 2022-01-28 13:00:11 -08:00 committed by GitHub
parent 7b04c97b7b
commit 19b017f398
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
51 changed files with 76 additions and 18 deletions

View file

@ -1,3 +1,7 @@
import $ from 'jquery';
const preventListener = (e) => e.preventDefault();
/**
* Attaches `input` handlers to markdown rendered tasklist checkboxes in comments.
*
@ -5,9 +9,6 @@
* is set accordingly and sent to the server. On success it updates the raw-content on
* error it resets the checkbox to its original value.
*/
const preventListener = (e) => e.preventDefault();
export function initMarkupTasklist() {
for (const el of document.querySelectorAll(`.markup[data-can-edit=true]`) || []) {
const container = el.parentNode;