Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#21336·eslint

Rule Change: check TypeScript signatures consistently in `max-params`

Author: xbinaryxCreated Sep 17, 2026Updated Sep 17, 2026
Labelsenhancementrule

What rule do you want to change?

max-params

What change do you want to make?

Generate more warnings

How do you think the change should be implemented?

A new default behavior

Example code

typescript
/* eslint max-params: ["error", 3] */

// Reported today
declare function f(a: number, b: number, c: number, d: number): void;
type F = (a: number, b: number, c: number, d: number) => void;
interface I {
    prop: (a: number, b: number, c: number, d: number) => void;
}

// Not reported today
interface J {
    method(a: number, b: number, c: number, d: number): void;
    (a: number, b: number, c: number, d: number): void;
    new (a: number, b: number, c: number, d: number): J;
}
type C = new (a: number, b: number, c: number, d: number) => object;
declare class D {
    constructor(a: number, b: number, c: number, d: number);
    method(a: number, b: number, c: number, d: number): void;
}
abstract class E {
    abstract method(a: number, b: number, c: number, d: number): void;
}

What does the rule currently do for this code?

Everything in the first block is reported, and nothing in the second block is reported.

What will the rule do after it's changed?

Everything in the second block would be reported.

Participation

  • I am willing to submit a pull request to implement this change.

AI acknowledgment

  • I did not use AI to generate this issue report.
  • (If the above is not checked) I have reviewed the AI-generated content before submitting.

Additional comments

No response

Source: eslint/eslint

View original on GitHubView discussion on GitHub