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
+25 -24
View File
@@ -1,5 +1,30 @@
'use strict';
exports = module.exports = {
setup,
teardown,
cleanup,
verifyConfig,
removePrivateFields,
injectPrivateFields,
getAvailableSize,
getStatus,
upload,
download,
copy,
copyDir,
exists,
listDir,
remove,
removeDir,
};
const assert = require('node:assert'),
BoxError = require('../boxerror.js'),
debug = require('debug')('box:storage/filesystem'),
@@ -394,27 +419,3 @@ function injectPrivateFields(newConfig, currentConfig) {
if (currentConfig._managedMountPath) newConfig._managedMountPath = currentConfig._managedMountPath;
}
exports = module.exports = {
setup,
teardown,
cleanup,
verifyConfig,
removePrivateFields,
injectPrivateFields,
getAvailableSize,
getStatus,
upload,
download,
copy,
copyDir,
exists,
listDir,
remove,
removeDir,
};
+25 -24
View File
@@ -1,5 +1,30 @@
'use strict';
exports = module.exports = {
getAvailableSize,
getStatus,
upload,
exists,
download,
copy,
copyDir,
listDir,
remove,
removeDir,
setup,
teardown,
cleanup,
verifyConfig,
removePrivateFields,
injectPrivateFields,
};
const assert = require('node:assert'),
async = require('async'),
BoxError = require('../boxerror.js'),
@@ -258,27 +283,3 @@ function injectPrivateFields(newConfig, currentConfig) {
if (!Object.hasOwn(newConfig.credentials, 'private_key') && currentConfig.credentials) newConfig.credentials.private_key = currentConfig.credentials.private_key;
}
exports = module.exports = {
getAvailableSize,
getStatus,
upload,
exists,
download,
copy,
copyDir,
listDir,
remove,
removeDir,
setup,
teardown,
cleanup,
verifyConfig,
removePrivateFields,
injectPrivateFields,
};
+27 -26
View File
@@ -1,5 +1,32 @@
'use strict';
exports = module.exports = {
setup,
teardown,
cleanup,
verifyConfig,
removePrivateFields,
injectPrivateFields,
getAvailableSize,
getStatus,
upload,
exists,
download,
copy,
copyDir,
listDir,
remove,
removeDir,
// Used to mock AWS
_chunk: chunk
};
const assert = require('node:assert'),
async = require('async'),
BoxError = require('../boxerror.js'),
@@ -662,29 +689,3 @@ function injectPrivateFields(newConfig, currentConfig) {
newConfig._provider = currentConfig._provider;
}
exports = module.exports = {
setup,
teardown,
cleanup,
verifyConfig,
removePrivateFields,
injectPrivateFields,
getAvailableSize,
getStatus,
upload,
exists,
download,
copy,
copyDir,
listDir,
remove,
removeDir,
// Used to mock AWS
_chunk: chunk
};