diff --git a/services/docstore/app/coffee/DocArchiveManager.js b/services/docstore/app/coffee/DocArchiveManager.js index e3c048558e..636d8b155b 100644 --- a/services/docstore/app/coffee/DocArchiveManager.js +++ b/services/docstore/app/coffee/DocArchiveManager.js @@ -1,3 +1,10 @@ +/* eslint-disable + camelcase, + handle-callback-err, + no-useless-escape, +*/ +// TODO: This file was created by bulk-decaffeinate. +// Fix any style issues and re-enable lint. /* * decaffeinate suggestions: * DS102: Remove unnecessary code created because of implicit returns diff --git a/services/docstore/app/coffee/DocManager.js b/services/docstore/app/coffee/DocManager.js index 8bb86d8eb3..bddb1ee937 100644 --- a/services/docstore/app/coffee/DocManager.js +++ b/services/docstore/app/coffee/DocManager.js @@ -1,3 +1,12 @@ +/* eslint-disable + camelcase, + handle-callback-err, + no-dupe-keys, + no-undef, + standard/no-callback-literal, +*/ +// TODO: This file was created by bulk-decaffeinate. +// Fix any style issues and re-enable lint. /* * decaffeinate suggestions: * DS102: Remove unnecessary code created because of implicit returns diff --git a/services/docstore/app/coffee/Errors.js b/services/docstore/app/coffee/Errors.js index 1345cc0f86..a000b8f1f4 100644 --- a/services/docstore/app/coffee/Errors.js +++ b/services/docstore/app/coffee/Errors.js @@ -1,3 +1,9 @@ +/* eslint-disable + no-proto, + no-unused-vars, +*/ +// TODO: This file was created by bulk-decaffeinate. +// Fix any style issues and re-enable lint. let Errors; var NotFoundError = function(message) { const error = new Error(message); diff --git a/services/docstore/app/coffee/HealthChecker.js b/services/docstore/app/coffee/HealthChecker.js index 1da8c770d0..143e797f4e 100644 --- a/services/docstore/app/coffee/HealthChecker.js +++ b/services/docstore/app/coffee/HealthChecker.js @@ -1,3 +1,9 @@ +/* eslint-disable + camelcase, + standard/no-callback-literal, +*/ +// TODO: This file was created by bulk-decaffeinate. +// Fix any style issues and re-enable lint. /* * decaffeinate suggestions: * DS102: Remove unnecessary code created because of implicit returns diff --git a/services/docstore/app/coffee/HttpController.js b/services/docstore/app/coffee/HttpController.js index 3d87086a0d..7f6eb9e728 100644 --- a/services/docstore/app/coffee/HttpController.js +++ b/services/docstore/app/coffee/HttpController.js @@ -1,3 +1,10 @@ +/* eslint-disable + camelcase, + handle-callback-err, + valid-typeof, +*/ +// TODO: This file was created by bulk-decaffeinate. +// Fix any style issues and re-enable lint. /* * decaffeinate suggestions: * DS101: Remove unnecessary use of Array.from @@ -150,7 +157,7 @@ module.exports = (HttpController = { _buildDocView(doc) { const doc_view = { _id: (doc._id != null ? doc._id.toString() : undefined) }; - for (let attribute of ["lines", "rev", "version", "ranges", "deleted"]) { + for (const attribute of ["lines", "rev", "version", "ranges", "deleted"]) { if (doc[attribute] != null) { doc_view[attribute] = doc[attribute]; } @@ -164,7 +171,7 @@ module.exports = (HttpController = { _buildDocsArrayView(project_id, docs) { const docViews = []; - for (let doc of Array.from(docs)) { + for (const doc of Array.from(docs)) { if (doc != null) { // There can end up being null docs for some reason :( (probably a race condition) docViews.push(HttpController._buildDocView(doc)); } else { diff --git a/services/docstore/app/coffee/MongoManager.js b/services/docstore/app/coffee/MongoManager.js index 0fc304b79f..27918267f9 100644 --- a/services/docstore/app/coffee/MongoManager.js +++ b/services/docstore/app/coffee/MongoManager.js @@ -1,3 +1,9 @@ +/* eslint-disable + camelcase, + handle-callback-err, +*/ +// TODO: This file was created by bulk-decaffeinate. +// Fix any style issues and re-enable lint. /* * decaffeinate suggestions: * DS102: Remove unnecessary code created because of implicit returns @@ -46,7 +52,7 @@ module.exports = (MongoManager = { inS3: true } }; - update.$set["project_id"] = ObjectId(project_id); + update.$set.project_id = ObjectId(project_id); return db.docs.update({_id: ObjectId(doc_id)}, update, {upsert: true}, callback); }, @@ -64,9 +70,9 @@ module.exports = (MongoManager = { $set: {}, $unset: {} }; - update.$set["inS3"] = true; - update.$unset["lines"] = true; - update.$unset["ranges"] = true; + update.$set.inS3 = true; + update.$unset.lines = true; + update.$unset.ranges = true; const query = { _id: doc_id, rev diff --git a/services/docstore/app/coffee/RangeManager.js b/services/docstore/app/coffee/RangeManager.js index 6973ebd259..cee272a8e6 100644 --- a/services/docstore/app/coffee/RangeManager.js +++ b/services/docstore/app/coffee/RangeManager.js @@ -1,3 +1,9 @@ +/* eslint-disable + camelcase, + no-return-assign, +*/ +// TODO: This file was created by bulk-decaffeinate. +// Fix any style issues and re-enable lint. /* * decaffeinate suggestions: * DS101: Remove unnecessary use of Array.from @@ -37,11 +43,11 @@ module.exports = (RangeManager = { } }; - for (let change of Array.from(ranges.changes || [])) { + for (const change of Array.from(ranges.changes || [])) { change.id = RangeManager._safeObjectId(change.id); updateMetadata(change.metadata); } - for (let comment of Array.from(ranges.comments || [])) { + for (const comment of Array.from(ranges.comments || [])) { comment.id = RangeManager._safeObjectId(comment.id); if ((comment.op != null ? comment.op.t : undefined) != null) { comment.op.t = RangeManager._safeObjectId(comment.op.t); diff --git a/services/docstore/app/coffee/mongojs.js b/services/docstore/app/coffee/mongojs.js index fd0d6cde8b..8000129ae5 100644 --- a/services/docstore/app/coffee/mongojs.js +++ b/services/docstore/app/coffee/mongojs.js @@ -1,3 +1,5 @@ +// TODO: This file was created by bulk-decaffeinate. +// Sanity-check the conversion and remove this comment. const Settings = require("settings-sharelatex"); const mongojs = require("mongojs"); const db = mongojs(Settings.mongo.url, ["docs", "docOps"]);