diff --git a/.prettierrc.json b/.prettierrc.json
index 7a3225012..7c96270d8 100644
--- a/.prettierrc.json
+++ b/.prettierrc.json
@@ -8,6 +8,12 @@
"parser": "html",
"htmlWhitespaceSensitivity": "ignore"
}
+ },
+ {
+ "files": ["public/*.html"],
+ "options": {
+ "trailingComma": "es5"
+ }
}
]
}
diff --git a/public/index.html b/public/index.html
index 32a4c7817..627541a49 100644
--- a/public/index.html
+++ b/public/index.html
@@ -564,7 +564,7 @@
Form interaction
editItems: true,
maxItemCount: 5,
removeItemButton: true,
- },
+ }
);
var textUniqueVals = new Choices('#choices-text-unique-values', {
@@ -612,7 +612,7 @@ Form interaction
{
prependValue: 'item-',
appendValue: '-' + Date.now(),
- },
+ }
).removeActiveItems();
var textPresetVal = new Choices('#choices-text-preset-values', {
@@ -629,7 +629,7 @@ Form interaction
});
var multipleDefault = new Choices(
- document.getElementById('choices-multiple-groups'),
+ document.getElementById('choices-multiple-groups')
);
var multipleFetch = new Choices('#choices-multiple-remote-fetch', {
@@ -638,7 +638,7 @@ Form interaction
maxItemCount: 5,
}).setChoices(function() {
return fetch(
- 'https://api.discogs.com/artists/55980/releases?token=QBRmstCkwXEvCjTclCpumbtNwvVkEzGAdELXyRyW',
+ 'https://api.discogs.com/artists/55980/releases?token=QBRmstCkwXEvCjTclCpumbtNwvVkEzGAdELXyRyW'
)
.then(function(response) {
return response.json();
@@ -654,7 +654,7 @@ Form interaction
'#choices-multiple-remove-button',
{
removeItemButton: true,
- },
+ }
);
/* Use label on event */
@@ -673,7 +673,7 @@ Form interaction
],
'value',
'label',
- false,
+ false
);
choicesSelect.passedElement.element.addEventListener(
@@ -681,7 +681,7 @@ Form interaction
function(event) {
document.getElementById('message').innerHTML =
'You just added "' + event.detail.label + '"';
- },
+ }
);
choicesSelect.passedElement.element.addEventListener(
@@ -689,7 +689,7 @@ Form interaction
function(event) {
document.getElementById('message').innerHTML =
'You just removed "' + event.detail.label + '"';
- },
+ }
);
var singleFetch = new Choices('#choices-single-remote-fetch', {
@@ -697,7 +697,7 @@ Form interaction
})
.setChoices(function() {
return fetch(
- 'https://api.discogs.com/artists/391170/releases?token=QBRmstCkwXEvCjTclCpumbtNwvVkEzGAdELXyRyW',
+ 'https://api.discogs.com/artists/391170/releases?token=QBRmstCkwXEvCjTclCpumbtNwvVkEzGAdELXyRyW'
)
.then(function(response) {
return response.json();
@@ -717,7 +717,7 @@ Form interaction
searchPlaceholderValue: "Search for a Smiths' record",
}).setChoices(function(callback) {
return fetch(
- 'https://api.discogs.com/artists/83080/releases?token=QBRmstCkwXEvCjTclCpumbtNwvVkEzGAdELXyRyW',
+ 'https://api.discogs.com/artists/83080/releases?token=QBRmstCkwXEvCjTclCpumbtNwvVkEzGAdELXyRyW'
)
.then(function(res) {
return res.json();
@@ -750,7 +750,7 @@ Form interaction
],
'value',
'label',
- false,
+ false
);
var singlePresetOpts = new Choices('#choices-single-preset-options', {
@@ -779,7 +779,7 @@ Form interaction
},
],
'value',
- 'label',
+ 'label'
);
var singleSelectedOpt = new Choices('#choices-single-selected-option', {
@@ -801,7 +801,7 @@ Form interaction
'#choices-with-custom-props-via-html',
{
searchFields: ['label', 'value', 'customProperties'],
- },
+ }
);
var singleNoSorting = new Choices('#choices-single-no-sorting', {
@@ -810,7 +810,7 @@ Form interaction
var cities = new Choices(document.getElementById('cities'));
var tubeStations = new Choices(
- document.getElementById('tube-stations'),
+ document.getElementById('tube-stations')
).disable();
cities.passedElement.element.addEventListener('change', function(e) {
@@ -838,7 +838,7 @@ Form interaction
String(
data.highlighted
? classNames.highlightedState
- : classNames.itemSelectable,
+ : classNames.itemSelectable
) +
'"\
data-item\
@@ -859,7 +859,7 @@ Form interaction
String(data.label) +
'\
\
- ',
+ '
);
},
choice: function(classNames, data) {
@@ -874,7 +874,7 @@ Form interaction
String(
data.disabled
? classNames.itemDisabled
- : classNames.itemSelectable,
+ : classNames.itemSelectable
) +
'"\
data-select-text="' +
@@ -885,7 +885,7 @@ Form interaction
String(
data.disabled
? 'data-choice-disabled aria-disabled="true"'
- : 'data-choice-selectable',
+ : 'data-choice-selectable'
) +
'\
data-id="' +
@@ -896,7 +896,7 @@ Form interaction
'"\
' +
String(
- data.groupId > 0 ? 'role="treeitem"' : 'role="option"',
+ data.groupId > 0 ? 'role="treeitem"' : 'role="option"'
) +
'\
>\
@@ -904,12 +904,12 @@ Form interaction
String(data.label) +
'\
\
- ',
+ '
);
},
};
},
- },
+ }
);
var resetSimple = new Choices(document.getElementById('reset-simple'));