A common source of bugs during refactoring is when functions are called with less or more arguments than they expect. Prior art includes sonarjs/no-extra-arguments, but I would like to see a more strict version that also triggers on too few arguments.
const fn = (a, b) => a + b;
fn(1); // Expected 2 function arguments, but got 1
const fn = (a, b) => a + b;
fn(1, 2, 3); // Expected 2 function arguments, but got 3
const fn = (a, b) => a + b;
fn(1, 2);
Unlike sonarjs/no-extra-arguments
, I'd not make a exception for arguments
because such usage should be replaced with spread syntax.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too