Update prettier version

This commit is contained in:
Gautier P 2020-12-05 11:50:30 +01:00
parent c49b821db7
commit 25429b3c24
42 changed files with 2480 additions and 2490 deletions

View file

@ -1,16 +1,16 @@
BR.Util = {
get: function(url, cb) {
get: function (url, cb) {
var xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
xhr.onload = function() {
xhr.onload = function () {
if ((xhr.status === 200 || xhr.status === 0) && xhr.responseText) {
cb(null, xhr.responseText);
} else {
cb(BR.Util.getError(xhr));
}
};
xhr.onerror = function() {
xhr.onerror = function () {
cb(BR.Util.getError(xhr));
};
try {
@ -20,7 +20,7 @@ BR.Util = {
}
},
getError: function(xhr) {
getError: function (xhr) {
var msg = i18next.t('warning.no-response');
if (xhr.responseText) {
msg = xhr.responseText;
@ -38,7 +38,7 @@ BR.Util = {
// https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API/Using_the_Web_Storage_API#Testing_for_support_vs_availability
// by Mozilla Contributors, with modifications;
// Any copyright is dedicated to the Public Domain. https://creativecommons.org/publicdomain/zero/1.0/
localStorageAvailable: function() {
localStorageAvailable: function () {
try {
var storage = window.localStorage,
x = '__storage_test__';
@ -51,7 +51,7 @@ BR.Util = {
},
// see https://stackoverflow.com/a/37141090/1906123
getResponsiveBreakpoint: function() {
getResponsiveBreakpoint: function () {
var envs = { '1xs': 'd-none', '2sm': 'd-sm-none', '3md': 'd-md-none', '4lg': 'd-lg-none', '5xl': 'd-xl-none' };
var env = '';
@ -69,7 +69,7 @@ BR.Util = {
return env;
},
keyboardShortcutsAllowed: function(keyEvent) {
keyboardShortcutsAllowed: function (keyEvent) {
// Skip auto-repeating key events
if (keyEvent.repeat) {
return false;
@ -102,9 +102,9 @@ BR.Util = {
// this method must only be used to sanitize for textContent.
// do NOT use it to sanitize any attribute,
// see https://web.archive.org/web/20121208091505/http://benv.ca/2012/10/4/you-are-probably-misusing-DOM-text-methods/
sanitizeHTMLContent: function(str) {
sanitizeHTMLContent: function (str) {
var temp = document.createElement('div');
temp.textContent = str;
return temp.innerHTML;
}
},
};