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

View File

@@ -200,6 +200,13 @@ async function configureMail(mailFqdn, mailDomain, serviceConfig) {
await shell.bash(runCmd, { encoding: 'utf8' });
}
async function getLocation() {
const subdomain = await settings.get(settings.MAIL_SUBDOMAIN_KEY);
const domain = await settings.get(settings.MAIL_DOMAIN_KEY);
return new Location(subdomain, domain, Location.TYPE_MAIL);
}
async function restart() {
if (constants.TEST && !process.env.TEST_CREATE_INFRA) return;
@@ -265,13 +272,6 @@ async function checkCertificate() {
await restartIfActivated();
}
async function getLocation() {
const subdomain = await settings.get(settings.MAIL_SUBDOMAIN_KEY);
const domain = await settings.get(settings.MAIL_DOMAIN_KEY);
return new Location(subdomain, domain, Location.TYPE_MAIL);
}
async function changeLocation(auditSource, progressCallback) {
assert.strictEqual(typeof auditSource, 'object');
assert.strictEqual(typeof progressCallback, 'function');
@@ -351,3 +351,4 @@ async function getMailAuth() {
relayToken
};
}