Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .cursor/rules/jsdoc-comments.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
description: Prefer JSDoc block comments over line comments
globs: "**/*.{js,jsx,ts,tsx,mjs,cjs}"
alwaysApply: false
---

# Comment style

Use JSDoc-style block comments (`/** */`) for explanatory comments in application and library source. Do not use `//` line comments for explanations.

```js
// ❌ BAD
// Re-open the XHR and restore headers before retrying.
request.open(method, url, true)

// ✅ GOOD
/** Re-open the XHR and restore headers before retrying. */
request.open(method, url, true)
```

Multi-line:

```js
/**
* When Range is ignored, complete from the buffered body instead of
* appending — otherwise coordinates duplicate and the loop never ends.
*/
```

Exceptions (keep `//`):
- Tooling directives: `eslint-disable`, `@ts-expect-error`, `biome-ignore`, `prettier-ignore`
- Temporarily commented-out code
- Shebang lines

Public APIs should still use proper JSDoc tags (`@param`, `@returns`, etc.) inside `/** */`.
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ The [pnpm](https://pnpm.io/) package manager is used to manage dependencies and

Source code is linted and formatted using [Biome](https://biomejs.dev/). TypeScript is used with [strict type checking compiler options](https://www.typescriptlang.org/tsconfig#Strict_Type_Checking_Options_6173) enabled. Semicolons are not used at the end of statements (Biome uses `asNeeded`).

Explanatory comments use JSDoc-style block comments (`/** … */`), not `//` line comments. Keep `//` only for tooling directives (`eslint-disable`, `@ts-expect-error`, `biome-ignore`), temporarily commented-out code, and shebang lines.

Use the following commands to check and fix style:

$ pnpm run lint # check for issues
Expand Down
4 changes: 3 additions & 1 deletion src/AppConfig.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export type DicomWebManagerErrorHandler = (
export interface DICOMwebClientRequestHookMetadata {
url: string
method: string
/** Combined request headers from dicomweb-client (needed to re-apply after retry open()). */
headers?: Record<string, string>
}

export interface RetryRequestSettings {
Expand All @@ -17,7 +19,7 @@ export interface RetryRequestSettings {
minTimeout?: number
maxTimeout?: number
randomize?: boolean
retryableStatusCodes: number[]
retryableStatusCodes?: number[]
}

export interface EvaluationSetting {
Expand Down
Loading