adjacent-overload-signatures
What it does
Section titled “What it does”Reports an overload (a signature or function with the same name as an earlier one) with another member between it and the earlier overloads. It checks interface and class members, call and construct signatures, and function declarations.
Why it matters
Section titled “Why it matters”Overloads are read together as one declaration with several shapes. When another member sits between them, a reader can miss one shape or take a later signature for an unrelated member.
To fix, move the overloads next to each other.
Example
Section titled “Example”...function f(): void;function g(): void {}function f(x: number): void;function f(x?: number) {}class O { m(): void; n(): void; m(x: number): void; static m(): void; static m(x: number): void; }interface P { (): void; a(): void; (x: number): void }Configuration
Section titled “Configuration”js: lint: rules: adjacent-overload-signatures: warn # off (default), warn, errorEnabled by the presets: js/biome-recommended.
Suppress one line with sudsy-disable-next-line adjacent-overload-signatures in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| typescript-eslint | adjacent-overload-signatures |
full |