Merge pull request #5367 from overleaf/jpa-node-handle-callback-err

[misc] fix eslint violations for node/handle-callback-err

GitOrigin-RevId: 83a4900e8861010df1917bff49382bd9c93375bd
This commit is contained in:
Jakob Ackermann
2021-10-27 11:49:18 +02:00
committed by Copybot
parent acd821089a
commit 18e89dd367
181 changed files with 746 additions and 658 deletions

View File

@@ -28,7 +28,7 @@ const _ = require('underscore')
module.exports = ProjectRootDocManager = {
setRootDocAutomatically(project_id, callback) {
if (callback == null) {
callback = function (error) {}
callback = function () {}
}
return ProjectEntityHandler.getAllDocs(project_id, function (error, docs) {
if (error != null) {
@@ -70,7 +70,7 @@ module.exports = ProjectRootDocManager = {
findRootDocFileFromDirectory(directoryPath, callback) {
if (callback == null) {
callback = function (error, path, content) {}
callback = function () {}
}
const filePathsPromise = globby(['**/*.{tex,Rtex}'], {
cwd: directoryPath,
@@ -131,7 +131,7 @@ module.exports = ProjectRootDocManager = {
setRootDocFromName(project_id, rootDocName, callback) {
if (callback == null) {
callback = function (error) {}
callback = function () {}
}
return ProjectEntityHandler.getAllDocPathsFromProjectById(
project_id,
@@ -180,7 +180,7 @@ module.exports = ProjectRootDocManager = {
ensureRootDocumentIsSet(project_id, callback) {
if (callback == null) {
callback = function (error) {}
callback = function () {}
}
return ProjectGetter.getProject(
project_id,
@@ -246,7 +246,7 @@ module.exports = ProjectRootDocManager = {
_sortFileList(listToSort, rootDirectory, callback) {
if (callback == null) {
callback = function (error, result) {}
callback = function () {}
}
return async.mapLimit(
listToSort,