Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(lint/noUselessLoneBlockStatements): add fix kind metadata #531

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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