Skip to content

Commit 402491c

Browse files
committed
refactor: xo feedback / prettier/prettier
1 parent 9799734 commit 402491c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

datalist-polyfill.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,15 @@
8686

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

9293
if (getInputValue(input) !== '') {
9394
// Prepare the options and toggle the visiblity afterwards
9495
toggleVisibility(
9596
prepOptions(datalistNeedsAnUpdate, input).length,
97+
// eslint-disable-next-line prettier/prettier
9698
datalistNeedsAnUpdate.querySelector(classNamePolyfillingSelect)
9799
);
98100
}
@@ -219,6 +221,7 @@
219221
var option = datalist.querySelector(
220222
'option[value="' +
221223
getInputValue(input).replace(/\\([\s\S])|(")/g, '\\$1$2') +
224+
// eslint-disable-next-line prettier/prettier
222225
'"]'
223226
);
224227

@@ -243,6 +246,7 @@
243246
option.disabled === false &&
244247
((optValue !== '' && optValue.indexOf(inptValue) !== -1) ||
245248
(label && label.toLowerCase().indexOf(inptValue) !== -1) ||
249+
// eslint-disable-next-line prettier/prettier
246250
(text !== '' && text.indexOf(inptValue) !== -1))
247251
);
248252
};
@@ -404,6 +408,7 @@
404408
if (isValidSuggestion(opt, inputValue)) {
405409
var textOptionPart = text.slice(
406410
0,
411+
// eslint-disable-next-line prettier/prettier
407412
optionValue.length + textValueSeperator.length
408413
),
409414
optionPart = optionValue + textValueSeperator;
@@ -439,6 +444,7 @@
439444

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

@@ -501,6 +507,7 @@
501507
'-' +
502508
(rects[0].width +
503509
parseFloat(inputStyles.getPropertyValue('margin-' + direction))) +
510+
// eslint-disable-next-line prettier/prettier
504511
'px'
505512
);
506513
datalistSelect.style.marginTop =

0 commit comments

Comments
 (0)