From f2b5495a8e6d3ea0079d73f1943abb59e47710a1 Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Mon, 16 Oct 2023 13:27:56 +0100 Subject: [PATCH] chore: manually promote rules --- crates/biome_js_analyze/src/syntax.rs | 4 ++-- .../src/syntax/{nursery.rs => correctness.rs} | 4 ++-- .../no_duplicate_private_class_members.rs | 4 +--- .../{nursery => correctness}/no_super_without_extends.rs | 1 - .../noDuplicatePrivateClassMembers/invalid.js | 0 .../noDuplicatePrivateClassMembers/invalid.js.snap | 0 .../noDuplicatePrivateClassMembers/valid.js | 0 .../noDuplicatePrivateClassMembers/valid.js.snap | 0 .../{nursery => correctness}/noSuperWithoutExtends/invalid.js | 0 .../noSuperWithoutExtends/invalid.js.snap | 0 10 files changed, 5 insertions(+), 8 deletions(-) rename crates/biome_js_analyze/src/syntax/{nursery.rs => correctness.rs} (86%) rename crates/biome_js_analyze/src/syntax/{nursery => correctness}/no_duplicate_private_class_members.rs (94%) rename crates/biome_js_analyze/src/syntax/{nursery => correctness}/no_super_without_extends.rs (98%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/noDuplicatePrivateClassMembers/invalid.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/noDuplicatePrivateClassMembers/invalid.js.snap (100%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/noDuplicatePrivateClassMembers/valid.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/noDuplicatePrivateClassMembers/valid.js.snap (100%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/noSuperWithoutExtends/invalid.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/noSuperWithoutExtends/invalid.js.snap (100%) diff --git a/crates/biome_js_analyze/src/syntax.rs b/crates/biome_js_analyze/src/syntax.rs index f40efc76b722..45f668adced2 100644 --- a/crates/biome_js_analyze/src/syntax.rs +++ b/crates/biome_js_analyze/src/syntax.rs @@ -1,4 +1,4 @@ //! Generated file, do not edit by hand, see `xtask/codegen` -pub(crate) mod nursery; -::biome_analyze::declare_category! { pub (crate) Syntax { kind : Syntax , groups : [self :: nursery :: Nursery ,] } } +pub(crate) mod correctness; +::biome_analyze::declare_category! { pub (crate) Syntax { kind : Syntax , groups : [self :: correctness :: Correctness ,] } } diff --git a/crates/biome_js_analyze/src/syntax/nursery.rs b/crates/biome_js_analyze/src/syntax/correctness.rs similarity index 86% rename from crates/biome_js_analyze/src/syntax/nursery.rs rename to crates/biome_js_analyze/src/syntax/correctness.rs index d5d7c7247d98..e0bacf3eb101 100644 --- a/crates/biome_js_analyze/src/syntax/nursery.rs +++ b/crates/biome_js_analyze/src/syntax/correctness.rs @@ -6,8 +6,8 @@ pub(crate) mod no_duplicate_private_class_members; pub(crate) mod no_super_without_extends; declare_group! { - pub (crate) Nursery { - name : "nursery" , + pub (crate) Correctness { + name : "correctness" , rules : [ self :: no_duplicate_private_class_members :: NoDuplicatePrivateClassMembers , self :: no_super_without_extends :: NoSuperWithoutExtends , diff --git a/crates/biome_js_analyze/src/syntax/nursery/no_duplicate_private_class_members.rs b/crates/biome_js_analyze/src/syntax/correctness/no_duplicate_private_class_members.rs similarity index 94% rename from crates/biome_js_analyze/src/syntax/nursery/no_duplicate_private_class_members.rs rename to crates/biome_js_analyze/src/syntax/correctness/no_duplicate_private_class_members.rs index 9550669bfc67..c41e623865a4 100644 --- a/crates/biome_js_analyze/src/syntax/nursery/no_duplicate_private_class_members.rs +++ b/crates/biome_js_analyze/src/syntax/correctness/no_duplicate_private_class_members.rs @@ -1,6 +1,6 @@ use std::collections::{HashMap, HashSet}; -use biome_analyze::{context::RuleContext, declare_rule, Ast, FixKind, Rule, RuleDiagnostic}; +use biome_analyze::{context::RuleContext, declare_rule, Ast, Rule, RuleDiagnostic}; use biome_diagnostics::category; use biome_js_syntax::{AnyJsClassMember, JsClassMemberList, TextRange}; @@ -20,8 +20,6 @@ declare_rule! { pub(crate) NoDuplicatePrivateClassMembers { version: "1.0.0", name: "noDuplicatePrivateClassMembers", - recommended: false, - fix_kind: FixKind::Unsafe, } } diff --git a/crates/biome_js_analyze/src/syntax/nursery/no_super_without_extends.rs b/crates/biome_js_analyze/src/syntax/correctness/no_super_without_extends.rs similarity index 98% rename from crates/biome_js_analyze/src/syntax/nursery/no_super_without_extends.rs rename to crates/biome_js_analyze/src/syntax/correctness/no_super_without_extends.rs index b46eaed8de30..d2883843bbc3 100644 --- a/crates/biome_js_analyze/src/syntax/nursery/no_super_without_extends.rs +++ b/crates/biome_js_analyze/src/syntax/correctness/no_super_without_extends.rs @@ -20,7 +20,6 @@ declare_rule! { pub(crate) NoSuperWithoutExtends { version: "1.0.0", name: "noSuperWithoutExtends", - recommended: false, } } diff --git a/crates/biome_js_analyze/tests/specs/nursery/noDuplicatePrivateClassMembers/invalid.js b/crates/biome_js_analyze/tests/specs/correctness/noDuplicatePrivateClassMembers/invalid.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noDuplicatePrivateClassMembers/invalid.js rename to crates/biome_js_analyze/tests/specs/correctness/noDuplicatePrivateClassMembers/invalid.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/noDuplicatePrivateClassMembers/invalid.js.snap b/crates/biome_js_analyze/tests/specs/correctness/noDuplicatePrivateClassMembers/invalid.js.snap similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noDuplicatePrivateClassMembers/invalid.js.snap rename to crates/biome_js_analyze/tests/specs/correctness/noDuplicatePrivateClassMembers/invalid.js.snap diff --git a/crates/biome_js_analyze/tests/specs/nursery/noDuplicatePrivateClassMembers/valid.js b/crates/biome_js_analyze/tests/specs/correctness/noDuplicatePrivateClassMembers/valid.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noDuplicatePrivateClassMembers/valid.js rename to crates/biome_js_analyze/tests/specs/correctness/noDuplicatePrivateClassMembers/valid.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/noDuplicatePrivateClassMembers/valid.js.snap b/crates/biome_js_analyze/tests/specs/correctness/noDuplicatePrivateClassMembers/valid.js.snap similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noDuplicatePrivateClassMembers/valid.js.snap rename to crates/biome_js_analyze/tests/specs/correctness/noDuplicatePrivateClassMembers/valid.js.snap diff --git a/crates/biome_js_analyze/tests/specs/nursery/noSuperWithoutExtends/invalid.js b/crates/biome_js_analyze/tests/specs/correctness/noSuperWithoutExtends/invalid.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noSuperWithoutExtends/invalid.js rename to crates/biome_js_analyze/tests/specs/correctness/noSuperWithoutExtends/invalid.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/noSuperWithoutExtends/invalid.js.snap b/crates/biome_js_analyze/tests/specs/correctness/noSuperWithoutExtends/invalid.js.snap similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noSuperWithoutExtends/invalid.js.snap rename to crates/biome_js_analyze/tests/specs/correctness/noSuperWithoutExtends/invalid.js.snap