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
@@ -21,7 +21,7 @@ import ShareJsDoc from './ShareJsDoc'
import RangesTracker from '../review-panel/RangesTracker'
let Document
export default Document = (function() {
export default Document = (function () {
Document = class Document extends EventEmitter {
static initClass() {
this.prototype.MAX_PENDING_OP_SIZE = 64
@@ -250,7 +250,7 @@ export default Document = (function() {
join(callback) {
if (callback == null) {
callback = function(error) {}
callback = function (error) {}
}
this.wantToBeJoined = true
this._cancelLeave()
@@ -266,7 +266,7 @@ export default Document = (function() {
leave(callback) {
if (callback == null) {
callback = function(error) {}
callback = function (error) {}
}
this.flush() // force an immediate flush when leaving document
this.wantToBeJoined = false
@@ -362,8 +362,9 @@ export default Document = (function() {
// In any other situation, assume the document is unsaved.
saved = false
sl_console.log(
`[pollSavedStatus] assuming not saved (inflightOp?: ${inflightOp !=
null}, pendingOp?: ${pendingOp != null})`
`[pollSavedStatus] assuming not saved (inflightOp?: ${
inflightOp != null
}, pendingOp?: ${pendingOp != null})`
)
}
@@ -471,7 +472,7 @@ export default Document = (function() {
_joinDoc(callback) {
if (callback == null) {
callback = function(error) {}
callback = function (error) {}
}
if (this.doc != null) {
this.ide.pushEvent('joinDoc:existing', {
@@ -562,7 +563,7 @@ export default Document = (function() {
_leaveDoc(callback) {
if (callback == null) {
callback = function(error) {}
callback = function (error) {}
}
this.ide.pushEvent('leaveDoc', {
doc_id: this.doc_id