diff --git a/.eslintrc.json b/.eslintrc.json index 0be733b7..1e21c053 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -18,7 +18,8 @@ } ] } - ] + ], + "@typescript-eslint/no-explicit-any": "warning" } }, { diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fec3b7aa..18e2d501 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} - uses: actions/setup-node@v3 with: cache: "npm" @@ -52,6 +53,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} - uses: actions/setup-node@v3 with: cache: "npm" diff --git a/packages/traceloop-sdk/src/lib/prompts/fetch.ts b/packages/traceloop-sdk/src/lib/prompts/fetch.ts index 6a19a8bf..4a0ef7be 100644 --- a/packages/traceloop-sdk/src/lib/prompts/fetch.ts +++ b/packages/traceloop-sdk/src/lib/prompts/fetch.ts @@ -1,6 +1,6 @@ import { InitializeOptions } from "../interfaces"; -import { _configuration } from "../configuration"; import fetch from "node-fetch"; +// eslint-disable-next-line @typescript-eslint/no-var-requires const fetchRetry = require("fetch-retry")(fetch); export const fetchPrompts = async (options: InitializeOptions) => { diff --git a/packages/traceloop-sdk/src/lib/prompts/registry.ts b/packages/traceloop-sdk/src/lib/prompts/registry.ts index e2762b74..b1145405 100644 --- a/packages/traceloop-sdk/src/lib/prompts/registry.ts +++ b/packages/traceloop-sdk/src/lib/prompts/registry.ts @@ -1,5 +1,4 @@ import { InitializeOptions, Prompt } from "../interfaces"; -import { _configuration } from "../configuration"; import { InitializationError, PromptNotFoundError } from "../errors"; import { fetchPrompts } from "./fetch"; diff --git a/packages/traceloop-sdk/src/lib/tracing/sampler.ts b/packages/traceloop-sdk/src/lib/tracing/sampler.ts index 85aba0b1..1edbeb13 100644 --- a/packages/traceloop-sdk/src/lib/tracing/sampler.ts +++ b/packages/traceloop-sdk/src/lib/tracing/sampler.ts @@ -3,7 +3,7 @@ import { SamplingResult, SamplingDecision, } from "@opentelemetry/sdk-trace-base"; -import { Context, SpanKind, Attributes, Link } from "@opentelemetry/api"; +import { Context, SpanKind, Attributes } from "@opentelemetry/api"; const FILTERED_ATTRIBUTE_KEYS = ["next.span_name"]; @@ -14,7 +14,6 @@ export class TraceloopSampler implements Sampler { _spanName: string, _spanKind: SpanKind, attributes: Attributes, - _links: Link[], ): SamplingResult { let filter = false; FILTERED_ATTRIBUTE_KEYS.forEach((key) => {