chore: fix linting

This commit is contained in:
Konstantinos Norgias 2021-11-08 18:28:37 +01:00
parent 4e78ebdee7
commit 26f08ccbc7

View file

@ -5,12 +5,18 @@ import { LionListbox } from '@lion/listbox';
const matchReverseFns = new WeakMap(); const matchReverseFns = new WeakMap();
const matchA11ySpanReverseFns = new WeakMap(); const matchA11ySpanReverseFns = new WeakMap();
/**
* @param {Node} root
* @param {string} matchingString
* @param {object} option
*/
function checkForTextMatch(root, matchingString, option) { function checkForTextMatch(root, matchingString, option) {
Array.from(root.childNodes).forEach(childNode => { Array.from(root.childNodes).forEach(childNode => {
if (childNode.nodeName === '#text') { if (childNode.nodeName === '#text') {
// check for match based on nodeValue // check for match based on nodeValue
const re = new RegExp(`^(.*)(${matchingString})(.*)$`, 'i'); const re = new RegExp(`^(.*)(${matchingString})(.*)$`, 'i');
// @ts-ignore
const match = childNode.nodeValue.match(re); const match = childNode.nodeValue.match(re);
if (match) { if (match) {