Lint Rules

noArguments (since v0.7.0)

This rule is recommended by Rome.

Disallow the use of arguments

Examples

Invalid

function f() {
   console.log(arguments);
}
correctness/noArguments.js:2:16 lint/correctness/noArguments ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   Use the rest parameters instead of arguments.
  
    1 │ function f() {
  > 2 │    console.log(arguments);
                  ^^^^^^^^^
    3 │ }
    4 │ 
  
   arguments does not have Array.prototype methods and can be inconvenient to use.
  

Valid

function f() {
    let arguments = 1;
    console.log(arguments);
}