Skip to content

Commit

Permalink
refactor: xo feedback / prettier/prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
mfranzke committed May 21, 2022
1 parent 9799734 commit 402491c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions datalist-polyfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,15 @@

if (datalistNeedsAnUpdate) {
var input = dcmnt.querySelector(
// eslint-disable-next-line prettier/prettier
'input[list="' + datalistNeedsAnUpdate.id + '"]'
);

if (getInputValue(input) !== '') {
// Prepare the options and toggle the visiblity afterwards
toggleVisibility(
prepOptions(datalistNeedsAnUpdate, input).length,
// eslint-disable-next-line prettier/prettier
datalistNeedsAnUpdate.querySelector(classNamePolyfillingSelect)
);
}
Expand Down Expand Up @@ -219,6 +221,7 @@
var option = datalist.querySelector(
'option[value="' +
getInputValue(input).replace(/\\([\s\S])|(")/g, '\\$1$2') +
// eslint-disable-next-line prettier/prettier
'"]'
);

Expand All @@ -243,6 +246,7 @@
option.disabled === false &&
((optValue !== '' && optValue.indexOf(inptValue) !== -1) ||
(label && label.toLowerCase().indexOf(inptValue) !== -1) ||
// eslint-disable-next-line prettier/prettier
(text !== '' && text.indexOf(inptValue) !== -1))
);
};
Expand Down Expand Up @@ -404,6 +408,7 @@
if (isValidSuggestion(opt, inputValue)) {
var textOptionPart = text.slice(
0,
// eslint-disable-next-line prettier/prettier
optionValue.length + textValueSeperator.length
),
optionPart = optionValue + textValueSeperator;
Expand Down Expand Up @@ -439,6 +444,7 @@

// Input the unused options as siblings next to the select - and differentiate in between the regular, and the IE9 fix syntax upfront
(datalist.querySelectorAll('.ie9_fix')[0] || datalist).appendChild(
// eslint-disable-next-line prettier/prettier
disabledValues
);

Expand Down Expand Up @@ -501,6 +507,7 @@
'-' +
(rects[0].width +
parseFloat(inputStyles.getPropertyValue('margin-' + direction))) +
// eslint-disable-next-line prettier/prettier
'px'
);
datalistSelect.style.marginTop =
Expand Down

0 comments on commit 402491c

Please sign in to comment.