noArguments
Esta página aún no está disponible en tu idioma.
Summary
Section titled “Summary”- Rule available since: 
v1.0.0 - Diagnostic Category: 
lint/complexity/noArguments - This rule is recommended, which means is enabled by default.
 - This rule doesn’t have a fix.
 - The default severity of this rule is warning.
 - Sources:
- Same as 
prefer-rest-params 
 - Same as 
 
How to configure
Section titled “How to configure”{  "linter": {    "rules": {      "complexity": {        "noArguments": "error"      }    }  }}Description
Section titled “Description”Disallow the use of arguments.
Examples
Section titled “Examples”Invalid
Section titled “Invalid”function f() {   console.log(arguments);}code-block.js:2:16 lint/complexity/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);}Related links
Section titled “Related links”Copyright (c) 2023-present Biome Developers and Contributors.