Skip to content

Commit

Permalink
refactor(lint/noUselessLoneBlockStatements): add fix kind metadata (#531
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Conaclos authored Oct 16, 2023
1 parent 57a3d9d commit aab7651
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use crate::semantic_services::Semantic;
use crate::JsRuleAction;
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, FixKind, Rule, RuleDiagnostic,
};
use biome_console::markup;
use biome_diagnostics::Applicability;
use biome_js_factory::make;
Expand Down Expand Up @@ -47,6 +49,7 @@ declare_rule! {
version: "next",
name: "noUselessLoneBlockStatements",
recommended: false,
fix_kind: FixKind::Unsafe,
}
}

Expand Down
2 changes: 1 addition & 1 deletion website/src/content/docs/linter/rules/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ Rules that belong to this group <strong>are not subject to semantic version</str
| [noMisrefactoredShorthandAssign](/linter/rules/no-misrefactored-shorthand-assign) | Disallow shorthand assign when variable appears on both sides. | <span aria-label="The rule has an unsafe fix" role="img" title="The rule has an unsafe fix">⚠️ </span> |
| [noUnusedImports](/linter/rules/no-unused-imports) | Disallow unused imports. | <span aria-label="The rule has a safe fix" role="img" title="The rule has a safe fix">🔧 </span> |
| [noUselessElse](/linter/rules/no-useless-else) | Disallow <code>else</code> block when the <code>if</code> block breaks early. | <span aria-label="The rule has an unsafe fix" role="img" title="The rule has an unsafe fix">⚠️ </span> |
| [noUselessLoneBlockStatements](/linter/rules/no-useless-lone-block-statements) | Disallow unnecessary nested block statements. | |
| [noUselessLoneBlockStatements](/linter/rules/no-useless-lone-block-statements) | Disallow unnecessary nested block statements. | <span aria-label="The rule has an unsafe fix" role="img" title="The rule has an unsafe fix">⚠️ </span> |
| [noVoid](/linter/rules/no-void) | Disallow the use of <code>void</code> operators, which is not a familiar operator. | |
| [useAriaActivedescendantWithTabindex](/linter/rules/use-aria-activedescendant-with-tabindex) | Enforce that <code>tabIndex</code> is assigned to non-interactive HTML elements with <code>aria-activedescendant</code>. | |
| [useArrowFunction](/linter/rules/use-arrow-function) | Use arrow functions over function expressions. | <span aria-label="The rule has a safe fix" role="img" title="The rule has a safe fix">🔧 </span> |
Expand Down

0 comments on commit aab7651

Please sign in to comment.