Skip to content

Commit c634e2c

Browse files
committed
Fix linter.
1 parent f73b066 commit c634e2c

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

packages/tracing/src/integrations/node/apollo.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { EventProcessor, Integration } from '@sentry/types';
33
import { fill, isThenable, loadModule, logger } from '@sentry/utils';
44

55
type ApolloResolverGroup = {
6-
[key: string]: () => any;
6+
[key: string]: () => unknown;
77
};
88

99
type ApolloModelResolvers = {
@@ -32,7 +32,7 @@ export class Apollo implements Integration {
3232
constructSchema: () => unknown;
3333
};
3434
};
35-
}>(`apollo-server-core`);
35+
}>('apollo-server-core');
3636

3737
if (!pkg) {
3838
logger.error('Apollo Integration was unable to require apollo-server-core package.');
@@ -42,8 +42,8 @@ export class Apollo implements Integration {
4242
/**
4343
* Iterate over resolvers of the ApolloServer instance before schemas are constructed.
4444
*/
45-
fill(pkg.ApolloServerBase.prototype, 'constructSchema', function(orig: () => void) {
46-
return function(this: { config: { resolvers: ApolloModelResolvers[] } }) {
45+
fill(pkg.ApolloServerBase.prototype, 'constructSchema', function (orig: () => void) {
46+
return function (this: { config: { resolvers: ApolloModelResolvers[] } }) {
4747
this.config.resolvers = this.config.resolvers.map(model => {
4848
Object.keys(model).forEach(resolverGroupName => {
4949
Object.keys(model[resolverGroupName]).forEach(resolverName => {
@@ -73,13 +73,13 @@ function wrapResolver(
7373
resolverName: string,
7474
getCurrentHub: () => Hub,
7575
): void {
76-
fill(model[resolverGroupName], resolverName, function(orig: () => unknown | Promise<unknown>) {
77-
return function(this: unknown, ...args: unknown[]) {
76+
fill(model[resolverGroupName], resolverName, function (orig: () => unknown | Promise<unknown>) {
77+
return function (this: unknown, ...args: unknown[]) {
7878
const scope = getCurrentHub().getScope();
7979
const parentSpan = scope?.getSpan();
8080
const span = parentSpan?.startChild({
8181
description: `${resolverGroupName}.${resolverName}`,
82-
op: `apollo`,
82+
op: 'apollo',
8383
});
8484

8585
scope?.setSpan(span);

packages/tracing/src/integrations/node/graphql.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ export class GraphQL implements Integration {
2020
public setupOnce(_: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {
2121
const pkg = loadModule<{
2222
[method: string]: (...args: unknown[]) => unknown;
23-
}>(`graphql/execution/execute.js`);
23+
}>('graphql/execution/execute.js');
2424

2525
if (!pkg) {
2626
logger.error('GraphQL Integration was unable to require graphql/execution package.');
2727
return;
2828
}
2929

30-
fill(pkg, 'execute', function(orig: () => void | Promise<unknown>) {
31-
return function(this: unknown, ...args: unknown[]) {
30+
fill(pkg, 'execute', function (orig: () => void | Promise<unknown>) {
31+
return function (this: unknown, ...args: unknown[]) {
3232
const scope = getCurrentHub().getScope();
3333
const parentSpan = scope?.getSpan();
3434

packages/tracing/test/integrations/apollo.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ class ApolloServerBase {
2222
resolvers: [
2323
{
2424
Query: {
25-
res_1(...args: unknown[]) {
25+
res_1(..._args: unknown[]) {
2626
return 'foo';
2727
},
2828
},
2929
Mutation: {
30-
res_2(...args: unknown[]) {
30+
res_2(..._args: unknown[]) {
3131
return 'bar';
3232
},
3333
},
@@ -38,7 +38,7 @@ class ApolloServerBase {
3838
this.constructSchema();
3939
}
4040

41-
public constructSchema(...args: unknown[]) {
41+
public constructSchema(..._args: unknown[]) {
4242
return null;
4343
}
4444
}

packages/tracing/test/integrations/graphql.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ describe('setupOnce', () => {
4343
jest.spyOn(childSpan, 'finish');
4444
});
4545

46-
it(`should wrap execute method`, async () => {
46+
it('should wrap execute method', async () => {
4747
await GQLExecute.execute();
4848
expect(scope.getSpan).toBeCalled();
4949
expect(parentSpan.startChild).toBeCalledWith({

0 commit comments

Comments
 (0)