Skip to content

Commit 3545698

Browse files
authored
chore: remove unusued eslint directives (#3310)
1 parent bed1fe3 commit 3545698

File tree

10 files changed

+5
-10
lines changed

10 files changed

+5
-10
lines changed

.eslintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"mocha": true,
2323
"es6": true
2424
},
25+
"reportUnusedDisableDirectives": true,
2526
"rules": {
2627
"no-restricted-properties": [
2728
"error",

src/mongo_types.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,8 +514,7 @@ export type NestedPaths<Type> = Type extends
514514
? [] | [number, ...NestedPaths<ArrayType>]
515515
: Type extends Map<string, any>
516516
? [string]
517-
: // eslint-disable-next-line @typescript-eslint/ban-types
518-
Type extends object
517+
: Type extends object
519518
? {
520519
[Key in Extract<keyof Type, string>]: Type[Key] extends Type // type of value extends the parent
521520
? [Key]

src/operations/get_more.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { AbstractOperation, Aspect, defineAspects, OperationOptions } from './op
88
/**
99
* @public
1010
*/
11-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
11+
1212
export interface GetMoreOptions extends OperationOptions {
1313
/** Set the batchSize for the getMoreCommand when iterating over the query results. */
1414
batchSize?: number;

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ const TO_STRING = (object: unknown) => Object.prototype.toString.call(object);
167167
* - **NOTE**: the check is based on the `[Symbol.toStringTag]() === 'Object'`
168168
* @internal
169169
*/
170-
// eslint-disable-next-line @typescript-eslint/ban-types
170+
171171
export function isObject(arg: unknown): arg is object {
172172
return '[object Object]' === TO_STRING(arg);
173173
}

test/benchmarks/driverBench/common.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable no-restricted-modules */
21
'use strict';
32

43
const fs = require('fs');

test/integration/server-selection/readpreference.test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ describe('ReadPreference', function () {
9797
collection.mapReduce(map, reduce, { out: { inline: 1 } }, function (/* err */) {
9898
// expect(err).to.not.exist;
9999

100-
// eslint-disable-line
101100
client.topology.command = command;
102101

103102
client.close(done);

test/tools/unified-spec-runner/match.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ export type SpecialOperator =
9090
| UnsetOrMatchesOperator
9191
| SessionLsidOperator;
9292

93-
// eslint-disable-next-line @typescript-eslint/ban-types
9493
type KeysOfUnion<T> = T extends object ? keyof T : never;
9594
export type SpecialOperatorKey = KeysOfUnion<SpecialOperator>;
9695
export function isSpecialOperator(value: unknown): value is SpecialOperator {

test/types/community/client.test-d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable @typescript-eslint/no-empty-function */
21
import { expectType } from 'tsd';
32

43
import {

test/types/enum.test-d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable @typescript-eslint/no-unused-vars */
21
import { expectAssignable, expectType } from 'tsd';
32

43
import {

test/unit/assorted/server_discovery_and_monitoring.spec.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ describe('Server Discovery and Monitoring (spec)', function () {
207207
// call to `selectServers` call a fake, and then immediately restore the original behavior.
208208
topologySelectServers = sinon
209209
.stub(Topology.prototype, 'selectServer')
210-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
210+
211211
.callsFake(function (selector, options, callback) {
212212
topologySelectServers.restore();
213213

0 commit comments

Comments
 (0)