Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dyladan committed Sep 20, 2022
1 parent 235d6da commit 03fc389
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions api/src/platform/browser/globalThis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
// eslint-disable-next-line node/no-unsupported-features/es-builtins, no-undef
export const _globalThis: typeof globalThis =
typeof globalThis === 'object' ? globalThis :
typeof self === 'object' ? self :
typeof window === 'object' ? window :
typeof global === 'object' ? global :
typeof self === 'object' ? self :
typeof window === 'object' ? window :
typeof global === 'object' ? global :
{} as typeof globalThis;
8 changes: 4 additions & 4 deletions api/src/trace/NoopTracer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { SpanOptions } from './SpanOptions';
import { SpanContext } from './span_context';
import { Tracer } from './tracer';

const context = ContextAPI.getInstance();
const contextApi = ContextAPI.getInstance();

/**
* No-op implementations of {@link Tracer}.
Expand Down Expand Up @@ -87,15 +87,15 @@ export class NoopTracer implements Tracer {
fn = arg4 as F;
}

const parentContext = ctx ?? context.active();
const parentContext = ctx ?? contextApi.active();
const span = this.startSpan(name, opts, parentContext);
const contextWithSpanSet = setSpan(parentContext, span);

return context.with(contextWithSpanSet, fn, undefined, span);
return contextApi.with(contextWithSpanSet, fn, undefined, span);
}
}

function isSpanContext(spanContext: any): spanContext is SpanContext {
function isSpanContext(spanContext: unknown): spanContext is SpanContext {
return (
typeof spanContext === 'object' &&
typeof spanContext['spanId'] === 'string' &&
Expand Down
2 changes: 1 addition & 1 deletion api/test/api/api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe('API', () => {
const span = new NonRecordingSpan();
const ctx = trace.setSpan(ROOT_CONTEXT, span);
context.setGlobalContextManager({ active: () => ctx, disable: () => {} } as any);

const active = trace.getActiveSpan();
assert.strictEqual(active, span);

Expand Down
10 changes: 5 additions & 5 deletions api/test/index-webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
* limitations under the License.
*/
{
const testsContext = require.context('.', true, /test$/);
testsContext.keys().forEach(testsContext);
const testsContext = require.context('.', true, /test$/);
testsContext.keys().forEach(testsContext);
}

{
const srcContext = require.context('.', true, /src$/);
srcContext.keys().forEach(srcContext);
}
const srcContext = require.context('.', true, /src$/);
srcContext.keys().forEach(srcContext);
}
6 changes: 3 additions & 3 deletions api/test/index-webpack.worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
* limitations under the License.
*/
{
const testsContext = require.context('./', false, /test$/);
testsContext.keys().forEach(testsContext);
}
const testsContext = require.context('./', false, /test$/);
testsContext.keys().forEach(testsContext);
}

0 comments on commit 03fc389

Please sign in to comment.