diff --git a/.oxlintrc.json b/.oxlintrc.json index 6a86d7b0d..e43943241 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -37,6 +37,7 @@ "allow": ["URL", "URLSearchParams"] } ], + "typescript/no-unnecessary-template-expression": "error", "jsx-a11y/interactive-supports-focus": "off", "unicorn/prefer-spread": "error" }, diff --git a/packages/cli/src/commands/issue/resolve-commit-spec.ts b/packages/cli/src/commands/issue/resolve-commit-spec.ts index 8da5e645d..1f64589b9 100644 --- a/packages/cli/src/commands/issue/resolve-commit-spec.ts +++ b/packages/cli/src/commands/issue/resolve-commit-spec.ts @@ -161,7 +161,7 @@ export async function resolveCommitSpec( if (!match) { throw new ValidationError( `--in @commit:${spec.repository}@${spec.commit}: no Sentry repository named '${spec.repository}' in organization '${orgSlug}'.\n\n` + - `${formatAvailableRepos(sentryRepos)}`, + formatAvailableRepos(sentryRepos), "in", ); } diff --git a/packages/cli/src/lib/db/pagination.ts b/packages/cli/src/lib/db/pagination.ts index 58cc2170e..871d5ec57 100644 --- a/packages/cli/src/lib/db/pagination.ts +++ b/packages/cli/src/lib/db/pagination.ts @@ -518,7 +518,7 @@ export function buildMultiTargetContextKey( ? escapeContextKeyValue(filters.query) : undefined; return ( - `${base}` + + base + (escapedSort ? `|sort:${escapedSort}` : "") + `|period:${escapedPeriod}` + (escapedQuery ? `|q:${escapedQuery}` : "") + diff --git a/packages/cli/src/lib/formatters/human.ts b/packages/cli/src/lib/formatters/human.ts index 57fff8a79..8fa5b84e3 100644 --- a/packages/cli/src/lib/formatters/human.ts +++ b/packages/cli/src/lib/formatters/human.ts @@ -2423,9 +2423,7 @@ export function formatUpgradeResult(data: UpgradeResult): string { default: { // Exhaustive check — all action types should be handled above const _: never = data.action; - lines.push( - `${ACTION_DESCRIPTIONS[_ as UpgradeResult["action"]] ?? "Done"}`, - ); + lines.push(ACTION_DESCRIPTIONS[_ as UpgradeResult["action"]] ?? "Done"); } } diff --git a/packages/cli/test/lib/command.test.ts b/packages/cli/test/lib/command.test.ts index 1d28151c6..31d9d778e 100644 --- a/packages/cli/test/lib/command.test.ts +++ b/packages/cli/test/lib/command.test.ts @@ -1213,7 +1213,7 @@ describe("buildCommand return-based output", () => { auth: false, docs: { brief: "Test" }, output: { - human: (d: { id: number; name: string; role: string }) => `${d.name}`, + human: (d: { id: number; name: string; role: string }) => d.name, }, parameters: {}, async *func(this: TestContext) { diff --git a/packages/cli/test/lib/delta-upgrade.mocked.test.ts b/packages/cli/test/lib/delta-upgrade.mocked.test.ts index 0131a923a..3c611d7cb 100644 --- a/packages/cli/test/lib/delta-upgrade.mocked.test.ts +++ b/packages/cli/test/lib/delta-upgrade.mocked.test.ts @@ -227,7 +227,7 @@ describe("resolveNightlyDelta", () => { mediaType: "application/octet-stream", size: 1000, annotations: { - "org.opencontainers.image.title": `${BINARY_NAME}`, + "org.opencontainers.image.title": BINARY_NAME, }, }, ], diff --git a/packages/cli/test/lib/formatters/output.test.ts b/packages/cli/test/lib/formatters/output.test.ts index a091593b9..e510d93fa 100644 --- a/packages/cli/test/lib/formatters/output.test.ts +++ b/packages/cli/test/lib/formatters/output.test.ts @@ -66,7 +66,7 @@ describe("renderCommandOutput", () => { test("renders JSON when json=true", () => { const w = createTestWriter(); const config: OutputConfig<{ id: number; name: string }> = { - human: (d) => `${d.name}`, + human: (d) => d.name, }; render(w, { id: 1, name: "Alice" }, config, { json: true }); expect(JSON.parse(w.output)).toEqual({ id: 1, name: "Alice" }); diff --git a/packages/cli/test/lib/formatters/text-table.test.ts b/packages/cli/test/lib/formatters/text-table.test.ts index 55cb6095c..13293e9d0 100644 --- a/packages/cli/test/lib/formatters/text-table.test.ts +++ b/packages/cli/test/lib/formatters/text-table.test.ts @@ -376,7 +376,9 @@ describe("truncate option", () => { }); test("ellipsis inherits ANSI color from surrounding text", () => { - const colored = `${chalk.hex("#898294")("A very long colored text that will be truncated at the boundary")}`; + const colored = chalk.hex("#898294")( + "A very long colored text that will be truncated at the boundary", + ); const out = renderTextTable(["VAL"], [[colored]], { maxWidth: 30, truncate: true, diff --git a/packages/cli/test/lib/hex-id.test.ts b/packages/cli/test/lib/hex-id.test.ts index 4e70ff80d..494f71f72 100644 --- a/packages/cli/test/lib/hex-id.test.ts +++ b/packages/cli/test/lib/hex-id.test.ts @@ -202,7 +202,7 @@ describe("validateHexId", () => { }); test("throws for newline-separated IDs (not a single valid ID)", () => { - const multiLine = `${VALID_ID}\n${"bbbb1111cccc2222dddd3333eeee4444"}`; + const multiLine = `${VALID_ID}\nbbbb1111cccc2222dddd3333eeee4444`; expect(() => validateHexId(multiLine, "test ID")).toThrow(ValidationError); }); diff --git a/packages/mcp-cloudflare/src/client/components/fragments/stdio-setup.tsx b/packages/mcp-cloudflare/src/client/components/fragments/stdio-setup.tsx index 00f36eb77..84e5459e3 100644 --- a/packages/mcp-cloudflare/src/client/components/fragments/stdio-setup.tsx +++ b/packages/mcp-cloudflare/src/client/components/fragments/stdio-setup.tsx @@ -14,7 +14,7 @@ export default function StdioSetup() { const mcpStdioSnippet = `npx ${NPM_PACKAGE_NAME}@latest`; const selfHostedHostExample = [ - `${mcpStdioSnippet}`, + mcpStdioSnippet, "--access-token=sentry-user-token", "--host=sentry.example.com", ].join(" \\\n "); @@ -63,10 +63,9 @@ export default function StdioSetup() {
Now wire up that token to the MCP configuration: