Skip to content

Commit 6e52496

Browse files
committed
Update linting rules for @ts-ignores
1 parent 3b8e312 commit 6e52496

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

plugins/node/opentelemetry-instrumentation-mongodb/test/mongodb-v3.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ import {
3939
SEMATTRS_NET_PEER_PORT,
4040
} from '@opentelemetry/semantic-conventions';
4141

42+
// We can't use @ts-expect-error because it will fail depending on the used mongodb version on tests
43+
/* eslint-disable @typescript-eslint/ban-ts-comment */
44+
4245
describe('MongoDBInstrumentation-Tracing-v3', () => {
4346
function create(config: MongoDBInstrumentationConfig = {}) {
4447
instrumentation.setConfig(config);
@@ -619,7 +622,6 @@ describe('MongoDBInstrumentation-Tracing-v3', () => {
619622
let collection: Collection;
620623
before(done => {
621624
accessCollection(URL, DB_NAME, COLLECTION_NAME, {
622-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
623625
// @ts-ignore
624626
useUnifiedTopology: true,
625627
})
@@ -723,3 +725,5 @@ describe('MongoDBInstrumentation-Tracing-v3', () => {
723725
});
724726
});
725727
});
728+
729+
/* eslint-enable @typescript-eslint/ban-ts-comment */

plugins/node/opentelemetry-instrumentation-mongodb/test/mongodb-v4.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ import type { MongoClient, Collection } from 'mongodb';
3737
import { assertSpans, accessCollection, DEFAULT_MONGO_HOST } from './utils';
3838
import { SEMATTRS_DB_STATEMENT } from '@opentelemetry/semantic-conventions';
3939

40+
// We can't use @ts-expect-error because it will fail depending on the used mongodb version on tests
41+
/* eslint-disable @typescript-eslint/ban-ts-comment */
42+
4043
describe('MongoDBInstrumentation-Tracing-v4', () => {
4144
function create(config: MongoDBInstrumentationConfig = {}) {
4245
instrumentation.setConfig(config);
@@ -693,3 +696,5 @@ describe('MongoDBInstrumentation-Tracing-v4', () => {
693696
});
694697
});
695698
});
699+
700+
/* eslint-enable @typescript-eslint/ban-ts-comment */

plugins/node/opentelemetry-instrumentation-mongodb/test/mongodb-v5-v6.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ import type { MongoClient, Collection } from 'mongodb';
4646
import { assertSpans, accessCollection, DEFAULT_MONGO_HOST } from './utils';
4747
import { SEMATTRS_DB_STATEMENT } from '@opentelemetry/semantic-conventions';
4848

49+
// We can't use @ts-expect-error because it will fail depending on the used mongodb version on tests
50+
/* eslint-disable @typescript-eslint/ban-ts-comment */
51+
4952
describe('MongoDBInstrumentation-Tracing-v5', () => {
5053
function create(config: MongoDBInstrumentationConfig = {}) {
5154
instrumentation.setConfig(config);
@@ -706,3 +709,5 @@ describe('MongoDBInstrumentation-Tracing-v5', () => {
706709
});
707710
});
708711
});
712+
713+
/* eslint-enable @typescript-eslint/ban-ts-comment */

0 commit comments

Comments
 (0)