Skip to content

noArguments (since v1.0.0)

Diagnostic Category: lint/style/noArguments

Sources:

Disallow the use of arguments.

function f() {
console.log(arguments);
}
style/noArguments.js:2:16 lint/style/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.
  
function f() {
let arguments = 1;
console.log(arguments);
}