diff --git a/configs/eslint-config-compass/index.js b/configs/eslint-config-compass/index.js index 3e345d4ffc7..de84d604602 100644 --- a/configs/eslint-config-compass/index.js +++ b/configs/eslint-config-compass/index.js @@ -34,7 +34,6 @@ const extraTsRules = { '@typescript-eslint/unbound-method': 'warn', '@typescript-eslint/no-duplicate-type-constituents': 'warn', '@typescript-eslint/no-unsafe-declaration-merging': 'warn', - '@typescript-eslint/no-floating-promises': 'warn', '@typescript-eslint/no-unsafe-enum-comparison': 'warn', '@typescript-eslint/no-misused-promises': 'warn', '@typescript-eslint/no-duplicate-enum-values': 'warn', diff --git a/packages/compass/src/main/auto-update-manager.spec.ts b/packages/compass/src/main/auto-update-manager.spec.ts index 800907222dc..026f7b27f1f 100644 --- a/packages/compass/src/main/auto-update-manager.spec.ts +++ b/packages/compass/src/main/auto-update-manager.spec.ts @@ -24,7 +24,7 @@ function setStateAndWaitForUpdate( if (newState === expected) { resolved = true; CompassAutoUpdateManager.off('new-state', resolveWhenState); - Promise.resolve( + void Promise.resolve( CompassAutoUpdateManager['currentStateTransition'] ).finally(() => { CompassAutoUpdateManager['currentActionAbortController'].abort(); diff --git a/packages/compass/src/main/index.ts b/packages/compass/src/main/index.ts index 9260b59233c..55aa1570138 100644 --- a/packages/compass/src/main/index.ts +++ b/packages/compass/src/main/index.ts @@ -116,13 +116,13 @@ async function main(): Promise { process.stderr.write('Exiting due to uncaughtException:\n'); // eslint-disable-next-line no-console console.error(err); - CompassApplication.runExitHandlers().finally(() => app.exit(1)); + void CompassApplication.runExitHandlers().finally(() => app.exit(1)); }); process.on('unhandledRejection', (err) => { process.stderr.write('Exiting due to unhandledRejection:\n'); // eslint-disable-next-line no-console console.error(err); - CompassApplication.runExitHandlers().finally(() => app.exit(1)); + void CompassApplication.runExitHandlers().finally(() => app.exit(1)); }); } diff --git a/packages/data-service/src/instance-detail-helper.spec.ts b/packages/data-service/src/instance-detail-helper.spec.ts index 4f6d9a79917..54a7acc020d 100644 --- a/packages/data-service/src/instance-detail-helper.spec.ts +++ b/packages/data-service/src/instance-detail-helper.spec.ts @@ -277,26 +277,24 @@ describe('instance-detail-helper', function () { }); context('isAtlas and isLocalAtlas', function () { - it(`should be identified as atlas with hostname correct hostnames`, function () { - ['myserver.mongodb.net', 'myserver.mongodb-dev.net'].map( - async (hostname) => { - const { client, connectionString } = createMongoClientMock({ - hosts: [{ host: hostname, port: 9999 }], - commands: { - buildInfo: {}, - getCmdLineOpts: fixtures.CMD_LINE_OPTS, - }, - }); + for (const hostname of [ + 'myserver.mongodb.net', + 'myserver.mongodb-dev.net', + ]) { + it(`should be identified as atlas when hostname = ${hostname}`, async function () { + const { client, connectionString } = createMongoClientMock({ + hosts: [{ host: hostname, port: 9999 }], + commands: { + buildInfo: {}, + getCmdLineOpts: fixtures.CMD_LINE_OPTS, + }, + }); - const instanceDetails = await getInstance( - client, - connectionString - ); + const instanceDetails = await getInstance(client, connectionString); - expect(instanceDetails).to.have.property('isAtlas', true); - } - ); - }); + expect(instanceDetails).to.have.property('isAtlas', true); + }); + } it(`should be identified as atlas when atlasVersion command is present`, async function () { const { client, connectionString } = createMongoClientMock({