noUselessLabel
Это содержимое пока не доступно на вашем языке.
Summary
Section titled “Summary”- Rule available since: 
v1.0.0 - Diagnostic Category: 
lint/complexity/noUselessLabel - This rule is recommended, which means is enabled by default.
 - This rule has a safe fix.
 - The default severity of this rule is information.
 - Sources:
- Same as 
no-extra-label 
 - Same as 
 
How to configure
Section titled “How to configure”{  "linter": {    "rules": {      "complexity": {        "noUselessLabel": "error"      }    }  }}Description
Section titled “Description”Disallow unnecessary labels.
If a loop contains no nested loops or switches, labeling the loop is unnecessary.
Examples
Section titled “Examples”Invalid
Section titled “Invalid”loop: while(a) {    break loop;}code-block.js:2:11 lint/complexity/noUselessLabel  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  ℹ Unnecessary label.
  
    1 │ loop: while(a) {
  > 2 │     break loop;
      │           ^^^^
    3 │ }
    4 │ 
  
  ℹ Safe fix: Remove the unnecessary label.
    You can achieve the same result without the label.
  
    2 │ ····break·loop;
      │          ----- 
outer: while(a) {    while(b) {        break outer;    }}Related links
Section titled “Related links”Copyright (c) 2023-present Biome Developers and Contributors.