Skip to content

VBC-028: function-params-limit

warning

Category: core
Analysis: AST
Tags: clean-code

What it reports

Function takes {count} parameters at line {line}, over the limit of {threshold}. Positional arguments are easy to pass in the wrong order. Take an options object, or split the function.

Flagged

ts
function build(a, b, c, d, e, f) { return a; }

Not flagged

ts
function build(a, b) { return a + b; }

AST check

  • Type: function-params-limit
  • Threshold: 5

Released under the MIT License.