Skip to content

Commit 739b9e6

Browse files
authored
chore(eslint): make @typescript-eslint/no-unused-vars error (#2676)
* chore(eslint): make @typescript-eslint/no-unused-vars error * log Running raw find
1 parent dc4c3db commit 739b9e6

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

configs/eslint-config-compass/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const tsConfigurations = [
66
'plugin:@typescript-eslint/recommended-requiring-type-checking',
77
];
88
const tsRules = {
9+
'@typescript-eslint/no-unused-vars': 'error',
910
'@typescript-eslint/no-unsafe-assignment': 'off',
1011
'@typescript-eslint/no-unsafe-call': 'off',
1112
'@typescript-eslint/no-unsafe-member-access': 'off',
@@ -22,6 +23,7 @@ const testConfigurations = ['plugin:mocha/recommended'];
2223
const testRules = {
2324
'mocha/no-exclusive-tests': 'error',
2425
'mocha/no-hooks-for-single-case': 'off',
26+
'@typescript-eslint/no-explicit-any': 'off',
2527
};
2628

2729
module.exports = {

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"postpackages-publish": "git push && git push --tags",
2929
"packages-version": "lerna version --allow-branch main --no-push --no-private -m \"chore(release): Bump package versions\"",
3030
"release": "npm run release --workspace mongodb-compass --",
31+
"reformat": "lerna run reformat --stream",
3132
"package-compass": "npm run package-compass --workspace=mongodb-compass --",
3233
"start": "npm run start --workspace=mongodb-compass",
3334
"test": "lerna run test --concurrency 1 --stream",

packages/connect-form/src/utils/connect-form-errors.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export type ConnectionFormError =
3535
| SSHTunnelFieldError;
3636

3737
export function getConnectFormErrors(
38+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
3839
connectionOptions: ConnectionOptions
3940
): ConnectionFormError[] {
4041
return [];

packages/connect-form/src/utils/connect-form-warnings.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export interface ConnectionFormWarning {
55
}
66

77
export function getConnectFormWarnings(
8+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
89
connectionOptions: ConnectionOptions
910
): ConnectionFormWarning[] {
1011
return [];

packages/connections/src/components/connections.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import React from 'react';
33
import {
44
Banner,
55
BannerVariant,
6-
MongoDBLogo,
76
compassUIColors,
87
spacing,
98
} from '@mongodb-js/compass-components';
@@ -32,11 +31,6 @@ const connectStyles = css({
3231
background: compassUIColors.gray8,
3332
});
3433

35-
const logoStyles = css({
36-
margin: spacing[5],
37-
marginBottom: 0,
38-
});
39-
4034
const connectItemContainerStyles = css({
4135
position: 'relative',
4236
flexGrow: 1,

packages/data-service/src/data-service.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
BulkWriteOptions,
1111
ClientSession,
1212
Collection,
13-
CollectionInfo,
1413
CollStats,
1514
CommandFailedEvent,
1615
CommandSucceededEvent,
@@ -32,7 +31,6 @@ import {
3231
InsertManyResult,
3332
InsertOneOptions,
3433
InsertOneResult,
35-
ListCollectionsOptions,
3634
MongoClient,
3735
MongoClientOptions,
3836
ServerClosedEvent,
@@ -912,6 +910,9 @@ class DataService extends EventEmitter {
912910
'Running raw find',
913911
{ ns }
914912
);
913+
914+
logop(null);
915+
915916
return this._collection(ns).find(filter, options);
916917
}
917918

packages/data-service/src/instance-detail-helper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export async function getInstance(
139139
featureCompatibilityVersion: 1,
140140
}).catch(() => null),
141141

142-
runCommand(adminDb, { atlasVersion: 1 }).catch((err) => {
142+
runCommand(adminDb, { atlasVersion: 1 }).catch(() => {
143143
return { version: '', gitVersion: '' };
144144
}),
145145
]);

packages/data-service/test/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Db, MongoClient } from 'mongodb';
1+
import { MongoClient } from 'mongodb';
22

33
type ClientMockOptions = {
44
hosts: [{ host: string; port: number }];

0 commit comments

Comments
 (0)