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:
+28
-27
@@ -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',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user