Revert "Add no-use-before-define linter rule"

This reverts commit fdcc5d68a2.

Unfortunately, this requires us to move exports to the bottom.
This in turn causes circular dep issues and also access of
exports.GLOBAL_VAR in the global context
This commit is contained in:
Girish Ramakrishnan
2025-10-08 20:11:55 +02:00
parent a5224258c3
commit 43e426ab9f
41 changed files with 718 additions and 681 deletions
+28 -27
View File
@@ -1,5 +1,33 @@
'use strict';
exports = module.exports = {
get,
getByIdentifierAndStatePaged,
getLatestInTargetByIdentifier, // brutal function name
add,
update,
setState,
list,
listBySiteId,
listByTypePaged,
del,
removePrivateFields,
startIntegrityCheck,
BACKUP_IDENTIFIER_BOX: 'box',
BACKUP_IDENTIFIER_MAIL: 'mail',
BACKUP_TYPE_APP: 'app',
BACKUP_TYPE_BOX: 'box',
BACKUP_TYPE_MAIL: 'mail',
BACKUP_STATE_NORMAL: 'normal', // should rename to created to avoid listing in UI?
BACKUP_STATE_CREATING: 'creating',
BACKUP_STATE_ERROR: 'error',
};
const assert = require('node:assert'),
BoxError = require('./boxerror.js'),
database = require('./database.js'),
@@ -195,30 +223,3 @@ async function startIntegrityCheck(backup) {
return taskId;
}
exports = module.exports = {
get,
getByIdentifierAndStatePaged,
getLatestInTargetByIdentifier, // brutal function name
add,
update,
setState,
list,
listBySiteId,
listByTypePaged,
del,
removePrivateFields,
startIntegrityCheck,
BACKUP_IDENTIFIER_BOX: 'box',
BACKUP_IDENTIFIER_MAIL: 'mail',
BACKUP_TYPE_APP: 'app',
BACKUP_TYPE_BOX: 'box',
BACKUP_TYPE_MAIL: 'mail',
BACKUP_STATE_NORMAL: 'normal', // should rename to created to avoid listing in UI?
BACKUP_STATE_CREATING: 'creating',
BACKUP_STATE_ERROR: 'error',
};