Merge pull request #3495 from overleaf/ae-prettier-2

Upgrade Prettier to v2

GitOrigin-RevId: 85aa3fa1acb6332c4f58c46165a43d1a51471f33
This commit is contained in:
Alf Eaton
2021-04-15 02:05:22 +00:00
committed by Copybot
parent 930d7ba028
commit 1ebc8a79cb
582 changed files with 20382 additions and 20374 deletions
@@ -26,9 +26,9 @@ function withErrorBoundary(WrappedComponent, FallbackComponent) {
)
}
ErrorBoundaryWrapper.propTypes = WrappedComponent.propTypes
ErrorBoundaryWrapper.displayName = `WithErrorBoundaryWrapper${WrappedComponent.displayName ||
WrappedComponent.name ||
'Component'}`
ErrorBoundaryWrapper.displayName = `WithErrorBoundaryWrapper${
WrappedComponent.displayName || WrappedComponent.name || 'Component'
}`
return ErrorBoundaryWrapper
}
@@ -10,7 +10,7 @@
* @param {string?} key Key passed to the localStorage function (if any)
* @param {any?} value Value passed to the localStorage function (if any)
*/
const callSafe = function(fn, key, value) {
const callSafe = function (fn, key, value) {
try {
return fn(key, value)
} catch (e) {
@@ -19,19 +19,19 @@ const callSafe = function(fn, key, value) {
}
}
const getItem = function(key) {
const getItem = function (key) {
return JSON.parse(localStorage.getItem(key))
}
const setItem = function(key, value) {
const setItem = function (key, value) {
localStorage.setItem(key, JSON.stringify(value))
}
const clear = function() {
const clear = function () {
localStorage.clear()
}
const removeItem = function(key) {
const removeItem = function (key) {
return localStorage.removeItem(key)
}