diff --git a/Cargo.lock b/Cargo.lock index 94df744e5..64dcaaec5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -62,7 +62,7 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "biome_analyze" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_console", "biome_deserialize", @@ -82,7 +82,7 @@ dependencies = [ [[package]] name = "biome_analyze_macros" version = "0.0.0" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "anyhow", "biome_string_case", @@ -96,7 +96,7 @@ dependencies = [ [[package]] name = "biome_aria" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_aria_metadata", ] @@ -104,7 +104,7 @@ dependencies = [ [[package]] name = "biome_aria_metadata" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_deserialize", "biome_deserialize_macros", @@ -120,7 +120,7 @@ dependencies = [ [[package]] name = "biome_cli" version = "0.0.0" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "anyhow", "biome_analyze", @@ -182,7 +182,7 @@ dependencies = [ [[package]] name = "biome_configuration" version = "0.0.1" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_analyze", "biome_configuration_macros", @@ -214,7 +214,7 @@ dependencies = [ [[package]] name = "biome_configuration_macros" version = "0.0.1" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_analyze", "biome_css_analyze", @@ -236,7 +236,7 @@ dependencies = [ [[package]] name = "biome_console" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_markup", "biome_text_size", @@ -250,7 +250,7 @@ dependencies = [ [[package]] name = "biome_control_flow" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_rowan", "rustc-hash 2.1.1", @@ -259,7 +259,7 @@ dependencies = [ [[package]] name = "biome_css_analyze" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_analyze", "biome_analyze_macros", @@ -284,7 +284,7 @@ dependencies = [ [[package]] name = "biome_css_factory" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_css_syntax", "biome_rowan", @@ -293,7 +293,7 @@ dependencies = [ [[package]] name = "biome_css_formatter" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_css_syntax", "biome_diagnostics", @@ -306,7 +306,7 @@ dependencies = [ [[package]] name = "biome_css_parser" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_console", "biome_css_factory", @@ -321,7 +321,7 @@ dependencies = [ [[package]] name = "biome_css_semantic" version = "0.0.0" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_css_syntax", "biome_formatter", @@ -332,7 +332,7 @@ dependencies = [ [[package]] name = "biome_css_syntax" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_rowan", "biome_string_case", @@ -344,7 +344,7 @@ dependencies = [ [[package]] name = "biome_deserialize" version = "0.6.0" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_console", "biome_diagnostics", @@ -362,7 +362,7 @@ dependencies = [ [[package]] name = "biome_deserialize_macros" version = "0.6.0" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_string_case", "proc-macro-error2", @@ -374,7 +374,7 @@ dependencies = [ [[package]] name = "biome_diagnostics" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "backtrace", "biome_console", @@ -397,7 +397,7 @@ dependencies = [ [[package]] name = "biome_diagnostics_categories" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "quote", "schemars", @@ -408,7 +408,7 @@ dependencies = [ [[package]] name = "biome_diagnostics_macros" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "proc-macro-error2", "proc-macro2", @@ -419,7 +419,7 @@ dependencies = [ [[package]] name = "biome_flags" version = "0.0.0" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_console", ] @@ -427,7 +427,7 @@ dependencies = [ [[package]] name = "biome_formatter" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_console", "biome_deserialize", @@ -448,7 +448,7 @@ dependencies = [ [[package]] name = "biome_fs" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_diagnostics", "camino", @@ -469,7 +469,7 @@ dependencies = [ [[package]] name = "biome_glob" version = "0.1.0" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_deserialize", "biome_deserialize_macros", @@ -482,7 +482,7 @@ dependencies = [ [[package]] name = "biome_graphql_analyze" version = "0.0.1" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_analyze", "biome_analyze_macros", @@ -505,7 +505,7 @@ dependencies = [ [[package]] name = "biome_graphql_factory" version = "0.1.0" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_graphql_syntax", "biome_rowan", @@ -514,7 +514,7 @@ dependencies = [ [[package]] name = "biome_graphql_formatter" version = "0.1.0" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_diagnostics", "biome_formatter", @@ -526,7 +526,7 @@ dependencies = [ [[package]] name = "biome_graphql_parser" version = "0.1.0" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_console", "biome_diagnostics", @@ -542,7 +542,7 @@ dependencies = [ [[package]] name = "biome_graphql_syntax" version = "0.1.0" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_rowan", "biome_string_case", @@ -554,7 +554,7 @@ dependencies = [ [[package]] name = "biome_grit_factory" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_grit_syntax", "biome_rowan", @@ -563,7 +563,7 @@ dependencies = [ [[package]] name = "biome_grit_formatter" version = "0.0.0" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_diagnostics_categories", "biome_formatter", @@ -575,7 +575,7 @@ dependencies = [ [[package]] name = "biome_grit_parser" version = "0.1.0" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_console", "biome_diagnostics", @@ -593,7 +593,7 @@ dependencies = [ [[package]] name = "biome_grit_patterns" version = "0.0.1" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_analyze", "biome_console", @@ -624,7 +624,7 @@ dependencies = [ [[package]] name = "biome_grit_syntax" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_rowan", "biome_string_case", @@ -636,7 +636,7 @@ dependencies = [ [[package]] name = "biome_html_analyze" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_analyze", "biome_analyze_macros", @@ -659,7 +659,7 @@ dependencies = [ [[package]] name = "biome_html_factory" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_html_syntax", "biome_rowan", @@ -668,7 +668,7 @@ dependencies = [ [[package]] name = "biome_html_formatter" version = "0.0.0" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_deserialize", "biome_deserialize_macros", @@ -686,7 +686,7 @@ dependencies = [ [[package]] name = "biome_html_parser" version = "0.0.1" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_console", "biome_diagnostics", @@ -701,7 +701,7 @@ dependencies = [ [[package]] name = "biome_html_syntax" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_rowan", "biome_string_case", @@ -713,7 +713,7 @@ dependencies = [ [[package]] name = "biome_js_analyze" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_analyze", "biome_analyze_macros", @@ -756,7 +756,7 @@ dependencies = [ [[package]] name = "biome_js_factory" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_js_syntax", "biome_rowan", @@ -765,7 +765,7 @@ dependencies = [ [[package]] name = "biome_js_formatter" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_deserialize", "biome_deserialize_macros", @@ -788,7 +788,7 @@ dependencies = [ [[package]] name = "biome_js_parser" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_console", "biome_diagnostics", @@ -811,7 +811,7 @@ dependencies = [ [[package]] name = "biome_js_semantic" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_formatter", "biome_js_syntax", @@ -824,7 +824,7 @@ dependencies = [ [[package]] name = "biome_js_syntax" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_aria", "biome_aria_metadata", @@ -839,7 +839,7 @@ dependencies = [ [[package]] name = "biome_js_type_info" version = "0.0.1" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_formatter", "biome_js_syntax", @@ -855,7 +855,7 @@ dependencies = [ [[package]] name = "biome_js_type_info_macros" version = "0.0.1" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "proc-macro-error2", "proc-macro2", @@ -866,7 +866,7 @@ dependencies = [ [[package]] name = "biome_jsdoc_comment" version = "0.0.1" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_formatter", "biome_js_parser", @@ -878,7 +878,7 @@ dependencies = [ [[package]] name = "biome_json_analyze" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_analyze", "biome_analyze_macros", @@ -898,7 +898,7 @@ dependencies = [ [[package]] name = "biome_json_factory" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_json_syntax", "biome_rowan", @@ -907,7 +907,7 @@ dependencies = [ [[package]] name = "biome_json_formatter" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_deserialize", "biome_deserialize_macros", @@ -924,7 +924,7 @@ dependencies = [ [[package]] name = "biome_json_parser" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_console", "biome_diagnostics", @@ -940,7 +940,7 @@ dependencies = [ [[package]] name = "biome_json_syntax" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_rowan", "biome_string_case", @@ -953,7 +953,7 @@ dependencies = [ [[package]] name = "biome_json_value" version = "0.1.0" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_deserialize", "biome_deserialize_macros", @@ -967,7 +967,7 @@ dependencies = [ [[package]] name = "biome_line_index" version = "0.1.0" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_text_size", "rustc-hash 2.1.1", @@ -976,7 +976,7 @@ dependencies = [ [[package]] name = "biome_lsp" version = "0.0.0" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "anyhow", "biome_analyze", @@ -1007,7 +1007,7 @@ dependencies = [ [[package]] name = "biome_lsp_converters" version = "0.1.0" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "anyhow", "biome_line_index", @@ -1019,7 +1019,7 @@ dependencies = [ [[package]] name = "biome_markup" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "proc-macro-error2", "proc-macro2", @@ -1029,7 +1029,7 @@ dependencies = [ [[package]] name = "biome_migrate" version = "0.0.0" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_analyze", "biome_configuration", @@ -1047,7 +1047,7 @@ dependencies = [ [[package]] name = "biome_module_graph" version = "0.0.1" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_console", "biome_css_semantic", @@ -1079,7 +1079,7 @@ dependencies = [ [[package]] name = "biome_package" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_console", "biome_deserialize", @@ -1102,7 +1102,7 @@ dependencies = [ [[package]] name = "biome_parser" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_console", "biome_diagnostics", @@ -1116,7 +1116,7 @@ dependencies = [ [[package]] name = "biome_plugin_loader" version = "0.0.1" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_analyze", "biome_console", @@ -1145,7 +1145,7 @@ dependencies = [ [[package]] name = "biome_project_layout" version = "0.0.1" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_package", "biome_parser", @@ -1158,7 +1158,7 @@ dependencies = [ [[package]] name = "biome_resolver" version = "0.1.0" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_console", "biome_diagnostics", @@ -1172,7 +1172,7 @@ dependencies = [ [[package]] name = "biome_rowan" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_text_edit", "biome_text_size", @@ -1185,7 +1185,7 @@ dependencies = [ [[package]] name = "biome_rule_options" version = "0.0.1" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_console", "biome_deserialize", @@ -1209,7 +1209,7 @@ dependencies = [ [[package]] name = "biome_ruledoc_utils" version = "0.0.1" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "anyhow", "biome_analyze", @@ -1228,7 +1228,7 @@ dependencies = [ [[package]] name = "biome_service" version = "0.0.0" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_analyze", "biome_configuration", @@ -1301,7 +1301,7 @@ dependencies = [ [[package]] name = "biome_string_case" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_rowan", "caseless", @@ -1310,7 +1310,7 @@ dependencies = [ [[package]] name = "biome_suppression" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_console", "biome_diagnostics", @@ -1320,7 +1320,7 @@ dependencies = [ [[package]] name = "biome_test_utils" version = "0.0.0" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_analyze", "biome_configuration", @@ -1354,7 +1354,7 @@ dependencies = [ [[package]] name = "biome_text_edit" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "biome_text_size", "schemars", @@ -1365,7 +1365,7 @@ dependencies = [ [[package]] name = "biome_text_size" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "schemars", "serde", @@ -1374,12 +1374,12 @@ dependencies = [ [[package]] name = "biome_ungrammar" version = "0.3.1" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" [[package]] name = "biome_unicode_table" version = "0.5.7" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" [[package]] name = "bitflags" @@ -4320,7 +4320,7 @@ dependencies = [ [[package]] name = "xtask_codegen" version = "0.0.0" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "anyhow", "biome_analyze", @@ -4348,7 +4348,7 @@ dependencies = [ [[package]] name = "xtask_glue" version = "0.0.0" -source = "git+https://github.com/biomejs/biome.git?rev=66ef5baf6325d324efcb3a1a527496406cfbf72e#66ef5baf6325d324efcb3a1a527496406cfbf72e" +source = "git+https://github.com/biomejs/biome.git?rev=e0143366bd60eb6f123ea1325135754bf2107f34#e0143366bd60eb6f123ea1325135754bf2107f34" dependencies = [ "anyhow", ] diff --git a/Cargo.toml b/Cargo.toml index 29b2cddac..fdb5f1c18 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,46 +16,46 @@ # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] anyhow = "1.0.100" - biome_analyze = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e", features = [ + biome_analyze = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34", features = [ "schema", ] } - biome_cli = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } - biome_configuration = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e", features = [ + biome_cli = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } + biome_configuration = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34", features = [ "schema", ] } - biome_console = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } - biome_css_analyze = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } - biome_css_parser = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } - biome_css_semantic = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } - biome_css_syntax = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } - biome_deserialize = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } - biome_diagnostics = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } - biome_flags = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } - biome_formatter = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } - biome_fs = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } - biome_graphql_analyze = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } - biome_graphql_parser = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } - biome_graphql_syntax = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } - biome_html_analyze = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } - biome_html_parser = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } - biome_html_syntax = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } - biome_js_analyze = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } - biome_js_formatter = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } - biome_js_parser = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } - biome_js_syntax = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } - biome_json_analyze = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } - biome_json_factory = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } - biome_json_formatter = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } - biome_json_parser = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } - biome_json_syntax = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } - biome_module_graph = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } - biome_project_layout = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } - biome_rowan = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } - biome_ruledoc_utils = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } - biome_service = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } - biome_string_case = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } - biome_test_utils = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } - biome_text_edit = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e" } + biome_console = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } + biome_css_analyze = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } + biome_css_parser = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } + biome_css_semantic = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } + biome_css_syntax = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } + biome_deserialize = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } + biome_diagnostics = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } + biome_flags = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } + biome_formatter = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } + biome_fs = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } + biome_graphql_analyze = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } + biome_graphql_parser = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } + biome_graphql_syntax = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } + biome_html_analyze = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } + biome_html_parser = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } + biome_html_syntax = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } + biome_js_analyze = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } + biome_js_formatter = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } + biome_js_parser = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } + biome_js_syntax = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } + biome_json_analyze = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } + biome_json_factory = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } + biome_json_formatter = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } + biome_json_parser = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } + biome_json_syntax = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } + biome_module_graph = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } + biome_project_layout = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } + biome_rowan = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } + biome_ruledoc_utils = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } + biome_service = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } + biome_string_case = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } + biome_test_utils = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } + biome_text_edit = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34" } bpaf = { version = "0.9.20", features = ["docgen"] } # If you update this library, be aware of the breaking changes camino = "1.2.2" @@ -66,6 +66,6 @@ serde = "1.0.228" serde_json = "1.0.145" ureq = "3.1.4" - xtask_codegen = { git = "https://github.com/biomejs/biome.git", rev = "66ef5baf6325d324efcb3a1a527496406cfbf72e", features = [ + xtask_codegen = { git = "https://github.com/biomejs/biome.git", rev = "e0143366bd60eb6f123ea1325135754bf2107f34", features = [ "schema", ] } diff --git a/package.json b/package.json index e9ab7bda8..38fe15545 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "@astrojs/starlight": "0.37.6", "@biomejs/biome": "2.3.14", "@biomejs/version-utils": "0.4.0", - "@biomejs/wasm-web": "https://pkg.pr.new/biomejs/biome/@biomejs/wasm-web@66ef5ba", + "@biomejs/wasm-web": "https://pkg.pr.new/biomejs/biome/@biomejs/wasm-web@e014336", "@codemirror/lang-css": "6.3.1", "@codemirror/lang-html": "6.4.11", "@codemirror/lang-javascript": "6.2.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 975cdfe07..71b5f2413 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -40,8 +40,8 @@ importers: specifier: ^0.4.0 version: 0.4.0 '@biomejs/wasm-web': - specifier: https://pkg.pr.new/biomejs/biome/@biomejs/wasm-web@66ef5ba - version: https://pkg.pr.new/biomejs/biome/@biomejs/wasm-web@66ef5ba + specifier: https://pkg.pr.new/biomejs/biome/@biomejs/wasm-web@e014336 + version: https://pkg.pr.new/biomejs/biome/@biomejs/wasm-web@e014336 '@codemirror/lang-css': specifier: 6.3.1 version: 6.3.1(@codemirror/view@6.39.12) @@ -512,9 +512,9 @@ packages: '@biomejs/version-utils@0.4.0': resolution: {integrity: sha512-jboDhjZY8/bAPl2kgvjrbbyXyM6uimPsasY3TvFhSpPaNorij0UZROi/NjDQqQeZFSaIK3ieiRZXWwoBZh6rQQ==} - '@biomejs/wasm-web@https://pkg.pr.new/biomejs/biome/@biomejs/wasm-web@66ef5ba': - resolution: {integrity: sha512-xfgnu5+CUC9QmDl3XuktttbLCDLXWBsfTCMcWzh5hl5PWFoKAVY2+rUnw3+lBKtHMTicoh/Z2mc3eXN3fONLWA==, tarball: https://pkg.pr.new/biomejs/biome/@biomejs/wasm-web@66ef5ba} - version: 0.0.0-rev.66ef5baf6325d324efcb3a1a527496406cfbf72e + '@biomejs/wasm-web@https://pkg.pr.new/biomejs/biome/@biomejs/wasm-web@e014336': + resolution: {integrity: sha512-3eKhmO5ruaDKE3c4rUK3GKsSYmDFQT/1MZqYxJyWTPFRcbNynZ3eG81zOq3PJ5mBN6koy6z+lJ5y48cG+qpOvQ==, tarball: https://pkg.pr.new/biomejs/biome/@biomejs/wasm-web@e014336} + version: 0.0.0-rev.e0143366bd60eb6f123ea1325135754bf2107f34 '@braintree/sanitize-url@7.1.1': resolution: {integrity: sha512-i1L7noDNxtFyL5DmZafWy1wRVhGehQmzZaz1HiN5e7iylJMSZR7ekOV7NsIqa5qBldlLrsKv4HbgFUVlQrz8Mw==} @@ -7138,7 +7138,7 @@ snapshots: undici: 6.21.3 yaml: 2.8.0 - '@biomejs/wasm-web@https://pkg.pr.new/biomejs/biome/@biomejs/wasm-web@66ef5ba': {} + '@biomejs/wasm-web@https://pkg.pr.new/biomejs/biome/@biomejs/wasm-web@e014336': {} '@braintree/sanitize-url@7.1.1': {} diff --git a/src/content/docs/linter/css/rules.mdx b/src/content/docs/linter/css/rules.mdx index 9a9ae81a9..10b44632e 100644 --- a/src/content/docs/linter/css/rules.mdx +++ b/src/content/docs/linter/css/rules.mdx @@ -49,7 +49,6 @@ Below the list of rules supported by Biome, divided by group. Here's a legend of | Rule name | Description | Properties | | --- | --- | --- | | [noDeprecatedMediaType](/linter/rules/no-deprecated-media-type) | Disallow deprecated media types. | | -| [noEmptySource](/linter/rules/no-empty-source) | Disallow empty sources. | | | [noExcessiveLinesPerFile](/linter/rules/no-excessive-lines-per-file) | Restrict the number of lines in a file. | | | [noHexColors](/linter/rules/no-hex-colors) | Disallow hex colors. | | @@ -70,6 +69,7 @@ Below the list of rules supported by Biome, divided by group. Here's a legend of | [noDuplicateProperties](/linter/rules/no-duplicate-properties) | Disallow duplicate properties within declaration blocks. | | | [noDuplicateSelectorsKeyframeBlock](/linter/rules/no-duplicate-selectors-keyframe-block) | Disallow duplicate selectors within keyframe blocks. | | | [noEmptyBlock](/linter/rules/no-empty-block) | Disallow CSS empty blocks. | | +| [noEmptySource](/linter/rules/no-empty-source) | Disallow empty sources. | | | [noImportantInKeyframe](/linter/rules/no-important-in-keyframe) | Disallow invalid `!important` within keyframe declarations | | | [noIrregularWhitespace](/linter/rules/no-irregular-whitespace) | Disallows the use of irregular whitespace characters. | | | [noShorthandPropertyOverrides](/linter/rules/no-shorthand-property-overrides) | Disallow shorthand properties that override related longhand properties. | | diff --git a/src/content/docs/linter/domains.mdx b/src/content/docs/linter/domains.mdx index a97539d1a..7144bed0a 100644 --- a/src/content/docs/linter/domains.mdx +++ b/src/content/docs/linter/domains.mdx @@ -42,10 +42,10 @@ Enabled when the following dependencies are declared: ### Next rules Rules that belong to the domain: +- [noNextAsyncClientComponent](/linter/rules/no-next-async-client-component) - [useExhaustiveDependencies](/linter/rules/use-exhaustive-dependencies) (recommended) - [useHookAtTopLevel](/linter/rules/use-hook-at-top-level) (recommended) - [noBeforeInteractiveScriptOutsideDocument](/linter/rules/no-before-interactive-script-outside-document) [(nursery)](/linter/#nursery) -- [noNextAsyncClientComponent](/linter/rules/no-next-async-client-component) [(nursery)](/linter/#nursery) - [noSyncScripts](/linter/rules/no-sync-scripts) [(nursery)](/linter/#nursery) - [useInlineScriptId](/linter/rules/use-inline-script-id) [(nursery)](/linter/#nursery) - [noImgElement](/linter/rules/no-img-element) (recommended) @@ -91,11 +91,11 @@ Enabled the **all** rules of the domain: Rules that belong to the domain: - [noPrivateImports](/linter/rules/no-private-imports) (recommended) - [noUndeclaredDependencies](/linter/rules/no-undeclared-dependencies) +- [noUnresolvedImports](/linter/rules/no-unresolved-imports) - [useImportExtensions](/linter/rules/use-import-extensions) - [useJsonImportAttributes](/linter/rules/use-json-import-attributes) -- [noDeprecatedImports](/linter/rules/no-deprecated-imports) [(nursery)](/linter/#nursery) -- [noImportCycles](/linter/rules/no-import-cycles) [(nursery)](/linter/#nursery) -- [noUnresolvedImports](/linter/rules/no-unresolved-imports) [(nursery)](/linter/#nursery) +- [noDeprecatedImports](/linter/rules/no-deprecated-imports) +- [noImportCycles](/linter/rules/no-import-cycles) ## Qwik Use this domain inside Qwik projects. This domain enables rules that are specific to Qwik projects. ### Qwik activation @@ -140,8 +140,8 @@ Rules that belong to the domain: - [useImageSize](/linter/rules/use-image-size) (recommended) - [useJsxKeyInIterable](/linter/rules/use-jsx-key-in-iterable) (recommended) - [useQwikClasslist](/linter/rules/use-qwik-classlist) (recommended) -- [useQwikMethodUsage](/linter/rules/use-qwik-method-usage) [(nursery)](/linter/#nursery) -- [useQwikValidLexicalScope](/linter/rules/use-qwik-valid-lexical-scope) [(nursery)](/linter/#nursery) +- [useQwikMethodUsage](/linter/rules/use-qwik-method-usage) (recommended) +- [useQwikValidLexicalScope](/linter/rules/use-qwik-valid-lexical-scope) (recommended) - [noReactSpecificProps](/linter/rules/no-react-specific-props) (recommended) ## React Use this domain inside React projects. It enables a set of rules that can help catching bugs and enforce correct practices. This domain enable rules that might conflict with the Solid domain. @@ -193,7 +193,6 @@ Rules that belong to the domain: - [noDuplicatedSpreadProps](/linter/rules/no-duplicated-spread-props) [(nursery)](/linter/#nursery) - [noJsxPropsBind](/linter/rules/no-jsx-props-bind) [(nursery)](/linter/#nursery) - [noLeakedRender](/linter/rules/no-leaked-render) [(nursery)](/linter/#nursery) -- [noReactForwardRef](/linter/rules/no-react-forward-ref) [(nursery)](/linter/#nursery) - [noSyncScripts](/linter/rules/no-sync-scripts) [(nursery)](/linter/#nursery) - [noUnknownAttribute](/linter/rules/no-unknown-attribute) [(nursery)](/linter/#nursery) - [noDangerouslySetInnerHtml](/linter/rules/no-dangerously-set-inner-html) (recommended) @@ -201,6 +200,7 @@ Rules that belong to the domain: - [useComponentExportOnlyModules](/linter/rules/use-component-export-only-modules) - [useReactFunctionComponents](/linter/rules/use-react-function-components) - [noArrayIndexKey](/linter/rules/no-array-index-key) (recommended) +- [noReactForwardRef](/linter/rules/no-react-forward-ref) ## Solid Use this domain inside Solid projects. This domain enables rules that might conflict with the React domain. ### Solid activation @@ -406,9 +406,6 @@ Enable the **recommended, non-nursery** rules of the domain: } } ``` - -:::note[No recommended rules] -Since all rules in this domain are nursery rules, no rules will be activated when enabling the domain. You need to enable the single rules.:::# Enabled the **all** rules of the domain: ```json title="biome.json" ins={3-5} { @@ -435,13 +432,13 @@ Enabled when the following dependencies are declared: ### Vue rules Rules that belong to the domain: +- [noVueDataObjectDeclaration](/linter/rules/no-vue-data-object-declaration) (recommended) +- [noVueDuplicateKeys](/linter/rules/no-vue-duplicate-keys) (recommended) +- [noVueReservedKeys](/linter/rules/no-vue-reserved-keys) (recommended) +- [noVueReservedProps](/linter/rules/no-vue-reserved-props) (recommended) +- [noVueSetupPropsReactivityLoss](/linter/rules/no-vue-setup-props-reactivity-loss) - [noVueArrowFuncInWatch](/linter/rules/no-vue-arrow-func-in-watch) [(nursery)](/linter/#nursery) -- [noVueDataObjectDeclaration](/linter/rules/no-vue-data-object-declaration) [(nursery)](/linter/#nursery) -- [noVueDuplicateKeys](/linter/rules/no-vue-duplicate-keys) [(nursery)](/linter/#nursery) - [noVueOptionsApi](/linter/rules/no-vue-options-api) [(nursery)](/linter/#nursery) -- [noVueReservedKeys](/linter/rules/no-vue-reserved-keys) [(nursery)](/linter/#nursery) -- [noVueReservedProps](/linter/rules/no-vue-reserved-props) [(nursery)](/linter/#nursery) -- [noVueSetupPropsReactivityLoss](/linter/rules/no-vue-setup-props-reactivity-loss) [(nursery)](/linter/#nursery) - [useVueConsistentDefinePropsDeclaration](/linter/rules/use-vue-consistent-define-props-declaration) [(nursery)](/linter/#nursery) - [useVueDefineMacrosOrder](/linter/rules/use-vue-define-macros-order) [(nursery)](/linter/#nursery) - [useVueMultiWordComponentNames](/linter/rules/use-vue-multi-word-component-names) [(nursery)](/linter/#nursery) diff --git a/src/content/docs/linter/graphql/rules.mdx b/src/content/docs/linter/graphql/rules.mdx index bbfba94bc..f3be2ce40 100644 --- a/src/content/docs/linter/graphql/rules.mdx +++ b/src/content/docs/linter/graphql/rules.mdx @@ -31,11 +31,9 @@ Below the list of rules supported by Biome, divided by group. Here's a legend of | [noDuplicateGraphqlOperationName](/linter/rules/no-duplicate-graphql-operation-name) | Enforce unique operation names across a GraphQL document. | | | [noDuplicateInputFieldNames](/linter/rules/no-duplicate-input-field-names) | Require fields within an input object to be unique. | | | [noDuplicateVariableNames](/linter/rules/no-duplicate-variable-names) | Require all variable definitions to be unique. | | -| [noEmptySource](/linter/rules/no-empty-source) | Disallow empty sources. | | | [noExcessiveLinesPerFile](/linter/rules/no-excessive-lines-per-file) | Restrict the number of lines in a file. | | | [noRootType](/linter/rules/no-root-type) | Disallow the usage of specified root types | | | [useConsistentGraphqlDescriptions](/linter/rules/use-consistent-graphql-descriptions) | Require all descriptions to follow the same style (either block or inline) to maintain consistency and improve readability across the schema. | | -| [useDeprecatedDate](/linter/rules/use-deprecated-date) | Require the `@deprecated` directive to specify a deletion date. | | | [useInputName](/linter/rules/use-input-name) | Require mutation argument to be always called "input" | | | [useLoneAnonymousOperation](/linter/rules/use-lone-anonymous-operation) | Disallow anonymous operations when more than one operation specified in document. | | | [useLoneExecutableDefinition](/linter/rules/use-lone-executable-definition) | Require queries, mutations, subscriptions or fragments each to be located in separate files. | | @@ -52,6 +50,8 @@ Below the list of rules supported by Biome, divided by group. Here's a legend of | Rule name | Description | Properties | | --- | --- | --- | | [noDuplicateFields](/linter/rules/no-duplicate-fields) | No duplicated fields in GraphQL operations. | | +| [noEmptySource](/linter/rules/no-empty-source) | Disallow empty sources. | | +| [useDeprecatedDate](/linter/rules/use-deprecated-date) | Require the `@deprecated` directive to specify a deletion date. | | ## Recommended rules - [useGraphqlNamedOperations](/linter/rules/use-graphql-named-operations) (Severity: [error](/reference/diagnostics#error)) - [useDeprecatedReason](/linter/rules/use-deprecated-reason) (Severity: [warning](/reference/diagnostics#warning)) diff --git a/src/content/docs/linter/javascript/rules.mdx b/src/content/docs/linter/javascript/rules.mdx index cc789353a..59b6c038d 100644 --- a/src/content/docs/linter/javascript/rules.mdx +++ b/src/content/docs/linter/javascript/rules.mdx @@ -75,6 +75,7 @@ Below the list of rules supported by Biome, divided by group. Here's a legend of | [noStaticOnlyClass](/linter/rules/no-static-only-class) | This rule reports when a class has no non-static members, such as for a class used exclusively as a static namespace. | | | [noThisInStatic](/linter/rules/no-this-in-static) | Disallow `this` and `super` in `static` contexts. | | | [noUselessCatch](/linter/rules/no-useless-catch) | Disallow unnecessary `catch` clauses. | | +| [noUselessCatchBinding](/linter/rules/no-useless-catch-binding) | Disallow unused catch bindings. | | | [noUselessConstructor](/linter/rules/no-useless-constructor) | Disallow unnecessary constructors. | | | [noUselessContinue](/linter/rules/no-useless-continue) | Avoid using unnecessary `continue`. | | | [noUselessEmptyExport](/linter/rules/no-useless-empty-export) | Disallow empty exports that don't change anything in a module file. | | @@ -89,6 +90,7 @@ Below the list of rules supported by Biome, divided by group. Here's a legend of | [noUselessTernary](/linter/rules/no-useless-ternary) | Disallow ternary operators when simpler alternatives exist. | | | [noUselessThisAlias](/linter/rules/no-useless-this-alias) | Disallow useless `this` aliasing. | | | [noUselessTypeConstraint](/linter/rules/no-useless-type-constraint) | Disallow using `any` or `unknown` as type constraint. | | +| [noUselessUndefined](/linter/rules/no-useless-undefined) | Disallow the use of useless `undefined`. | | | [noUselessUndefinedInitialization](/linter/rules/no-useless-undefined-initialization) | Disallow initializing variables to `undefined`. | | | [noVoid](/linter/rules/no-void) | Disallow the use of `void` operators, which is not a familiar operator. | | | [useArrowFunction](/linter/rules/use-arrow-function) | Use arrow functions over function expressions. | | @@ -96,6 +98,7 @@ Below the list of rules supported by Biome, divided by group. Here's a legend of | [useFlatMap](/linter/rules/use-flat-map) | Promotes the use of `.flatMap()` when `map().flat()` are used together. | | | [useIndexOf](/linter/rules/use-index-of) | Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item. | | | [useLiteralKeys](/linter/rules/use-literal-keys) | Enforce the usage of a literal access to properties over computed property access. | | +| [useMaxParams](/linter/rules/use-max-params) | Enforce a maximum number of parameters in function definitions. | | | [useNumericLiterals](/linter/rules/use-numeric-literals) | Disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals | | | [useOptionalChain](/linter/rules/use-optional-chain) | Enforce using concise optional chain instead of chained logical expressions. | | | [useRegexLiterals](/linter/rules/use-regex-literals) | Enforce the use of the regular expression literals instead of the RegExp constructor if possible. | | @@ -121,6 +124,7 @@ Below the list of rules supported by Biome, divided by group. Here's a legend of | [noInvalidConstructorSuper](/linter/rules/no-invalid-constructor-super) | Prevents the incorrect use of `super()` inside classes. It also checks whether a call `super()` is missing from classes that extends other constructors. | | | [noInvalidUseBeforeDeclaration](/linter/rules/no-invalid-use-before-declaration) | Disallow the use of variables, function parameters, classes, and enums before their declaration | | | [noNestedComponentDefinitions](/linter/rules/no-nested-component-definitions) | Disallows defining React components inside other components. | | +| [noNextAsyncClientComponent](/linter/rules/no-next-async-client-component) | Prevent client components from being async functions. | | | [noNodejsModules](/linter/rules/no-nodejs-modules) | Forbid the use of Node.js builtin modules. | | | [noNonoctalDecimalEscape](/linter/rules/no-nonoctal-decimal-escape) | Disallow `\8` and `\9` escape sequences in string literals. | | | [noPrecisionLoss](/linter/rules/no-precision-loss) | Disallow literal numbers that lose precision | | @@ -139,6 +143,7 @@ Below the list of rules supported by Biome, divided by group. Here's a legend of | [noUndeclaredVariables](/linter/rules/no-undeclared-variables) | Prevents the usage of variables that haven't been declared inside the document. | | | [noUnreachable](/linter/rules/no-unreachable) | Disallow unreachable code | | | [noUnreachableSuper](/linter/rules/no-unreachable-super) | Ensures the `super()` constructor is called exactly once on every code path in a class constructor before `this` is accessed if the class has a superclass | | +| [noUnresolvedImports](/linter/rules/no-unresolved-imports) | Warn when importing non-existing exports. | | | [noUnsafeFinally](/linter/rules/no-unsafe-finally) | Disallow control flow statements in finally blocks. | | | [noUnsafeOptionalChaining](/linter/rules/no-unsafe-optional-chaining) | Disallow the use of optional chaining in contexts where the undefined value is not allowed. | | | [noUnusedFunctionParameters](/linter/rules/no-unused-function-parameters) | Disallow unused function parameters. | | @@ -148,6 +153,11 @@ Below the list of rules supported by Biome, divided by group. Here's a legend of | [noUnusedVariables](/linter/rules/no-unused-variables) | Disallow unused variables. | | | [noVoidElementsWithChildren](/linter/rules/no-void-elements-with-children) | This rules prevents void elements (AKA self-closing elements) from having children. | | | [noVoidTypeReturn](/linter/rules/no-void-type-return) | Disallow returning a value from a function with the return type 'void' | | +| [noVueDataObjectDeclaration](/linter/rules/no-vue-data-object-declaration) | Enforce that Vue component `data` options are declared as functions. | | +| [noVueDuplicateKeys](/linter/rules/no-vue-duplicate-keys) | Disallow duplicate keys in Vue component data, methods, computed properties, and other options. | | +| [noVueReservedKeys](/linter/rules/no-vue-reserved-keys) | Disallow reserved keys in Vue component data and computed properties. | | +| [noVueReservedProps](/linter/rules/no-vue-reserved-props) | Disallow reserved names to be used as props. | | +| [noVueSetupPropsReactivityLoss](/linter/rules/no-vue-setup-props-reactivity-loss) | Disallow destructuring of `props` passed to `setup` in Vue projects. | | | [useExhaustiveDependencies](/linter/rules/use-exhaustive-dependencies) | Enforce correct dependency usage within React hooks. | | | [useHookAtTopLevel](/linter/rules/use-hook-at-top-level) | Enforce that all React hooks are being called from the Top Level component functions. | | | [useImageSize](/linter/rules/use-image-size) | Enforces that `` elements have both width and height attributes. | | @@ -157,6 +167,8 @@ Below the list of rules supported by Biome, divided by group. Here's a legend of | [useJsxKeyInIterable](/linter/rules/use-jsx-key-in-iterable) | Disallow missing key props in iterators/collection literals. | | | [useParseIntRadix](/linter/rules/use-parse-int-radix) | Enforce the consistent use of the radix argument when using `parseInt()`. | | | [useQwikClasslist](/linter/rules/use-qwik-classlist) | Prefer using the `class` prop as a classlist over the `classnames` helper. | | +| [useQwikMethodUsage](/linter/rules/use-qwik-method-usage) | Disallow `use*` hooks outside of `component$` or other `use*` hooks in Qwik applications. | | +| [useQwikValidLexicalScope](/linter/rules/use-qwik-valid-lexical-scope) | Disallow unserializable expressions in Qwik dollar ($) scopes. | | | [useSingleJsDocAsterisk](/linter/rules/use-single-js-doc-asterisk) | Enforce JSDoc comment lines to start with a single asterisk, except for the first one. | | | [useUniqueElementIds](/linter/rules/use-unique-element-ids) | Prevent the usage of static string literal `id` attribute on elements. | | | [useValidForDirection](/linter/rules/use-valid-for-direction) | Enforce "for" loop update clause moving the counter in the right direction. | | @@ -170,30 +182,24 @@ Below the list of rules supported by Biome, divided by group. Here's a legend of | [noAmbiguousAnchorText](/linter/rules/no-ambiguous-anchor-text) | Disallow ambiguous anchor descriptions. | | | [noBeforeInteractiveScriptOutsideDocument](/linter/rules/no-before-interactive-script-outside-document) | Prevent usage of `next/script`'s `beforeInteractive` strategy outside of `pages/_document.js` in a Next.js project. | | | [noContinue](/linter/rules/no-continue) | Disallow continue statements. | | -| [noDeprecatedImports](/linter/rules/no-deprecated-imports) | Restrict imports of deprecated exports. | | | [noDivRegex](/linter/rules/no-div-regex) | Disallow equal signs explicitly at the beginning of regular expressions. | | | [noDuplicateEnumValues](/linter/rules/no-duplicate-enum-values) | Disallow duplicate enum member values. | | | [noDuplicatedSpreadProps](/linter/rules/no-duplicated-spread-props) | Disallow JSX prop spreading the same identifier multiple times. | | -| [noEmptySource](/linter/rules/no-empty-source) | Disallow empty sources. | | | [noEqualsToNull](/linter/rules/no-equals-to-null) | Require the use of `===` or `!==` for comparison with `null`. | | | [noExcessiveClassesPerFile](/linter/rules/no-excessive-classes-per-file) | Enforce a maximum number of classes per file. | | | [noExcessiveLinesPerFile](/linter/rules/no-excessive-lines-per-file) | Restrict the number of lines in a file. | | | [noFloatingClasses](/linter/rules/no-floating-classes) | Disallow `new` operators outside of assignments or comparisons. | | | [noFloatingPromises](/linter/rules/no-floating-promises) | Require Promise-like statements to be handled appropriately. | | | [noForIn](/linter/rules/no-for-in) | Disallow iterating using a for-in loop. | | -| [noImportCycles](/linter/rules/no-import-cycles) | Prevent import cycles. | | | [noIncrementDecrement](/linter/rules/no-increment-decrement) | Disallows the usage of the unary operators ++ and --. | | -| [noJsxLiterals](/linter/rules/no-jsx-literals) | Disallow string literals inside JSX elements. | | | [noJsxPropsBind](/linter/rules/no-jsx-props-bind) | Disallow .bind(), arrow functions, or function expressions in JSX props | | | [noLeakedRender](/linter/rules/no-leaked-render) | Prevent problematic leaked values from being rendered. | | | [noMisusedPromises](/linter/rules/no-misused-promises) | Disallow Promises to be used in places where they are almost certainly a | | | [noMultiAssign](/linter/rules/no-multi-assign) | Disallow use of chained assignment expressions | | | [noMultiStr](/linter/rules/no-multi-str) | Disallow creating multiline strings by escaping newlines. | | | [noNestedPromises](/linter/rules/no-nested-promises) | Disallow nested `.then()` or `.catch()` promise calls. | | -| [noNextAsyncClientComponent](/linter/rules/no-next-async-client-component) | Prevent client components from being async functions. | | | [noParametersOnlyUsedInRecursion](/linter/rules/no-parameters-only-used-in-recursion) | Disallow function parameters that are only used in recursive calls. | | | [noProto](/linter/rules/no-proto) | Disallow the use of the deprecated `__proto__` object property. | | -| [noReactForwardRef](/linter/rules/no-react-forward-ref) | Replaces usages of `forwardRef` with passing `ref` as a prop. | | | [noRedundantDefaultExport](/linter/rules/no-redundant-default-export) | Checks if a default export exports the same symbol as a named export. | | | [noReturnAssign](/linter/rules/no-return-assign) | Disallow assignments in return statements. | | | [noScriptUrl](/linter/rules/no-script-url) | Disallow `javascript:` URLs. | | @@ -203,21 +209,11 @@ Below the list of rules supported by Biome, divided by group. Here's a legend of | [noUndeclaredEnvVars](/linter/rules/no-undeclared-env-vars) | Disallow the use of undeclared environment variables. | | | [noUnknownAttribute](/linter/rules/no-unknown-attribute) | Disallow unknown DOM properties. | | | [noUnnecessaryConditions](/linter/rules/no-unnecessary-conditions) | Disallow unnecessary type-based conditions that can be statically determined as redundant. | | -| [noUnresolvedImports](/linter/rules/no-unresolved-imports) | Warn when importing non-existing exports. | | -| [noUnusedExpressions](/linter/rules/no-unused-expressions) | Disallow expression statements that are neither a function call nor an | | -| [noUselessCatchBinding](/linter/rules/no-useless-catch-binding) | Disallow unused catch bindings. | | | [noUselessReturn](/linter/rules/no-useless-return) | Disallow redundant return statements. | | -| [noUselessUndefined](/linter/rules/no-useless-undefined) | Disallow the use of useless `undefined`. | | | [noVueArrowFuncInWatch](/linter/rules/no-vue-arrow-func-in-watch) | Disallows using arrow functions when defining a watcher. | | -| [noVueDataObjectDeclaration](/linter/rules/no-vue-data-object-declaration) | Enforce that Vue component `data` options are declared as functions. | | -| [noVueDuplicateKeys](/linter/rules/no-vue-duplicate-keys) | Disallow duplicate keys in Vue component data, methods, computed properties, and other options. | | | [noVueOptionsApi](/linter/rules/no-vue-options-api) | Disallow the use of Vue Options API. | | -| [noVueReservedKeys](/linter/rules/no-vue-reserved-keys) | Disallow reserved keys in Vue component data and computed properties. | | -| [noVueReservedProps](/linter/rules/no-vue-reserved-props) | Disallow reserved names to be used as props. | | -| [noVueSetupPropsReactivityLoss](/linter/rules/no-vue-setup-props-reactivity-loss) | Disallow destructuring of `props` passed to `setup` in Vue projects. | | | [useArraySortCompare](/linter/rules/use-array-sort-compare) | Require Array#sort and Array#toSorted calls to always provide a compareFunction. | | | [useAwaitThenable](/linter/rules/use-await-thenable) | Enforce that `await` is only used on `Promise` values. | | -| [useConsistentArrowReturn](/linter/rules/use-consistent-arrow-return) | Enforce consistent arrow function bodies. | | | [useConsistentEnumValueType](/linter/rules/use-consistent-enum-value-type) | Disallow enums from having both number and string members. | | | [useConsistentMethodSignatures](/linter/rules/use-consistent-method-signatures) | Enforce consistent use of either method signatures or function properties within interfaces and type aliases. | | | [useDestructuring](/linter/rules/use-destructuring) | Require destructuring from arrays and/or objects | | @@ -227,9 +223,6 @@ Below the list of rules supported by Biome, divided by group. Here's a legend of | [useFind](/linter/rules/use-find) | Enforce the use of Array.prototype.find() over Array.prototype.filter() followed by [0] when looking for a single result. | | | [useGlobalThis](/linter/rules/use-global-this) | Enforce the use of `globalThis` over `window`, `self`, and `global`. | | | [useInlineScriptId](/linter/rules/use-inline-script-id) | Enforce `id` attribute on `next/script` components with inline content or `dangerouslySetInnerHTML`. | | -| [useMaxParams](/linter/rules/use-max-params) | Enforce a maximum number of parameters in function definitions. | | -| [useQwikMethodUsage](/linter/rules/use-qwik-method-usage) | Disallow `use*` hooks outside of `component$` or other `use*` hooks in Qwik applications. | | -| [useQwikValidLexicalScope](/linter/rules/use-qwik-valid-lexical-scope) | Disallow unserializable expressions in Qwik dollar ($) scopes. | | | [useRegexpExec](/linter/rules/use-regexp-exec) | Enforce `RegExp#exec` over `String#match` if no global flag is provided. | | | [useSortedClasses](/linter/rules/use-sorted-classes) | Enforce the sorting of CSS utility classes. | | | [useSpread](/linter/rules/use-spread) | Enforce the use of the spread operator over `.apply()`. | | @@ -276,6 +269,7 @@ Below the list of rules supported by Biome, divided by group. Here's a legend of | [noHeadElement](/linter/rules/no-head-element) | Prevent usage of `` element in a Next.js project. | | | [noImplicitBoolean](/linter/rules/no-implicit-boolean) | Disallow implicit `true` values on JSX boolean attributes | | | [noInferrableTypes](/linter/rules/no-inferrable-types) | Disallow type annotations for variables, parameters, and class properties initialized with a literal expression. | | +| [noJsxLiterals](/linter/rules/no-jsx-literals) | Disallow string literals inside JSX elements. | | | [noMagicNumbers](/linter/rules/no-magic-numbers) | Reports usage of "magic numbers" — numbers used directly instead of being assigned to named constants. | | | [noNamespace](/linter/rules/no-namespace) | Disallow the use of TypeScript's `namespace`s. | | | [noNegationElse](/linter/rules/no-negation-else) | Disallow negation in the condition of an `if` statement if it has an `else` clause. | | @@ -300,6 +294,7 @@ Below the list of rules supported by Biome, divided by group. Here's a legend of | [useCollapsedIf](/linter/rules/use-collapsed-if) | Enforce using single `if` instead of nested `if` clauses. | | | [useComponentExportOnlyModules](/linter/rules/use-component-export-only-modules) | Enforce declaring components only within modules that export React Components exclusively. | | | [useConsistentArrayType](/linter/rules/use-consistent-array-type) | Require consistently using either `T[]` or `Array` | | +| [useConsistentArrowReturn](/linter/rules/use-consistent-arrow-return) | Enforce consistent arrow function bodies. | | | [useConsistentBuiltinInstantiation](/linter/rules/use-consistent-builtin-instantiation) | Enforce the use of `new` for all builtins, except `String`, `Number` and `Boolean`. | | | [useConsistentCurlyBraces](/linter/rules/use-consistent-curly-braces) | This rule enforces consistent use of curly braces inside JSX attributes and JSX children. | | | [useConsistentMemberAccessibility](/linter/rules/use-consistent-member-accessibility) | Require consistent accessibility modifiers on class properties and methods. | | @@ -359,6 +354,7 @@ Below the list of rules supported by Biome, divided by group. Here's a legend of | [noConstantBinaryExpressions](/linter/rules/no-constant-binary-expressions) | Disallow expressions where the operation doesn't affect the value | | | [noControlCharactersInRegex](/linter/rules/no-control-characters-in-regex) | Prevents from having control characters and some escape sequences that match control characters in regular expression literals. | | | [noDebugger](/linter/rules/no-debugger) | Disallow the use of `debugger` | | +| [noDeprecatedImports](/linter/rules/no-deprecated-imports) | Restrict imports of deprecated exports. | | | [noDocumentCookie](/linter/rules/no-document-cookie) | Disallow direct assignments to `document.cookie`. | | | [noDocumentImportInPage](/linter/rules/no-document-import-in-page) | Prevents importing `next/document` outside of `pages/_document.jsx` in Next.js projects. | | | [noDoubleEquals](/linter/rules/no-double-equals) | Require the use of `===` and `!==`. | | @@ -371,6 +367,7 @@ Below the list of rules supported by Biome, divided by group. Here's a legend of | [noDuplicateTestHooks](/linter/rules/no-duplicate-test-hooks) | A `describe` block should not contain duplicate hooks. | | | [noEmptyBlockStatements](/linter/rules/no-empty-block-statements) | Disallow empty block statements and static blocks. | | | [noEmptyInterface](/linter/rules/no-empty-interface) | Disallow the declaration of empty interfaces. | | +| [noEmptySource](/linter/rules/no-empty-source) | Disallow empty sources. | | | [noEvolvingTypes](/linter/rules/no-evolving-types) | Disallow variables from evolving into `any` type through reassignments. | | | [noExplicitAny](/linter/rules/no-explicit-any) | Disallow the `any` type usage. | | | [noExportsInTest](/linter/rules/no-exports-in-test) | Disallow using `export` or `module.exports` in files containing tests | | @@ -384,6 +381,7 @@ Below the list of rules supported by Biome, divided by group. Here's a legend of | [noHeadImportInDocument](/linter/rules/no-head-import-in-document) | Prevent using the `next/head` module in `pages/_document.js` on Next.js projects. | | | [noImplicitAnyLet](/linter/rules/no-implicit-any-let) | Disallow use of implicit `any` type on variable declarations. | | | [noImportAssign](/linter/rules/no-import-assign) | Disallow assigning to imported bindings | | +| [noImportCycles](/linter/rules/no-import-cycles) | Prevent import cycles. | | | [noIrregularWhitespace](/linter/rules/no-irregular-whitespace) | Disallows the use of irregular whitespace characters. | | | [noLabelVar](/linter/rules/no-label-var) | Disallow labels that share a name with a variable | | | [noMisleadingCharacterClass](/linter/rules/no-misleading-character-class) | Disallow characters made with multiple code points in character class syntax. | | @@ -393,6 +391,7 @@ Below the list of rules supported by Biome, divided by group. Here's a legend of | [noNonNullAssertedOptionalChain](/linter/rules/no-non-null-asserted-optional-chain) | Disallow non-null assertions after optional chaining expressions. | | | [noOctalEscape](/linter/rules/no-octal-escape) | Disallow octal escape sequences in string literals | | | [noPrototypeBuiltins](/linter/rules/no-prototype-builtins) | Disallow direct use of `Object.prototype` builtins. | | +| [noReactForwardRef](/linter/rules/no-react-forward-ref) | Replaces usages of `forwardRef` with passing `ref` as a prop. | | | [noReactSpecificProps](/linter/rules/no-react-specific-props) | Prevents React-specific JSX properties from being used. | | | [noRedeclare](/linter/rules/no-redeclare) | Disallow variable, function, class, and type redeclarations in the same scope. | | | [noRedundantUseStrict](/linter/rules/no-redundant-use-strict) | Prevents from having redundant `"use strict"`. | | @@ -407,6 +406,7 @@ Below the list of rules supported by Biome, divided by group. Here's a legend of | [noUnassignedVariables](/linter/rules/no-unassigned-variables) | Disallow `let` or `var` variables that are read but never assigned. | | | [noUnsafeDeclarationMerging](/linter/rules/no-unsafe-declaration-merging) | Disallow unsafe declaration merging between interfaces and classes. | | | [noUnsafeNegation](/linter/rules/no-unsafe-negation) | Disallow using unsafe negation. | | +| [noUnusedExpressions](/linter/rules/no-unused-expressions) | Disallow expression statements that are neither a function call nor an | | | [noUselessEscapeInString](/linter/rules/no-useless-escape-in-string) | Disallow unnecessary escapes in string literals. | | | [noUselessRegexBackrefs](/linter/rules/no-useless-regex-backrefs) | Disallow useless backreferences in regular expression literals that always match an empty string. | | | [noVar](/linter/rules/no-var) | Disallow the use of `var` | | @@ -525,6 +525,10 @@ Below the list of rules supported by Biome, divided by group. Here's a legend of - [noUnusedVariables](/linter/rules/no-unused-variables) (Severity: [warning](/reference/diagnostics#warning)) - [noVoidElementsWithChildren](/linter/rules/no-void-elements-with-children) (Severity: [error](/reference/diagnostics#error)) - [noVoidTypeReturn](/linter/rules/no-void-type-return) (Severity: [error](/reference/diagnostics#error)) +- [noVueDataObjectDeclaration](/linter/rules/no-vue-data-object-declaration) (Severity: [error](/reference/diagnostics#error)) +- [noVueDuplicateKeys](/linter/rules/no-vue-duplicate-keys) (Severity: [error](/reference/diagnostics#error)) +- [noVueReservedKeys](/linter/rules/no-vue-reserved-keys) (Severity: [error](/reference/diagnostics#error)) +- [noVueReservedProps](/linter/rules/no-vue-reserved-props) (Severity: [error](/reference/diagnostics#error)) - [useExhaustiveDependencies](/linter/rules/use-exhaustive-dependencies) (Severity: [error](/reference/diagnostics#error)) - [useHookAtTopLevel](/linter/rules/use-hook-at-top-level) (Severity: [error](/reference/diagnostics#error)) - [useImageSize](/linter/rules/use-image-size) (Severity: [error](/reference/diagnostics#error)) @@ -532,6 +536,8 @@ Below the list of rules supported by Biome, divided by group. Here's a legend of - [useJsxKeyInIterable](/linter/rules/use-jsx-key-in-iterable) (Severity: [error](/reference/diagnostics#error)) - [useParseIntRadix](/linter/rules/use-parse-int-radix) (Severity: [information](/reference/diagnostics#information)) - [useQwikClasslist](/linter/rules/use-qwik-classlist) (Severity: [error](/reference/diagnostics#error)) +- [useQwikMethodUsage](/linter/rules/use-qwik-method-usage) (Severity: [error](/reference/diagnostics#error)) +- [useQwikValidLexicalScope](/linter/rules/use-qwik-valid-lexical-scope) (Severity: [error](/reference/diagnostics#error)) - [useValidForDirection](/linter/rules/use-valid-for-direction) (Severity: [error](/reference/diagnostics#error)) - [useValidTypeof](/linter/rules/use-valid-typeof) (Severity: [error](/reference/diagnostics#error)) - [useYield](/linter/rules/use-yield) (Severity: [error](/reference/diagnostics#error)) diff --git a/src/content/docs/linter/json/rules.mdx b/src/content/docs/linter/json/rules.mdx index 3b00151a6..d2512088a 100644 --- a/src/content/docs/linter/json/rules.mdx +++ b/src/content/docs/linter/json/rules.mdx @@ -19,7 +19,6 @@ Below the list of rules supported by Biome, divided by group. Here's a legend of | Rule name | Description | Properties | | --- | --- | --- | -| [noDuplicateDependencies](/linter/rules/no-duplicate-dependencies) | Prevent the listing of duplicate dependencies. | | | [useRequiredScripts](/linter/rules/use-required-scripts) | Enforce the presence of required scripts in package.json. | | ## `suspicious` @@ -27,6 +26,7 @@ Below the list of rules supported by Biome, divided by group. Here's a legend of | Rule name | Description | Properties | | --- | --- | --- | | [noBiomeFirstException](/linter/rules/no-biome-first-exception) | Prevents the misuse of glob patterns inside the `files.includes` field. | | +| [noDuplicateDependencies](/linter/rules/no-duplicate-dependencies) | Prevent the listing of duplicate dependencies. | | | [noDuplicateObjectKeys](/linter/rules/no-duplicate-object-keys) | Disallow two keys with the same name inside objects. | | | [noQuickfixBiome](/linter/rules/no-quickfix-biome) | Disallow the use if `quickfix.biome` inside editor settings file. | | | [useBiomeIgnoreFolder](/linter/rules/use-biome-ignore-folder) | Promotes the correct usage for ignoring folders in the configuration file. | | diff --git a/src/content/docs/linter/rules/no-deprecated-imports.mdx b/src/content/docs/linter/rules/no-deprecated-imports.mdx index 96e87634a..f241b1d16 100644 --- a/src/content/docs/linter/rules/no-deprecated-imports.mdx +++ b/src/content/docs/linter/rules/no-deprecated-imports.mdx @@ -9,15 +9,13 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; -:::caution -This rule is part of the [nursery](/linter/#nursery) group. This means that it is experimental and the behavior can change at any time. -::: :::note This rule belongs to the project domain. This means that its activation will activate the Biome Scanner to scan the files of your project. Read more about it in the [documentation page](/linter/domains#project) ::: ## Summary - Rule available since: `v2.2.5` -- Diagnostic Category: [`lint/nursery/noDeprecatedImports`](/reference/diagnostics#diagnostic-category) +- Diagnostic Category: [`lint/suspicious/noDeprecatedImports`](/reference/diagnostics#diagnostic-category) +- This rule isn't recommended, so you need to enable it. - This rule doesn't have a fix. - The default severity of this rule is [**warning**](/reference/diagnostics#warning). - This rule belongs to the following domains: @@ -31,7 +29,7 @@ This rule belongs to the project domain. This means that its activation will act { "linter": { "rules": { - "nursery": { + "suspicious": { "noDeprecatedImports": "error" } } @@ -54,7 +52,7 @@ comment that contains an "@deprecated" annotation. import { oldUtility } from "./utils.js"; ``` -
/foo.js:1:10 lint/nursery/noDeprecatedImports ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Deprecated import.

> 1 │ import { oldUtility } from "./utils.js";
^^^^^^^^^^
2 │

An @deprecated annotation indicates the author doesn't want you to rely on this import anymore.

You should probably import a different symbol instead.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
/foo.js:1:10 lint/suspicious/noDeprecatedImports ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Deprecated import.

> 1 │ import { oldUtility } from "./utils.js";
^^^^^^^^^^
2 │

An @deprecated annotation indicates the author doesn't want you to rely on this import anymore.

You should probably import a different symbol instead.

```js title='utils.js' /** @@ -81,8 +79,8 @@ export function oldUtility() {} - [Disable a rule](/linter/#disable-a-rule) - [Configure the code fix](/linter#configure-the-code-fix) - [Rule options](/linter/#rule-options) -- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/nursery/no_deprecated_imports.rs) -- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/nursery/noDeprecatedImports) +- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/suspicious/no_deprecated_imports.rs) +- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/suspicious/noDeprecatedImports)
diff --git a/src/content/docs/linter/rules/no-duplicate-dependencies.mdx b/src/content/docs/linter/rules/no-duplicate-dependencies.mdx index 0be696ad9..8974c0a58 100644 --- a/src/content/docs/linter/rules/no-duplicate-dependencies.mdx +++ b/src/content/docs/linter/rules/no-duplicate-dependencies.mdx @@ -9,14 +9,12 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; -:::caution -This rule is part of the [nursery](/linter/#nursery) group. This means that it is experimental and the behavior can change at any time. -::: ## Summary - Rule available since: `v2.2.4` -- Diagnostic Category: [`lint/nursery/noDuplicateDependencies`](/reference/diagnostics#diagnostic-category) +- Diagnostic Category: [`lint/suspicious/noDuplicateDependencies`](/reference/diagnostics#diagnostic-category) +- This rule isn't recommended, so you need to enable it. - This rule doesn't have a fix. -- The default severity of this rule is [**information**](/reference/diagnostics#information). +- The default severity of this rule is [**warning**](/reference/diagnostics#warning). - Sources: - Same as [`package-json/unique-dependencies`](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/blob/main/docs/rules/unique-dependencies.md) - Same as [`package-json-dependencies/duplicate-dependencies`](https://github.com/idan-at/eslint-plugin-package-json-dependencies/blob/master/docs/rules/duplicate-dependencies.md) @@ -26,7 +24,7 @@ This rule is part of the [nursery](/linter/#nursery) group. This means that it i { "linter": { "rules": { - "nursery": { + "suspicious": { "noDuplicateDependencies": "error" } } @@ -113,8 +111,8 @@ And dependencies listed in "overrides" & "bundleDependencies" are not checked ag - [Disable a rule](/linter/#disable-a-rule) - [Configure the code fix](/linter#configure-the-code-fix) - [Rule options](/linter/#rule-options) -- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_json_analyze/src/lint/nursery/no_duplicate_dependencies.rs) -- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_json_analyze/tests/specs/nursery/noDuplicateDependencies) +- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_json_analyze/src/lint/suspicious/no_duplicate_dependencies.rs) +- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_json_analyze/tests/specs/suspicious/noDuplicateDependencies) diff --git a/src/content/docs/linter/rules/no-empty-source.mdx b/src/content/docs/linter/rules/no-empty-source.mdx index eef276f19..d287c685d 100644 --- a/src/content/docs/linter/rules/no-empty-source.mdx +++ b/src/content/docs/linter/rules/no-empty-source.mdx @@ -9,20 +9,18 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; -:::caution -This rule is part of the [nursery](/linter/#nursery) group. This means that it is experimental and the behavior can change at any time. -::: ## Summary - Rule available since: `v2.2.7` -- Diagnostic Category: [`lint/nursery/noEmptySource`](/reference/diagnostics#diagnostic-category) +- Diagnostic Category: [`lint/suspicious/noEmptySource`](/reference/diagnostics#diagnostic-category) +- This rule isn't recommended, so you need to enable it. - This rule doesn't have a fix. -- The default severity of this rule is [**information**](/reference/diagnostics#information). +- The default severity of this rule is [**warning**](/reference/diagnostics#warning). ## How to configure ```json title="biome.json" { "linter": { "rules": { - "nursery": { + "suspicious": { "noEmptySource": "error" } } @@ -46,7 +44,7 @@ A source containing only the following is considered empty: ``` -
code-block.graphql:2:1 lint/nursery/noEmptySource ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

An empty source is not allowed.

> 2 │


Empty sources can clutter the codebase and increase cognitive load; deleting empty sources can help reduce it.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.graphql:2:1 lint/suspicious/noEmptySource ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

An empty source is not allowed.

> 2 │


Empty sources can clutter the codebase and increase cognitive load; deleting empty sources can help reduce it.

```graphql ``` @@ -74,7 +72,7 @@ Default `false` { "linter": { "rules": { - "nursery": { + "suspicious": { "noEmptySource": { "options": { "allowComments": true @@ -93,7 +91,7 @@ Default `false` ``` -
code-block.graphql:2:1 lint/nursery/noEmptySource ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

An empty source is not allowed.

> 2 │


Empty sources can clutter the codebase and increase cognitive load; deleting empty sources can help reduce it.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.graphql:2:1 lint/suspicious/noEmptySource ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

An empty source is not allowed.

> 2 │


Empty sources can clutter the codebase and increase cognitive load; deleting empty sources can help reduce it.

#### Valid @@ -105,19 +103,17 @@ Default `false` - [Disable a rule](/linter/#disable-a-rule) - [Configure the code fix](/linter#configure-the-code-fix) - [Rule options](/linter/#rule-options) -- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_graphql_analyze/src/lint/nursery/no_empty_source.rs) -- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_graphql_analyze/tests/specs/nursery/noEmptySource) +- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_graphql_analyze/src/lint/suspicious/no_empty_source.rs) +- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_graphql_analyze/tests/specs/suspicious/noEmptySource)
-:::caution -This rule is part of the [nursery](/linter/#nursery) group. This means that it is experimental and the behavior can change at any time. -::: ## Summary - Rule available since: `v2.2.7` -- Diagnostic Category: [`lint/nursery/noEmptySource`](/reference/diagnostics#diagnostic-category) +- Diagnostic Category: [`lint/suspicious/noEmptySource`](/reference/diagnostics#diagnostic-category) +- This rule isn't recommended, so you need to enable it. - This rule doesn't have a fix. -- The default severity of this rule is [**information**](/reference/diagnostics#information). +- The default severity of this rule is [**warning**](/reference/diagnostics#warning). - Sources: - Same as [`no-empty-source`](https://github.com/stylelint/stylelint/blob/main/lib/rules/no-empty-source/README.md) @@ -126,7 +122,7 @@ This rule is part of the [nursery](/linter/#nursery) group. This means that it i { "linter": { "rules": { - "nursery": { + "suspicious": { "noEmptySource": "error" } } @@ -150,13 +146,13 @@ A source containing only the following is considered empty: ``` -
code-block.css:2:1 lint/nursery/noEmptySource ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

An empty source is not allowed.

> 2 │


Empty sources can clutter the codebase and increase cognitive load; deleting empty sources can help reduce it.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.css:2:1 lint/suspicious/noEmptySource ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

An empty source is not allowed.

> 2 │


Empty sources can clutter the codebase and increase cognitive load; deleting empty sources can help reduce it.

```css /* Only comments */ ``` -
code-block.css:2:1 lint/nursery/noEmptySource ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

An empty source is not allowed.

1 │ /* Only comments */
> 2 │


Empty sources can clutter the codebase and increase cognitive load; deleting empty sources can help reduce it.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.css:2:1 lint/suspicious/noEmptySource ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

An empty source is not allowed.

1 │ /* Only comments */
> 2 │


Empty sources can clutter the codebase and increase cognitive load; deleting empty sources can help reduce it.

### Valid @@ -177,7 +173,7 @@ Default `false` { "linter": { "rules": { - "nursery": { + "suspicious": { "noEmptySource": { "options": { "allowComments": true @@ -196,7 +192,7 @@ Default `false` ``` -
code-block.css:2:1 lint/nursery/noEmptySource ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

An empty source is not allowed.

> 2 │


Empty sources can clutter the codebase and increase cognitive load; deleting empty sources can help reduce it.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.css:2:1 lint/suspicious/noEmptySource ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

An empty source is not allowed.

> 2 │


Empty sources can clutter the codebase and increase cognitive load; deleting empty sources can help reduce it.

#### Valid @@ -209,19 +205,17 @@ Default `false` - [Disable a rule](/linter/#disable-a-rule) - [Configure the code fix](/linter#configure-the-code-fix) - [Rule options](/linter/#rule-options) -- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_css_analyze/src/lint/nursery/no_empty_source.rs) -- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_css_analyze/tests/specs/nursery/noEmptySource) +- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_css_analyze/src/lint/suspicious/no_empty_source.rs) +- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_css_analyze/tests/specs/suspicious/noEmptySource)
-:::caution -This rule is part of the [nursery](/linter/#nursery) group. This means that it is experimental and the behavior can change at any time. -::: ## Summary - Rule available since: `v2.2.7` -- Diagnostic Category: [`lint/nursery/noEmptySource`](/reference/diagnostics#diagnostic-category) +- Diagnostic Category: [`lint/suspicious/noEmptySource`](/reference/diagnostics#diagnostic-category) +- This rule isn't recommended, so you need to enable it. - This rule doesn't have a fix. -- The default severity of this rule is [**information**](/reference/diagnostics#information). +- The default severity of this rule is [**warning**](/reference/diagnostics#warning). - Sources: - Same as [`unicorn/no-empty-file`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-empty-file.md) @@ -230,7 +224,7 @@ This rule is part of the [nursery](/linter/#nursery) group. This means that it i { "linter": { "rules": { - "nursery": { + "suspicious": { "noEmptySource": "error" } } @@ -258,44 +252,44 @@ A source containing only the following is considered empty: ``` -
code-block.js:2:1 lint/nursery/noEmptySource ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

An empty source is not allowed.

> 2 │


Empty sources can clutter the codebase and increase cognitive load; deleting empty sources can help reduce it.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.js:2:1 lint/suspicious/noEmptySource ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

An empty source is not allowed.

> 2 │


Empty sources can clutter the codebase and increase cognitive load; deleting empty sources can help reduce it.

```js // Only comments ``` -
code-block.js:2:1 lint/nursery/noEmptySource ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

An empty source is not allowed.

1 │ // Only comments
> 2 │


Empty sources can clutter the codebase and increase cognitive load; deleting empty sources can help reduce it.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.js:2:1 lint/suspicious/noEmptySource ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

An empty source is not allowed.

1 │ // Only comments
> 2 │


Empty sources can clutter the codebase and increase cognitive load; deleting empty sources can help reduce it.

```js /* Only comments */ ``` -
code-block.js:2:1 lint/nursery/noEmptySource ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

An empty source is not allowed.

1 │ /* Only comments */
> 2 │


Empty sources can clutter the codebase and increase cognitive load; deleting empty sources can help reduce it.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.js:2:1 lint/suspicious/noEmptySource ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

An empty source is not allowed.

1 │ /* Only comments */
> 2 │


Empty sources can clutter the codebase and increase cognitive load; deleting empty sources can help reduce it.

```js 'use strict'; ``` -
code-block.js:1:1 lint/nursery/noEmptySource ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

An empty source is not allowed.

> 1 │ 'use strict';
^^^^^^^^^^^^^
2 │

Empty sources can clutter the codebase and increase cognitive load; deleting empty sources can help reduce it.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.js:1:1 lint/suspicious/noEmptySource ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

An empty source is not allowed.

> 1 │ 'use strict';
^^^^^^^^^^^^^
2 │

Empty sources can clutter the codebase and increase cognitive load; deleting empty sources can help reduce it.

```js ; ``` -
code-block.js:1:1 lint/nursery/noEmptySource ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

An empty source is not allowed.

> 1 │ ;
^
2 │

Empty sources can clutter the codebase and increase cognitive load; deleting empty sources can help reduce it.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.js:1:1 lint/suspicious/noEmptySource ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

An empty source is not allowed.

> 1 │ ;
^
2 │

Empty sources can clutter the codebase and increase cognitive load; deleting empty sources can help reduce it.

```js { } ``` -
code-block.js:1:1 lint/nursery/noEmptySource ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

An empty source is not allowed.

> 1 │ {
^
> 2 │ }
^
3 │

Empty sources can clutter the codebase and increase cognitive load; deleting empty sources can help reduce it.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.js:1:1 lint/suspicious/noEmptySource ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

An empty source is not allowed.

> 1 │ {
^
> 2 │ }
^
3 │

Empty sources can clutter the codebase and increase cognitive load; deleting empty sources can help reduce it.

```js #!/usr/bin/env node ``` -
code-block.js:1:1 lint/nursery/noEmptySource ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

An empty source is not allowed.

> 1 │ #!/usr/bin/env node
^^^^^^^^^^^^^^^^^^^
2 │

Empty sources can clutter the codebase and increase cognitive load; deleting empty sources can help reduce it.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.js:1:1 lint/suspicious/noEmptySource ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

An empty source is not allowed.

> 1 │ #!/usr/bin/env node
^^^^^^^^^^^^^^^^^^^
2 │

Empty sources can clutter the codebase and increase cognitive load; deleting empty sources can help reduce it.

### Valid @@ -332,7 +326,7 @@ Default `false` { "linter": { "rules": { - "nursery": { + "suspicious": { "noEmptySource": { "options": { "allowComments": true @@ -351,7 +345,7 @@ Default `false` ``` -
code-block.js:2:1 lint/nursery/noEmptySource ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

An empty source is not allowed.

> 2 │


Empty sources can clutter the codebase and increase cognitive load; deleting empty sources can help reduce it.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.js:2:1 lint/suspicious/noEmptySource ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

An empty source is not allowed.

> 2 │


Empty sources can clutter the codebase and increase cognitive load; deleting empty sources can help reduce it.

#### Valid @@ -364,8 +358,8 @@ Default `false` - [Disable a rule](/linter/#disable-a-rule) - [Configure the code fix](/linter#configure-the-code-fix) - [Rule options](/linter/#rule-options) -- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/nursery/no_empty_source.rs) -- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/nursery/noEmptySource) +- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/suspicious/no_empty_source.rs) +- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/suspicious/noEmptySource)
diff --git a/src/content/docs/linter/rules/no-import-cycles.mdx b/src/content/docs/linter/rules/no-import-cycles.mdx index 673735d26..61321d046 100644 --- a/src/content/docs/linter/rules/no-import-cycles.mdx +++ b/src/content/docs/linter/rules/no-import-cycles.mdx @@ -9,15 +9,13 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; -:::caution -This rule is part of the [nursery](/linter/#nursery) group. This means that it is experimental and the behavior can change at any time. -::: :::note This rule belongs to the project domain. This means that its activation will activate the Biome Scanner to scan the files of your project. Read more about it in the [documentation page](/linter/domains#project) ::: ## Summary - Rule available since: `v2.0.0` -- Diagnostic Category: [`lint/nursery/noImportCycles`](/reference/diagnostics#diagnostic-category) +- Diagnostic Category: [`lint/suspicious/noImportCycles`](/reference/diagnostics#diagnostic-category) +- This rule isn't recommended, so you need to enable it. - This rule doesn't have a fix. - The default severity of this rule is [**warning**](/reference/diagnostics#warning). - This rule belongs to the following domains: @@ -30,7 +28,7 @@ This rule belongs to the project domain. This means that its activation will act { "linter": { "rules": { - "nursery": { + "suspicious": { "noImportCycles": "error" } } @@ -77,7 +75,7 @@ export function bar() { } ``` -
/foobar.js:1:21 lint/nursery/noImportCycles ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

This import is part of a cycle.

> 1 │ import { baz } from "./baz.js";
^^^^^^^^^^
2 │
3 │ export function foo() {

This import resolves to /baz.js
... which imports /foobar.js
... which is the file we're importing from.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
/foobar.js:1:21 lint/suspicious/noImportCycles ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

This import is part of a cycle.

> 1 │ import { baz } from "./baz.js";
^^^^^^^^^^
2 │
3 │ export function foo() {

This import resolves to /baz.js
... which imports /foobar.js
... which is the file we're importing from.

```js title='baz.js' import { bar } from "./foobar.js"; @@ -87,7 +85,7 @@ export function baz() { } ``` -
/baz.js:1:21 lint/nursery/noImportCycles ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

This import is part of a cycle.

> 1 │ import { bar } from "./foobar.js";
^^^^^^^^^^^^^
2 │
3 │ export function baz() {

This import resolves to /foobar.js
... which imports /baz.js
... which is the file we're importing from.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
/baz.js:1:21 lint/suspicious/noImportCycles ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

This import is part of a cycle.

> 1 │ import { bar } from "./foobar.js";
^^^^^^^^^^^^^
2 │
3 │ export function baz() {

This import resolves to /foobar.js
... which imports /baz.js
... which is the file we're importing from.

### Valid @@ -154,7 +152,7 @@ the compiler if the `verbatimModuleSyntax` option is enabled. Enabled by default { "linter": { "rules": { - "nursery": { + "suspicious": { "noImportCycles": { "options": { "ignoreTypes": false @@ -185,15 +183,15 @@ export function bar(foo: Foo) { } ``` -
/qux.ts:1:26 lint/nursery/noImportCycles ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

This import is part of a cycle.

> 1 │ import type { Foo } from "./types.ts";
^^^^^^^^^^^^
2 │
3 │ export function bar(foo: Foo) {

This import resolves to /types.ts
... which imports /qux.ts
... which is the file we're importing from.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
/qux.ts:1:26 lint/suspicious/noImportCycles ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

This import is part of a cycle.

> 1 │ import type { Foo } from "./types.ts";
^^^^^^^^^^^^
2 │
3 │ export function bar(foo: Foo) {

This import resolves to /types.ts
... which imports /qux.ts
... which is the file we're importing from.

## Related links - [Disable a rule](/linter/#disable-a-rule) - [Configure the code fix](/linter#configure-the-code-fix) - [Rule options](/linter/#rule-options) -- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/nursery/no_import_cycles.rs) -- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/nursery/noImportCycles) +- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/suspicious/no_import_cycles.rs) +- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/suspicious/noImportCycles)
diff --git a/src/content/docs/linter/rules/no-jsx-literals.mdx b/src/content/docs/linter/rules/no-jsx-literals.mdx index 8215e90e8..830e45861 100644 --- a/src/content/docs/linter/rules/no-jsx-literals.mdx +++ b/src/content/docs/linter/rules/no-jsx-literals.mdx @@ -9,12 +9,10 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; -:::caution -This rule is part of the [nursery](/linter/#nursery) group. This means that it is experimental and the behavior can change at any time. -::: ## Summary - Rule available since: `v2.2.4` -- Diagnostic Category: [`lint/nursery/noJsxLiterals`](/reference/diagnostics#diagnostic-category) +- Diagnostic Category: [`lint/style/noJsxLiterals`](/reference/diagnostics#diagnostic-category) +- This rule isn't recommended, so you need to enable it. - This rule doesn't have a fix. - The default severity of this rule is [**information**](/reference/diagnostics#information). - Sources: @@ -25,7 +23,7 @@ This rule is part of the [nursery](/linter/#nursery) group. This means that it i { "linter": { "rules": { - "nursery": { + "style": { "noJsxLiterals": "error" } } @@ -48,13 +46,13 @@ to maintain, especially in applications that require internationalization or dyn
Hello World
``` -
code-block.jsx:1:6 lint/nursery/noJsxLiterals ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Incorrect use of string literal detected.

> 1 │ <div>Hello World</div>
^^^^^^^^^^^
2 │

String literals in JSX can make code harder to maintain and internationalize.

Consider avoiding hardcoded strings entirely.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.jsx:1:6 lint/style/noJsxLiterals ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Incorrect use of string literal detected.

> 1 │ <div>Hello World</div>
^^^^^^^^^^^
2 │

String literals in JSX can make code harder to maintain and internationalize.

Consider avoiding hardcoded strings entirely.

```jsx <>Welcome to our site ``` -
code-block.jsx:1:3 lint/nursery/noJsxLiterals ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Incorrect use of string literal detected.

> 1 │ <>Welcome to our site</>
^^^^^^^^^^^^^^^^^^^
2 │

String literals in JSX can make code harder to maintain and internationalize.

Consider avoiding hardcoded strings entirely.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.jsx:1:3 lint/style/noJsxLiterals ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Incorrect use of string literal detected.

> 1 │ <>Welcome to our site</>
^^^^^^^^^^^^^^^^^^^
2 │

String literals in JSX can make code harder to maintain and internationalize.

Consider avoiding hardcoded strings entirely.

```jsx @@ -62,7 +60,7 @@ to maintain, especially in applications that require internationalization or dyn ``` -
code-block.jsx:1:7 lint/nursery/noJsxLiterals ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Incorrect use of string literal detected.

> 1 │ <span>

> 2 │ Please enter your name
> 3 │ </span>

4 │

String literals in JSX can make code harder to maintain and internationalize.

Consider avoiding hardcoded strings entirely.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.jsx:1:7 lint/style/noJsxLiterals ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Incorrect use of string literal detected.

> 1 │ <span>

> 2 │ Please enter your name
> 3 │ </span>

4 │

String literals in JSX can make code harder to maintain and internationalize.

Consider avoiding hardcoded strings entirely.

### Valid @@ -97,7 +95,7 @@ When enabled, the rule will also flag string literals inside JSX expressions and { "linter": { "rules": { - "nursery": { + "style": { "noJsxLiterals": { "options": { "noStrings": true @@ -116,13 +114,13 @@ When enabled, the rule will also flag string literals inside JSX expressions and ``` -
code-block.jsx:2:4 lint/nursery/noJsxLiterals ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Incorrect use of string literal detected.

1 │ <span>
> 2 │ {'Please enter your name'}
^^^^^^^^^^^^^^^^^^^^^^^^
3 │ </span>
4 │

String literals in JSX can make code harder to maintain and internationalize.

Consider avoiding hardcoded strings entirely.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.jsx:2:4 lint/style/noJsxLiterals ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Incorrect use of string literal detected.

1 │ <span>
> 2 │ {'Please enter your name'}
^^^^^^^^^^^^^^^^^^^^^^^^
3 │ </span>
4 │

String literals in JSX can make code harder to maintain and internationalize.

Consider avoiding hardcoded strings entirely.

```jsx ``` -
code-block.jsx:1:18 lint/nursery/noJsxLiterals ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Incorrect use of string literal detected.

> 1 │ <Component title="Hello!" />
^^^^^^^^
2 │

String literals in JSX can make code harder to maintain and internationalize.

Consider avoiding hardcoded strings entirely.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.jsx:1:18 lint/style/noJsxLiterals ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Incorrect use of string literal detected.

> 1 │ <Component title="Hello!" />
^^^^^^^^
2 │

String literals in JSX can make code harder to maintain and internationalize.

Consider avoiding hardcoded strings entirely.

### `allowedStrings` @@ -133,7 +131,7 @@ or characters that don't need to be wrapped in expressions. { "linter": { "rules": { - "nursery": { + "style": { "noJsxLiterals": { "options": { "allowedStrings": [ @@ -169,7 +167,7 @@ When enabled, the rule will ignore string literals used as prop values. { "linter": { "rules": { - "nursery": { + "style": { "noJsxLiterals": { "options": { "ignoreProps": true @@ -194,8 +192,8 @@ When enabled, the rule will ignore string literals used as prop values. - [Disable a rule](/linter/#disable-a-rule) - [Configure the code fix](/linter#configure-the-code-fix) - [Rule options](/linter/#rule-options) -- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/nursery/no_jsx_literals.rs) -- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/nursery/noJsxLiterals) +- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/style/no_jsx_literals.rs) +- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/style/noJsxLiterals)
diff --git a/src/content/docs/linter/rules/no-next-async-client-component.mdx b/src/content/docs/linter/rules/no-next-async-client-component.mdx index 06918a07a..145f72664 100644 --- a/src/content/docs/linter/rules/no-next-async-client-component.mdx +++ b/src/content/docs/linter/rules/no-next-async-client-component.mdx @@ -9,14 +9,12 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; -:::caution -This rule is part of the [nursery](/linter/#nursery) group. This means that it is experimental and the behavior can change at any time. -::: ## Summary - Rule available since: `v2.2.0` -- Diagnostic Category: [`lint/nursery/noNextAsyncClientComponent`](/reference/diagnostics#diagnostic-category) +- Diagnostic Category: [`lint/correctness/noNextAsyncClientComponent`](/reference/diagnostics#diagnostic-category) +- This rule isn't recommended, so you need to enable it. - This rule doesn't have a fix. -- The default severity of this rule is [**warning**](/reference/diagnostics#warning). +- The default severity of this rule is [**error**](/reference/diagnostics#error). - This rule belongs to the following domains: - [`next`](/linter/domains#next) - Sources: @@ -27,7 +25,7 @@ This rule is part of the [nursery](/linter/#nursery) group. This means that it i { "linter": { "rules": { - "nursery": { + "correctness": { "noNextAsyncClientComponent": "error" } } @@ -55,7 +53,7 @@ export default async function MyComponent() { } ``` -
code-block.jsx:3:16 lint/nursery/noNextAsyncClientComponent ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The component MyComponent is an async client component, which is not allowed.

1 │ "use client";
2 │
> 3 │ export default async function MyComponent() {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 4 │ return <div>Hello</div>;
> 5 │ }
^
6 │

Client components with "use client" directive should not be async functions as this can cause hydration mismatches and break React's rendering lifecycle.

Consider using useEffect for async operations inside the component, or remove the "use client" directive if this should be a server component.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.jsx:3:16 lint/correctness/noNextAsyncClientComponent ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The component MyComponent is an async client component, which is not allowed.

1 │ "use client";
2 │
> 3 │ export default async function MyComponent() {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 4 │ return <div>Hello</div>;
> 5 │ }
^
6 │

Client components with "use client" directive should not be async functions as this can cause hydration mismatches and break React's rendering lifecycle.

Consider using useEffect for async operations inside the component, or remove the "use client" directive if this should be a server component.

### Valid @@ -80,8 +78,8 @@ export default async function ServerComponent() { - [Disable a rule](/linter/#disable-a-rule) - [Configure the code fix](/linter#configure-the-code-fix) - [Rule options](/linter/#rule-options) -- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs) -- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent) +- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/correctness/no_next_async_client_component.rs) +- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/correctness/noNextAsyncClientComponent)
diff --git a/src/content/docs/linter/rules/no-react-forward-ref.mdx b/src/content/docs/linter/rules/no-react-forward-ref.mdx index b467b2115..df3c16426 100644 --- a/src/content/docs/linter/rules/no-react-forward-ref.mdx +++ b/src/content/docs/linter/rules/no-react-forward-ref.mdx @@ -9,12 +9,10 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; -:::caution -This rule is part of the [nursery](/linter/#nursery) group. This means that it is experimental and the behavior can change at any time. -::: ## Summary - Rule available since: `v2.2.5` -- Diagnostic Category: [`lint/nursery/noReactForwardRef`](/reference/diagnostics#diagnostic-category) +- Diagnostic Category: [`lint/suspicious/noReactForwardRef`](/reference/diagnostics#diagnostic-category) +- This rule isn't recommended, so you need to enable it. - This rule has an [**unsafe**](/linter/#unsafe-fixes) fix. - The default severity of this rule is [**warning**](/reference/diagnostics#warning). - This rule belongs to the following domains: @@ -28,7 +26,7 @@ This rule is part of the [nursery](/linter/#nursery) group. This means that it i { "linter": { "rules": { - "nursery": { + "suspicious": { "noReactForwardRef": "error" } } @@ -58,7 +56,7 @@ const MyInput = forwardRef(function MyInput(props, ref) { }); ``` -
code-block.jsx:3:17 lint/nursery/noReactForwardRef  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Use of forwardRef is detected, which is deprecated.

1 │ import { forwardRef } from "react";
2 │
> 3 │ const MyInput = forwardRef(function MyInput(props, ref) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 4 │ return <input ref={ref} {...props} />;
> 5 │ });
^^
6 │

In React 19, 'forwardRef' is no longer necessary. Pass 'ref' as a prop instead.

Replace the use of forwardRef with passing ref as a prop.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

Unsafe fix: Remove the forwardRef() call and receive the ref as a prop.

1 1 import { forwardRef } from "react";
2 2
3 - const·MyInput·=·forwardRef(function·MyInput(props,·ref)·{
3+ const·MyInput·=·function·MyInput({·ref,·...props·})·{
4 4 return <input ref={ref} {...props} />;
5 - });
5+ };
6 6

+
code-block.jsx:3:17 lint/suspicious/noReactForwardRef  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Use of forwardRef is detected, which is deprecated.

1 │ import { forwardRef } from "react";
2 │
> 3 │ const MyInput = forwardRef(function MyInput(props, ref) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 4 │ return <input ref={ref} {...props} />;
> 5 │ });
^^
6 │

In React 19, 'forwardRef' is no longer necessary. Pass 'ref' as a prop instead.

Replace the use of forwardRef with passing ref as a prop.

Unsafe fix: Remove the forwardRef() call and receive the ref as a prop.

1 1 import { forwardRef } from "react";
2 2
3 - const·MyInput·=·forwardRef(function·MyInput(props,·ref)·{
3+ const·MyInput·=·function·MyInput({·ref,·...props·})·{
4 4 return <input ref={ref} {...props} />;
5 - });
5+ };
6 6

```jsx import { forwardRef } from "react"; @@ -68,7 +66,7 @@ const MyInput = forwardRef((props, ref) => { }); ``` -
code-block.jsx:3:17 lint/nursery/noReactForwardRef  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Use of forwardRef is detected, which is deprecated.

1 │ import { forwardRef } from "react";
2 │
> 3 │ const MyInput = forwardRef((props, ref) => {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 4 │ return <input ref={ref} {...props} />;
> 5 │ });
^^
6 │

In React 19, 'forwardRef' is no longer necessary. Pass 'ref' as a prop instead.

Replace the use of forwardRef with passing ref as a prop.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

Unsafe fix: Remove the forwardRef() call and receive the ref as a prop.

1 1 import { forwardRef } from "react";
2 2
3 - const·MyInput·=·forwardRef((props,·ref)·=>·{
3+ const·MyInput·=·({·ref,·...props·})·=>·{
4 4 return <input ref={ref} {...props} />;
5 - });
5+ };
6 6

+
code-block.jsx:3:17 lint/suspicious/noReactForwardRef  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Use of forwardRef is detected, which is deprecated.

1 │ import { forwardRef } from "react";
2 │
> 3 │ const MyInput = forwardRef((props, ref) => {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 4 │ return <input ref={ref} {...props} />;
> 5 │ });
^^
6 │

In React 19, 'forwardRef' is no longer necessary. Pass 'ref' as a prop instead.

Replace the use of forwardRef with passing ref as a prop.

Unsafe fix: Remove the forwardRef() call and receive the ref as a prop.

1 1 import { forwardRef } from "react";
2 2
3 - const·MyInput·=·forwardRef((props,·ref)·=>·{
3+ const·MyInput·=·({·ref,·...props·})·=>·{
4 4 return <input ref={ref} {...props} />;
5 - });
5+ };
6 6

### Valid @@ -89,8 +87,8 @@ const MyInput = ({ ref, ...props }) => { - [Disable a rule](/linter/#disable-a-rule) - [Configure the code fix](/linter#configure-the-code-fix) - [Rule options](/linter/#rule-options) -- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/nursery/no_react_forward_ref.rs) -- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/nursery/noReactForwardRef) +- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/suspicious/no_react_forward_ref.rs) +- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/suspicious/noReactForwardRef)
diff --git a/src/content/docs/linter/rules/no-redundant-alt.mdx b/src/content/docs/linter/rules/no-redundant-alt.mdx index 5d8d3735f..54cecb356 100644 --- a/src/content/docs/linter/rules/no-redundant-alt.mdx +++ b/src/content/docs/linter/rules/no-redundant-alt.mdx @@ -128,10 +128,10 @@ hidden, then the rule will always succeed. ### Valid ```html -<> +
alt Picture of me taking a photo of an image - +
``` ## Related links diff --git a/src/content/docs/linter/rules/no-shadow.mdx b/src/content/docs/linter/rules/no-shadow.mdx index da11753aa..860da2c18 100644 --- a/src/content/docs/linter/rules/no-shadow.mdx +++ b/src/content/docs/linter/rules/no-shadow.mdx @@ -16,7 +16,7 @@ This rule is part of the [nursery](/linter/#nursery) group. This means that it i - Rule available since: `v2.0.0` - Diagnostic Category: [`lint/nursery/noShadow`](/reference/diagnostics#diagnostic-category) - This rule doesn't have a fix. -- The default severity of this rule is [**information**](/reference/diagnostics#information). +- The default severity of this rule is [**warning**](/reference/diagnostics#warning). - Sources: - Same as [`no-shadow`](https://eslint.org/docs/latest/rules/no-shadow) @@ -51,7 +51,7 @@ if (true) { } ``` -
code-block.js:3:10 lint/nursery/noShadow ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

This variable shadows another variable with the same name in the outer scope.

1 │ const foo = "bar";
2 │ if (true) {
> 3 │ const foo = "baz";
^^^
4 │ }
5 │

This is the shadowed variable, which is now inaccessible in the inner scope.

> 1 │ const foo = "bar";
^^^
2 │ if (true) {
3 │ const foo = "baz";

Consider renaming this variable. It's easy to confuse the origin of variables if they share the same name.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.js:3:10 lint/nursery/noShadow ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

This variable shadows another variable with the same name in the outer scope.

1 │ const foo = "bar";
2 │ if (true) {
> 3 │ const foo = "baz";
^^^
4 │ }
5 │

This is the shadowed variable, which is now inaccessible in the inner scope.

> 1 │ const foo = "bar";
^^^
2 │ if (true) {
3 │ const foo = "baz";

Consider renaming this variable. It's easy to confuse the origin of variables if they share the same name.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

Variable declarations in functions can shadow variables in the outer scope: @@ -62,7 +62,7 @@ const bar = function () { } ``` -
code-block.js:3:11 lint/nursery/noShadow ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

This variable shadows another variable with the same name in the outer scope.

1 │ const foo = "bar";
2 │ const bar = function () {
> 3 │ const foo = 10;
^^^
4 │ }
5 │

This is the shadowed variable, which is now inaccessible in the inner scope.

> 1 │ const foo = "bar";
^^^
2 │ const bar = function () {
3 │ const foo = 10;

Consider renaming this variable. It's easy to confuse the origin of variables if they share the same name.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.js:3:11 lint/nursery/noShadow ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

This variable shadows another variable with the same name in the outer scope.

1 │ const foo = "bar";
2 │ const bar = function () {
> 3 │ const foo = 10;
^^^
4 │ }
5 │

This is the shadowed variable, which is now inaccessible in the inner scope.

> 1 │ const foo = "bar";
^^^
2 │ const bar = function () {
3 │ const foo = 10;

Consider renaming this variable. It's easy to confuse the origin of variables if they share the same name.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

Function argument names can shadow variables in the outer scope: @@ -73,7 +73,7 @@ function bar(foo) { } ``` -
code-block.js:2:14 lint/nursery/noShadow ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

This variable shadows another variable with the same name in the outer scope.

1 │ const foo = "bar";
> 2 │ function bar(foo) {
^^^
3 │ foo = 10;
4 │ }

This is the shadowed variable, which is now inaccessible in the inner scope.

> 1 │ const foo = "bar";
^^^
2 │ function bar(foo) {
3 │ foo = 10;

Consider renaming this variable. It's easy to confuse the origin of variables if they share the same name.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.js:2:14 lint/nursery/noShadow ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

This variable shadows another variable with the same name in the outer scope.

1 │ const foo = "bar";
> 2 │ function bar(foo) {
^^^
3 │ foo = 10;
4 │ }

This is the shadowed variable, which is now inaccessible in the inner scope.

> 1 │ const foo = "bar";
^^^
2 │ function bar(foo) {
3 │ foo = 10;

Consider renaming this variable. It's easy to confuse the origin of variables if they share the same name.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

### Valid diff --git a/src/content/docs/linter/rules/no-svg-without-title.mdx b/src/content/docs/linter/rules/no-svg-without-title.mdx index ae37a7adc..40db57e72 100644 --- a/src/content/docs/linter/rules/no-svg-without-title.mdx +++ b/src/content/docs/linter/rules/no-svg-without-title.mdx @@ -110,10 +110,6 @@ To make svg accessible, the following methods are available: ``` -```jsx - -``` - ```jsx ``` @@ -265,10 +261,6 @@ To make svg accessible, the following methods are available: ``` -```html - -``` - ```html ``` diff --git a/src/content/docs/linter/rules/no-unresolved-imports.mdx b/src/content/docs/linter/rules/no-unresolved-imports.mdx index 20dc36e19..b68b4e4df 100644 --- a/src/content/docs/linter/rules/no-unresolved-imports.mdx +++ b/src/content/docs/linter/rules/no-unresolved-imports.mdx @@ -9,17 +9,15 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; -:::caution -This rule is part of the [nursery](/linter/#nursery) group. This means that it is experimental and the behavior can change at any time. -::: :::note This rule belongs to the project domain. This means that its activation will activate the Biome Scanner to scan the files of your project. Read more about it in the [documentation page](/linter/domains#project) ::: ## Summary - Rule available since: `v2.0.0` -- Diagnostic Category: [`lint/nursery/noUnresolvedImports`](/reference/diagnostics#diagnostic-category) +- Diagnostic Category: [`lint/correctness/noUnresolvedImports`](/reference/diagnostics#diagnostic-category) +- This rule isn't recommended, so you need to enable it. - This rule doesn't have a fix. -- The default severity of this rule is [**information**](/reference/diagnostics#information). +- The default severity of this rule is [**error**](/reference/diagnostics#error). - This rule belongs to the following domains: - [`project`](/linter/domains#project) - Sources: @@ -30,7 +28,7 @@ This rule belongs to the project domain. This means that its activation will act { "linter": { "rules": { - "nursery": { + "correctness": { "noUnresolvedImports": "error" } } @@ -65,7 +63,7 @@ export function foo() {}; import { fooo } from "./foo.js"; ``` -
/bar.js:2:10 lint/nursery/noUnresolvedImports ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The path ./foo.js has no export named fooo.

1 │ // Attempt to import symbol with a typo:
> 2 │ import { fooo } from "./foo.js";
^^^^
3 │

Make sure that the path is correct and that you're importing the right symbol.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
/bar.js:2:10 lint/correctness/noUnresolvedImports ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The path ./foo.js has no export named fooo.

1 │ // Attempt to import symbol with a typo:
> 2 │ import { fooo } from "./foo.js";
^^^^
3 │

Make sure that the path is correct and that you're importing the right symbol.

### Valid @@ -83,8 +81,8 @@ import { foo } from "./foo.js"; - [Disable a rule](/linter/#disable-a-rule) - [Configure the code fix](/linter#configure-the-code-fix) - [Rule options](/linter/#rule-options) -- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/nursery/no_unresolved_imports.rs) -- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/nursery/noUnresolvedImports) +- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/correctness/no_unresolved_imports.rs) +- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/correctness/noUnresolvedImports)
diff --git a/src/content/docs/linter/rules/no-unused-expressions.mdx b/src/content/docs/linter/rules/no-unused-expressions.mdx index 03b61b417..b49c83572 100644 --- a/src/content/docs/linter/rules/no-unused-expressions.mdx +++ b/src/content/docs/linter/rules/no-unused-expressions.mdx @@ -9,14 +9,12 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; -:::caution -This rule is part of the [nursery](/linter/#nursery) group. This means that it is experimental and the behavior can change at any time. -::: ## Summary - Rule available since: `v2.2.5` -- Diagnostic Category: [`lint/nursery/noUnusedExpressions`](/reference/diagnostics#diagnostic-category) +- Diagnostic Category: [`lint/suspicious/noUnusedExpressions`](/reference/diagnostics#diagnostic-category) +- This rule isn't recommended, so you need to enable it. - This rule doesn't have a fix. -- The default severity of this rule is [**information**](/reference/diagnostics#information). +- The default severity of this rule is [**warning**](/reference/diagnostics#warning). - Sources: - Same as [`no-unused-expressions`](https://eslint.org/docs/latest/rules/no-unused-expressions) @@ -25,7 +23,7 @@ This rule is part of the [nursery](/linter/#nursery) group. This means that it i { "linter": { "rules": { - "nursery": { + "suspicious": { "noUnusedExpressions": "error" } } @@ -55,79 +53,79 @@ that the author forgot to call. 0 ``` -
code-block.js:1:1 lint/nursery/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

> 1 │ 0
^
2 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.js:1:1 lint/suspicious/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

> 1 │ 0
^
2 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

```js if(0) 0 ``` -
code-block.js:1:7 lint/nursery/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

> 1 │ if(0) 0
^
2 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.js:1:7 lint/suspicious/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

> 1 │ if(0) 0
^
2 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

```js {0} ``` -
code-block.js:1:2 lint/nursery/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

> 1 │ {0}
^
2 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.js:1:2 lint/suspicious/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

> 1 │ {0}
^
2 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

```js f(0), {} ``` -
code-block.js:1:1 lint/nursery/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

> 1 │ f(0), {}
^^^^^^^^
2 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.js:1:1 lint/suspicious/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

> 1 │ f(0), {}
^^^^^^^^
2 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

```js a && b() ``` -
code-block.js:1:1 lint/nursery/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

> 1 │ a && b()
^^^^^^^^
2 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.js:1:1 lint/suspicious/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

> 1 │ a && b()
^^^^^^^^
2 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

```js a, b() ``` -
code-block.js:1:1 lint/nursery/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

> 1 │ a, b()
^^^^^^
2 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.js:1:1 lint/suspicious/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

> 1 │ a, b()
^^^^^^
2 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

```js c = a, b ``` -
code-block.js:1:1 lint/nursery/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

> 1 │ c = a, b
^^^^^^^^
2 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.js:1:1 lint/suspicious/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

> 1 │ c = a, b
^^^^^^^^
2 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

```js a() && function namedFunctionInExpressionContext () {f();} ``` -
code-block.js:1:1 lint/nursery/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

> 1 │ a() && function namedFunctionInExpressionContext () {f();}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.js:1:1 lint/suspicious/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

> 1 │ a() && function namedFunctionInExpressionContext () {f();}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

```js (function anIncompleteIIFE () {}); ``` -
code-block.js:1:1 lint/nursery/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

> 1 │ (function anIncompleteIIFE () {});
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.js:1:1 lint/suspicious/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

> 1 │ (function anIncompleteIIFE () {});
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

```js injectGlobal`body{ color: red; }` ``` -
code-block.js:1:1 lint/nursery/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

> 1 │ injectGlobal`body{ color: red; }`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.js:1:1 lint/suspicious/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

> 1 │ injectGlobal`body{ color: red; }`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

```ts Set ``` -
code-block.ts:1:1 lint/nursery/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

> 1 │ Set<number>
^^^^^^^^^^^
2 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.ts:1:1 lint/suspicious/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

> 1 │ Set<number>
^^^^^^^^^^^
2 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

```ts 1 as number ``` -
code-block.ts:1:1 lint/nursery/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

> 1 │ 1 as number
^^^^^^^^^^^
2 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.ts:1:1 lint/suspicious/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

> 1 │ 1 as number
^^^^^^^^^^^
2 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

```ts window! ``` -
code-block.ts:1:1 lint/nursery/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

> 1 │ window!
^^^^^^^
2 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.ts:1:1 lint/suspicious/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

> 1 │ window!
^^^^^^^
2 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

JSX expressions are considered invalid when used as a statement too: @@ -135,13 +133,13 @@ JSX expressions are considered invalid when used as a statement too: ``` -
code-block.jsx:1:1 lint/nursery/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

> 1 │ <MyComponent />
^^^^^^^^^^^^^^^
2 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.jsx:1:1 lint/suspicious/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

> 1 │ <MyComponent />
^^^^^^^^^^^^^^^
2 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

```jsx <> ``` -
code-block.jsx:1:1 lint/nursery/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

> 1 │ <></>
^^^^^
2 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.jsx:1:1 lint/suspicious/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

> 1 │ <></>
^^^^^
2 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

### Valid @@ -196,7 +194,7 @@ doSomething(); "use strict"; // this isn't in a directive prologue, because there is a non-directive statement before it ``` -
code-block.js:2:1 lint/nursery/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

1 │ doSomething();
> 2 │ "use strict"; // this isn't in a directive prologue, because there is a non-directive statement before it
^^^^^^^^^^^^^
3 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.js:2:1 lint/suspicious/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

1 │ doSomething();
> 2 │ "use strict"; // this isn't in a directive prologue, because there is a non-directive statement before it
^^^^^^^^^^^^^
3 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

```js function foo() { @@ -204,7 +202,7 @@ function foo() { } ``` -
code-block.js:2:5 lint/nursery/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

1 │ function foo() {
> 2 │ "bar" + 1;
^^^^^^^^^
3 │ }
4 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.js:2:5 lint/suspicious/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

1 │ function foo() {
> 2 │ "bar" + 1;
^^^^^^^^^
3 │ }
4 │

This expression may be unintentionally unused or it might be a function that you forgot to call.

```js class Foo { @@ -214,15 +212,15 @@ class Foo { } ``` -
code-block.js:3:9 lint/nursery/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

1 │ class Foo {
2 │ static {
> 3 │ "use strict"; // class static blocks do not have directive prologues
^^^^^^^^^^^^^
4 │ }
5 │ }

This expression may be unintentionally unused or it might be a function that you forgot to call.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.js:3:9 lint/suspicious/noUnusedExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Expected an assignment or function call but found an expression instead.

1 │ class Foo {
2 │ static {
> 3 │ "use strict"; // class static blocks do not have directive prologues
^^^^^^^^^^^^^
4 │ }
5 │ }

This expression may be unintentionally unused or it might be a function that you forgot to call.

## Related links - [Disable a rule](/linter/#disable-a-rule) - [Configure the code fix](/linter#configure-the-code-fix) - [Rule options](/linter/#rule-options) -- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/nursery/no_unused_expressions.rs) -- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/nursery/noUnusedExpressions) +- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/suspicious/no_unused_expressions.rs) +- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/suspicious/noUnusedExpressions)
diff --git a/src/content/docs/linter/rules/no-useless-catch-binding.mdx b/src/content/docs/linter/rules/no-useless-catch-binding.mdx index 58a5b3658..8e931c3ee 100644 --- a/src/content/docs/linter/rules/no-useless-catch-binding.mdx +++ b/src/content/docs/linter/rules/no-useless-catch-binding.mdx @@ -9,12 +9,10 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; -:::caution -This rule is part of the [nursery](/linter/#nursery) group. This means that it is experimental and the behavior can change at any time. -::: ## Summary - Rule available since: `v2.2.3` -- Diagnostic Category: [`lint/nursery/noUselessCatchBinding`](/reference/diagnostics#diagnostic-category) +- Diagnostic Category: [`lint/complexity/noUselessCatchBinding`](/reference/diagnostics#diagnostic-category) +- This rule isn't recommended, so you need to enable it. - This rule has an [**unsafe**](/linter/#unsafe-fixes) fix. - The default severity of this rule is [**information**](/reference/diagnostics#information). ## How to configure @@ -22,7 +20,7 @@ This rule is part of the [nursery](/linter/#nursery) group. This means that it i { "linter": { "rules": { - "nursery": { + "complexity": { "noUselessCatchBinding": "error" } } @@ -46,7 +44,7 @@ try { } catch (unused) {} ``` -
code-block.js:3:9 lint/nursery/noUselessCatchBinding  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

This catch binding is unused.

1 │ try {
2 │ // Do something
> 3 │ } catch (unused) {}
^^^^^^^^
4 │

Since ECMAScript 2019, catch bindings are optional; you can omit the catch binding if you don't need it.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

Unsafe fix: Remove the catch binding.

3 │ }·catch·(unused)·{}
---------
+
code-block.js:3:9 lint/complexity/noUselessCatchBinding  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

This catch binding is unused.

1 │ try {
2 │ // Do something
> 3 │ } catch (unused) {}
^^^^^^^^
4 │

Since ECMAScript 2019, catch bindings are optional; you can omit the catch binding if you don't need it.

Unsafe fix: Remove the catch binding.

3 │ }·catch·(unused)·{}
---------
```js try { @@ -54,7 +52,7 @@ try { } catch ({ unused }) {} ``` -
code-block.js:3:9 lint/nursery/noUselessCatchBinding  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

This catch binding is unused.

1 │ try {
2 │ // Do something
> 3 │ } catch ({ unused }) {}
^^^^^^^^^^^^
4 │

Since ECMAScript 2019, catch bindings are optional; you can omit the catch binding if you don't need it.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

Unsafe fix: Remove the catch binding.

3 │ }·catch·({·unused·})·{}
-------------
+
code-block.js:3:9 lint/complexity/noUselessCatchBinding  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

This catch binding is unused.

1 │ try {
2 │ // Do something
> 3 │ } catch ({ unused }) {}
^^^^^^^^^^^^
4 │

Since ECMAScript 2019, catch bindings are optional; you can omit the catch binding if you don't need it.

Unsafe fix: Remove the catch binding.

3 │ }·catch·({·unused·})·{}
-------------
```js try { @@ -62,7 +60,7 @@ try { } catch ({ unused1, unused2 }) {} ``` -
code-block.js:3:9 lint/nursery/noUselessCatchBinding  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

This catch binding is unused.

1 │ try {
2 │ // Do something
> 3 │ } catch ({ unused1, unused2 }) {}
^^^^^^^^^^^^^^^^^^^^^^
4 │

Since ECMAScript 2019, catch bindings are optional; you can omit the catch binding if you don't need it.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

Unsafe fix: Remove the catch binding.

3 │ }·catch·({·unused1,·unused2·})·{}
-----------------------
+
code-block.js:3:9 lint/complexity/noUselessCatchBinding  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

This catch binding is unused.

1 │ try {
2 │ // Do something
> 3 │ } catch ({ unused1, unused2 }) {}
^^^^^^^^^^^^^^^^^^^^^^
4 │

Since ECMAScript 2019, catch bindings are optional; you can omit the catch binding if you don't need it.

Unsafe fix: Remove the catch binding.

3 │ }·catch·({·unused1,·unused2·})·{}
-----------------------
### Valid @@ -101,8 +99,8 @@ try { - [Disable a rule](/linter/#disable-a-rule) - [Configure the code fix](/linter#configure-the-code-fix) - [Rule options](/linter/#rule-options) -- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/nursery/no_useless_catch_binding.rs) -- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/nursery/noUselessCatchBinding) +- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/complexity/no_useless_catch_binding.rs) +- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/complexity/noUselessCatchBinding)
diff --git a/src/content/docs/linter/rules/no-useless-undefined.mdx b/src/content/docs/linter/rules/no-useless-undefined.mdx index 4833da698..108882f16 100644 --- a/src/content/docs/linter/rules/no-useless-undefined.mdx +++ b/src/content/docs/linter/rules/no-useless-undefined.mdx @@ -9,12 +9,10 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; -:::caution -This rule is part of the [nursery](/linter/#nursery) group. This means that it is experimental and the behavior can change at any time. -::: ## Summary - Rule available since: `v2.0.0` -- Diagnostic Category: [`lint/nursery/noUselessUndefined`](/reference/diagnostics#diagnostic-category) +- Diagnostic Category: [`lint/complexity/noUselessUndefined`](/reference/diagnostics#diagnostic-category) +- This rule isn't recommended, so you need to enable it. - This rule has a [**safe**](/linter/#safe-fixes) fix. - The default severity of this rule is [**information**](/reference/diagnostics#information). - Sources: @@ -25,7 +23,7 @@ This rule is part of the [nursery](/linter/#nursery) group. This means that it i { "linter": { "rules": { - "nursery": { + "complexity": { "noUselessUndefined": "error" } } @@ -46,13 +44,13 @@ Disallow the use of useless `undefined`. let foo = undefined; ``` -
code-block.js:1:11 lint/nursery/noUselessUndefined  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Don't use unnecessary undefined.

> 1 │ let foo = undefined;
^^^^^^^^^
2 │

undefined is the default value for new variables, parameters, return statements, etc… so specifying it doesn't make any difference.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

Safe fix: Remove the undefined.

1 │ let·foo·=·undefined;
-----------
+
code-block.js:1:11 lint/complexity/noUselessUndefined  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Don't use unnecessary undefined.

> 1 │ let foo = undefined;
^^^^^^^^^
2 │

undefined is the default value for new variables, parameters, return statements, etc… so specifying it doesn't make any difference.

Safe fix: Remove the undefined.

1 │ let·foo·=·undefined;
-----------
```js const {foo = undefined} = bar; ``` -
code-block.js:1:14 lint/nursery/noUselessUndefined  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Don't use unnecessary undefined.

> 1 │ const {foo = undefined} = bar;
^^^^^^^^^
2 │

undefined is the default value for new variables, parameters, return statements, etc… so specifying it doesn't make any difference.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

Safe fix: Remove the undefined.

1 │ const·{foo·=·undefined}·=·bar;
-----------
+
code-block.js:1:14 lint/complexity/noUselessUndefined  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Don't use unnecessary undefined.

> 1 │ const {foo = undefined} = bar;
^^^^^^^^^
2 │

undefined is the default value for new variables, parameters, return statements, etc… so specifying it doesn't make any difference.

Safe fix: Remove the undefined.

1 │ const·{foo·=·undefined}·=·bar;
-----------
```js function foo() { @@ -60,7 +58,7 @@ function foo() { } ``` -
code-block.js:2:11 lint/nursery/noUselessUndefined  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Don't use unnecessary undefined.

1 │ function foo() {
> 2 │ return undefined;
^^^^^^^^^
3 │ }
4 │

undefined is the default value for new variables, parameters, return statements, etc… so specifying it doesn't make any difference.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

Safe fix: Remove the undefined.

2 │ ···return·undefined;
---------
+
code-block.js:2:11 lint/complexity/noUselessUndefined  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Don't use unnecessary undefined.

1 │ function foo() {
> 2 │ return undefined;
^^^^^^^^^
3 │ }
4 │

undefined is the default value for new variables, parameters, return statements, etc… so specifying it doesn't make any difference.

Safe fix: Remove the undefined.

2 │ ···return·undefined;
---------
```js function* foo() { @@ -68,19 +66,19 @@ function* foo() { } ``` -
code-block.js:2:9 lint/nursery/noUselessUndefined  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Don't use unnecessary undefined.

1 │ function* foo() {
> 2 │ yield undefined;
^^^^^^^^^
3 │ }
4 │

undefined is the default value for new variables, parameters, return statements, etc… so specifying it doesn't make any difference.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

Safe fix: Remove the undefined.

2 │ ··yield·undefined;
---------
+
code-block.js:2:9 lint/complexity/noUselessUndefined  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Don't use unnecessary undefined.

1 │ function* foo() {
> 2 │ yield undefined;
^^^^^^^^^
3 │ }
4 │

undefined is the default value for new variables, parameters, return statements, etc… so specifying it doesn't make any difference.

Safe fix: Remove the undefined.

2 │ ··yield·undefined;
---------
```js function foo(bar = undefined) {} ``` -
code-block.js:1:20 lint/nursery/noUselessUndefined  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Don't use unnecessary undefined.

> 1 │ function foo(bar = undefined) {}
^^^^^^^^^
2 │

undefined is the default value for new variables, parameters, return statements, etc… so specifying it doesn't make any difference.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

Safe fix: Remove the undefined.

1 │ function·foo(bar·=·undefined)·{}
-----------
+
code-block.js:1:20 lint/complexity/noUselessUndefined  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Don't use unnecessary undefined.

> 1 │ function foo(bar = undefined) {}
^^^^^^^^^
2 │

undefined is the default value for new variables, parameters, return statements, etc… so specifying it doesn't make any difference.

Safe fix: Remove the undefined.

1 │ function·foo(bar·=·undefined)·{}
-----------
```js function foo({bar = undefined}) {} ``` -
code-block.js:1:21 lint/nursery/noUselessUndefined  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Don't use unnecessary undefined.

> 1 │ function foo({bar = undefined}) {}
^^^^^^^^^
2 │

undefined is the default value for new variables, parameters, return statements, etc… so specifying it doesn't make any difference.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

Safe fix: Remove the undefined.

1 │ function·foo({bar·=·undefined})·{}
-----------
+
code-block.js:1:21 lint/complexity/noUselessUndefined  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Don't use unnecessary undefined.

> 1 │ function foo({bar = undefined}) {}
^^^^^^^^^
2 │

undefined is the default value for new variables, parameters, return statements, etc… so specifying it doesn't make any difference.

Safe fix: Remove the undefined.

1 │ function·foo({bar·=·undefined})·{}
-----------
### Valid @@ -103,8 +101,8 @@ foo(); - [Disable a rule](/linter/#disable-a-rule) - [Configure the code fix](/linter#configure-the-code-fix) - [Rule options](/linter/#rule-options) -- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/nursery/no_useless_undefined.rs) -- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/nursery/noUselessUndefined) +- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/complexity/no_useless_undefined.rs) +- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/complexity/noUselessUndefined)
diff --git a/src/content/docs/linter/rules/no-vue-data-object-declaration.mdx b/src/content/docs/linter/rules/no-vue-data-object-declaration.mdx index 4f13fe792..146ff70ff 100644 --- a/src/content/docs/linter/rules/no-vue-data-object-declaration.mdx +++ b/src/content/docs/linter/rules/no-vue-data-object-declaration.mdx @@ -9,14 +9,12 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; -:::caution -This rule is part of the [nursery](/linter/#nursery) group. This means that it is experimental and the behavior can change at any time. -::: ## Summary - Rule available since: `v2.1.4` -- Diagnostic Category: [`lint/nursery/noVueDataObjectDeclaration`](/reference/diagnostics#diagnostic-category) +- Diagnostic Category: [`lint/correctness/noVueDataObjectDeclaration`](/reference/diagnostics#diagnostic-category) +- This rule is **recommended**, meaning it is enabled by default. - This rule has a [**safe**](/linter/#safe-fixes) fix. -- The default severity of this rule is [**information**](/reference/diagnostics#information). +- The default severity of this rule is [**error**](/reference/diagnostics#error). - This rule belongs to the following domains: - [`vue`](/linter/domains#vue) - Sources: @@ -28,7 +26,7 @@ This rule is part of the [nursery](/linter/#nursery) group. This means that it i { "linter": { "rules": { - "nursery": { + "correctness": { "noVueDataObjectDeclaration": "error" } } @@ -118,8 +116,8 @@ createApp({ - [Disable a rule](/linter/#disable-a-rule) - [Configure the code fix](/linter#configure-the-code-fix) - [Rule options](/linter/#rule-options) -- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/nursery/no_vue_data_object_declaration.rs) -- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/nursery/noVueDataObjectDeclaration) +- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/correctness/no_vue_data_object_declaration.rs) +- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/correctness/noVueDataObjectDeclaration) diff --git a/src/content/docs/linter/rules/no-vue-duplicate-keys.mdx b/src/content/docs/linter/rules/no-vue-duplicate-keys.mdx index 367fb6e76..3b38290d3 100644 --- a/src/content/docs/linter/rules/no-vue-duplicate-keys.mdx +++ b/src/content/docs/linter/rules/no-vue-duplicate-keys.mdx @@ -9,12 +9,10 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; -:::caution -This rule is part of the [nursery](/linter/#nursery) group. This means that it is experimental and the behavior can change at any time. -::: ## Summary - Rule available since: `v2.2.5` -- Diagnostic Category: [`lint/nursery/noVueDuplicateKeys`](/reference/diagnostics#diagnostic-category) +- Diagnostic Category: [`lint/correctness/noVueDuplicateKeys`](/reference/diagnostics#diagnostic-category) +- This rule is **recommended**, meaning it is enabled by default. - This rule doesn't have a fix. - The default severity of this rule is [**error**](/reference/diagnostics#error). - This rule belongs to the following domains: @@ -27,7 +25,7 @@ This rule is part of the [nursery](/linter/#nursery) group. This means that it i { "linter": { "rules": { - "nursery": { + "correctness": { "noVueDuplicateKeys": "error" } } @@ -60,7 +58,7 @@ export default { ``` -
code-block.vue:2:13 lint/nursery/noVueDuplicateKeys ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Duplicate key foo found in Vue component.

1 │ export default {
> 2 │ props: ['foo'],
^^^^^
3 │ data() {
4 │ return {

Key foo is also defined here.

3 │ data() {
4 │ return {
> 5 │ foo: 'bar'
^^^
6 │ };
7 │ }

Keys defined in different Vue component options (props, data, methods, computed) can conflict when accessed in the template. Rename the key to avoid conflicts.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.vue:2:13 lint/correctness/noVueDuplicateKeys ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Duplicate key foo found in Vue component.

1 │ export default {
> 2 │ props: ['foo'],
^^^^^
3 │ data() {
4 │ return {

Key foo is also defined here.

3 │ data() {
4 │ return {
> 5 │ foo: 'bar'
^^^
6 │ };
7 │ }

Keys defined in different Vue component options (props, data, methods, computed) can conflict when accessed in the template. Rename the key to avoid conflicts.

```vue ``` -
code-block.vue:4:13 lint/nursery/noVueDuplicateKeys ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Duplicate key message found in Vue component.

2 │ data() {
3 │ return {
> 4 │ message: 'hello'
^^^^^^^
5 │ };
6 │ },

Key message is also defined here.

6 │ },
7 │ methods: {
> 8 │ message() {
^^^^^^^
9 │ console.log('duplicate key');
10 │ }

Keys defined in different Vue component options (props, data, methods, computed) can conflict when accessed in the template. Rename the key to avoid conflicts.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.vue:4:13 lint/correctness/noVueDuplicateKeys ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Duplicate key message found in Vue component.

2 │ data() {
3 │ return {
> 4 │ message: 'hello'
^^^^^^^
5 │ };
6 │ },

Key message is also defined here.

6 │ },
7 │ methods: {
> 8 │ message() {
^^^^^^^
9 │ console.log('duplicate key');
10 │ }

Keys defined in different Vue component options (props, data, methods, computed) can conflict when accessed in the template. Rename the key to avoid conflicts.

```vue ``` -
code-block.vue:3:9 lint/nursery/noVueDuplicateKeys ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Duplicate key count found in Vue component.

1 │ export default {
2 │ computed: {
> 3 │ count() {
^^^^^
4 │ return this.value * 2;
5 │ }

Key count is also defined here.

6 │ },
7 │ methods: {
> 8 │ count() {
^^^^^
9 │ this.value++;
10 │ }

Keys defined in different Vue component options (props, data, methods, computed) can conflict when accessed in the template. Rename the key to avoid conflicts.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.vue:3:9 lint/correctness/noVueDuplicateKeys ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Duplicate key count found in Vue component.

1 │ export default {
2 │ computed: {
> 3 │ count() {
^^^^^
4 │ return this.value * 2;
5 │ }

Key count is also defined here.

6 │ },
7 │ methods: {
> 8 │ count() {
^^^^^
9 │ this.value++;
10 │ }

Keys defined in different Vue component options (props, data, methods, computed) can conflict when accessed in the template. Rename the key to avoid conflicts.

### Valid @@ -142,8 +140,8 @@ export default { - [Disable a rule](/linter/#disable-a-rule) - [Configure the code fix](/linter#configure-the-code-fix) - [Rule options](/linter/#rule-options) -- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/nursery/no_vue_duplicate_keys.rs) -- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/nursery/noVueDuplicateKeys) +- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/correctness/no_vue_duplicate_keys.rs) +- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/correctness/noVueDuplicateKeys)
diff --git a/src/content/docs/linter/rules/no-vue-reserved-keys.mdx b/src/content/docs/linter/rules/no-vue-reserved-keys.mdx index c16aba692..40a528c13 100644 --- a/src/content/docs/linter/rules/no-vue-reserved-keys.mdx +++ b/src/content/docs/linter/rules/no-vue-reserved-keys.mdx @@ -9,12 +9,10 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; -:::caution -This rule is part of the [nursery](/linter/#nursery) group. This means that it is experimental and the behavior can change at any time. -::: ## Summary - Rule available since: `v2.1.3` -- Diagnostic Category: [`lint/nursery/noVueReservedKeys`](/reference/diagnostics#diagnostic-category) +- Diagnostic Category: [`lint/correctness/noVueReservedKeys`](/reference/diagnostics#diagnostic-category) +- This rule is **recommended**, meaning it is enabled by default. - This rule doesn't have a fix. - The default severity of this rule is [**error**](/reference/diagnostics#error). - This rule belongs to the following domains: @@ -27,7 +25,7 @@ This rule is part of the [nursery](/linter/#nursery) group. This means that it i { "linter": { "rules": { - "nursery": { + "correctness": { "noVueReservedKeys": "error" } } @@ -61,7 +59,7 @@ export default { ``` -
code-block.vue:3:9 lint/nursery/noVueReservedKeys ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Key $el is reserved in Vue.

1 │ export default {
2 │ data: {
> 3 │ $el: '',
^^^
4 │ },
5 │ };

Rename the key to avoid conflicts with Vue reserved keys.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.vue:3:9 lint/correctness/noVueReservedKeys ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Key $el is reserved in Vue.

1 │ export default {
2 │ data: {
> 3 │ $el: '',
^^^
4 │ },
5 │ };

Rename the key to avoid conflicts with Vue reserved keys.

```vue ``` -
code-block.vue:4:13 lint/nursery/noVueReservedKeys ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Keys starting with an underscore are reserved in Vue.

2 │ data() {
3 │ return {
> 4 │ _foo: 'bar',
^^^^
5 │ };
6 │ },

Rename the key to avoid conflicts with Vue reserved keys.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.vue:4:13 lint/correctness/noVueReservedKeys ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Keys starting with an underscore are reserved in Vue.

2 │ data() {
3 │ return {
> 4 │ _foo: 'bar',
^^^^
5 │ };
6 │ },

Rename the key to avoid conflicts with Vue reserved keys.

```vue ``` -
code-block.vue:3:9 lint/nursery/noVueReservedKeys ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Key $data is reserved in Vue.

1 │ export default {
2 │ computed: {
> 3 │ $data() {
^^^^^
4 │ return this.someData;
5 │ },

Rename the key to avoid conflicts with Vue reserved keys.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.vue:3:9 lint/correctness/noVueReservedKeys ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Key $data is reserved in Vue.

1 │ export default {
2 │ computed: {
> 3 │ $data() {
^^^^^
4 │ return this.someData;
5 │ },

Rename the key to avoid conflicts with Vue reserved keys.

```vue ``` -
code-block.vue:3:9 lint/nursery/noVueReservedKeys ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Key $emit is reserved in Vue.

1 │ export default {
2 │ methods: {
> 3 │ $emit() {
^^^^^
4 │ // This conflicts with Vue's built-in $emit
5 │ },

Rename the key to avoid conflicts with Vue reserved keys.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.vue:3:9 lint/correctness/noVueReservedKeys ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Key $emit is reserved in Vue.

1 │ export default {
2 │ methods: {
> 3 │ $emit() {
^^^^^
4 │ // This conflicts with Vue's built-in $emit
5 │ },

Rename the key to avoid conflicts with Vue reserved keys.

### Valid @@ -137,8 +135,8 @@ export default { - [Disable a rule](/linter/#disable-a-rule) - [Configure the code fix](/linter#configure-the-code-fix) - [Rule options](/linter/#rule-options) -- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/nursery/no_vue_reserved_keys.rs) -- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/nursery/noVueReservedKeys) +- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/correctness/no_vue_reserved_keys.rs) +- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/correctness/noVueReservedKeys)
diff --git a/src/content/docs/linter/rules/no-vue-reserved-props.mdx b/src/content/docs/linter/rules/no-vue-reserved-props.mdx index 7656678a4..d58c75598 100644 --- a/src/content/docs/linter/rules/no-vue-reserved-props.mdx +++ b/src/content/docs/linter/rules/no-vue-reserved-props.mdx @@ -9,12 +9,10 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; -:::caution -This rule is part of the [nursery](/linter/#nursery) group. This means that it is experimental and the behavior can change at any time. -::: ## Summary - Rule available since: `v2.1.2` -- Diagnostic Category: [`lint/nursery/noVueReservedProps`](/reference/diagnostics#diagnostic-category) +- Diagnostic Category: [`lint/correctness/noVueReservedProps`](/reference/diagnostics#diagnostic-category) +- This rule is **recommended**, meaning it is enabled by default. - This rule doesn't have a fix. - The default severity of this rule is [**error**](/reference/diagnostics#error). - This rule belongs to the following domains: @@ -27,7 +25,7 @@ This rule is part of the [nursery](/linter/#nursery) group. This means that it i { "linter": { "rules": { - "nursery": { + "correctness": { "noVueReservedProps": "error" } } @@ -58,7 +56,7 @@ defineProps({ ``` -
code-block.vue:2:5 lint/nursery/noVueReservedProps ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

ref is a reserved attribute and cannot be used as props.

1 │ defineProps({
> 2 │ ref: String,
^^^
3 │ });
4 │

Rename the prop to avoid possible conflicts.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.vue:2:5 lint/correctness/noVueReservedProps ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

ref is a reserved attribute and cannot be used as props.

1 │ defineProps({
> 2 │ ref: String,
^^^
3 │ });
4 │

Rename the prop to avoid possible conflicts.

```js import {defineComponent} from 'vue'; @@ -70,7 +68,7 @@ export default defineComponent({ }); ``` -
code-block.js:5:9 lint/nursery/noVueReservedProps ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

key is a reserved attribute and cannot be used as props.

3 │ export default defineComponent({
4 │ props: [
> 5 │ 'key',
^^^^^
6 │ ]
7 │ });

Rename the prop to avoid possible conflicts.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.js:5:9 lint/correctness/noVueReservedProps ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

key is a reserved attribute and cannot be used as props.

3 │ export default defineComponent({
4 │ props: [
> 5 │ 'key',
^^^^^
6 │ ]
7 │ });

Rename the prop to avoid possible conflicts.

```vue ``` -
code-block.vue:2:5 lint/nursery/noVueReservedProps ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

ref is a reserved attribute and cannot be used as props.

1 │ defineProps<{
> 2 │ ref: string,
^^^
3 │ }>();
4 │

Rename the prop to avoid possible conflicts.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.vue:2:5 lint/correctness/noVueReservedProps ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

ref is a reserved attribute and cannot be used as props.

1 │ defineProps<{
> 2 │ ref: string,
^^^
3 │ }>();
4 │

Rename the prop to avoid possible conflicts.

```vue ``` -
code-block.vue:3:9 lint/nursery/noVueReservedProps ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

key is a reserved attribute and cannot be used as props.

1 │ export default {
2 │ props: {
> 3 │ key: String,
^^^
4 │ }
5 │ };

Rename the prop to avoid possible conflicts.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.vue:3:9 lint/correctness/noVueReservedProps ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

key is a reserved attribute and cannot be used as props.

1 │ export default {
2 │ props: {
> 3 │ key: String,
^^^
4 │ }
5 │ };

Rename the prop to avoid possible conflicts.

### Valid @@ -135,8 +133,8 @@ export default { - [Disable a rule](/linter/#disable-a-rule) - [Configure the code fix](/linter#configure-the-code-fix) - [Rule options](/linter/#rule-options) -- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/nursery/no_vue_reserved_props.rs) -- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/nursery/noVueReservedProps) +- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/correctness/no_vue_reserved_props.rs) +- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/correctness/noVueReservedProps)
diff --git a/src/content/docs/linter/rules/no-vue-setup-props-reactivity-loss.mdx b/src/content/docs/linter/rules/no-vue-setup-props-reactivity-loss.mdx index 29a0cdf73..0757d28d4 100644 --- a/src/content/docs/linter/rules/no-vue-setup-props-reactivity-loss.mdx +++ b/src/content/docs/linter/rules/no-vue-setup-props-reactivity-loss.mdx @@ -9,14 +9,12 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; -:::caution -This rule is part of the [nursery](/linter/#nursery) group. This means that it is experimental and the behavior can change at any time. -::: ## Summary - Rule available since: `v2.2.6` -- Diagnostic Category: [`lint/nursery/noVueSetupPropsReactivityLoss`](/reference/diagnostics#diagnostic-category) +- Diagnostic Category: [`lint/correctness/noVueSetupPropsReactivityLoss`](/reference/diagnostics#diagnostic-category) +- This rule isn't recommended, so you need to enable it. - This rule doesn't have a fix. -- The default severity of this rule is [**information**](/reference/diagnostics#information). +- The default severity of this rule is [**error**](/reference/diagnostics#error). - This rule belongs to the following domains: - [`vue`](/linter/domains#vue) - Sources: @@ -27,7 +25,7 @@ This rule is part of the [nursery](/linter/#nursery) group. This means that it i { "linter": { "rules": { - "nursery": { + "correctness": { "noVueSetupPropsReactivityLoss": "error" } } @@ -54,7 +52,7 @@ export default { } ``` -
code-block.js:2:9 lint/nursery/noVueSetupPropsReactivityLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Destructuring `props` in the `setup` function parameters loses reactivity.

1 │ export default {
> 2 │ setup({ count }) {
^^^^^^^^^
3 │ return () => h('div', count);
4 │ }

To preserve reactivity, access props as properties: `props.propertyName`.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.js:2:9 lint/correctness/noVueSetupPropsReactivityLoss ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Destructuring `props` in the `setup` function parameters loses reactivity.

1 │ export default {
> 2 │ setup({ count }) {
^^^^^^^^^
3 │ return () => h('div', count);
4 │ }

To preserve reactivity, access props as properties: `props.propertyName`.

### Valid @@ -71,8 +69,8 @@ export default { - [Disable a rule](/linter/#disable-a-rule) - [Configure the code fix](/linter#configure-the-code-fix) - [Rule options](/linter/#rule-options) -- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/nursery/no_vue_setup_props_reactivity_loss.rs) -- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/nursery/noVueSetupPropsReactivityLoss) +- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/correctness/no_vue_setup_props_reactivity_loss.rs) +- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/correctness/noVueSetupPropsReactivityLoss)
diff --git a/src/content/docs/linter/rules/use-consistent-arrow-return.mdx b/src/content/docs/linter/rules/use-consistent-arrow-return.mdx index 4fa9b8e22..de6bcf003 100644 --- a/src/content/docs/linter/rules/use-consistent-arrow-return.mdx +++ b/src/content/docs/linter/rules/use-consistent-arrow-return.mdx @@ -9,14 +9,12 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; -:::caution -This rule is part of the [nursery](/linter/#nursery) group. This means that it is experimental and the behavior can change at any time. -::: ## Summary - Rule available since: `v2.2.3` -- Diagnostic Category: [`lint/nursery/useConsistentArrowReturn`](/reference/diagnostics#diagnostic-category) +- Diagnostic Category: [`lint/style/useConsistentArrowReturn`](/reference/diagnostics#diagnostic-category) +- This rule isn't recommended, so you need to enable it. - This rule has a [**safe**](/linter/#safe-fixes) fix. -- The default severity of this rule is [**warning**](/reference/diagnostics#warning). +- The default severity of this rule is [**information**](/reference/diagnostics#information). - Sources: - Same as [`arrow-body-style`](https://eslint.org/docs/latest/rules/arrow-body-style) @@ -25,7 +23,7 @@ This rule is part of the [nursery](/linter/#nursery) group. This means that it i { "linter": { "rules": { - "nursery": { + "style": { "useConsistentArrowReturn": "error" } } @@ -60,7 +58,7 @@ The fix wraps expressions in parentheses when required for correctness (e.g. obj }; ``` -
code-block.js:1:14 lint/nursery/useConsistentArrowReturn  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The body of this arrow function contains a single return statement.

> 1 │ const bar = () => {
^^^^^^^
> 2 │ return {
> 3 │ bar: {
> 4 │ foo: 1,
> 5 │ bar: 2,
> 6 │ }
> 7 │ };
> 8 │ };
^
9 │

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

Safe fix: Remove the return statement.

1 - ·const·bar·=·()·=>·{
2 - ·····return·{
1+ ·const·bar·=·()·=>·({
3 2 bar: {
4 3 foo: 1,
5 4 bar: 2,
6 5 }
7 - ·····};
8 - ·};
6+ ·····});
9 7

+
code-block.js:1:14 lint/style/useConsistentArrowReturn  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The body of this arrow function contains a single return statement.

> 1 │ const bar = () => {
^^^^^^^
> 2 │ return {
> 3 │ bar: {
> 4 │ foo: 1,
> 5 │ bar: 2,
> 6 │ }
> 7 │ };
> 8 │ };
^
9 │

Safe fix: Remove the return statement.

1 - ·const·bar·=·()·=>·{
2 - ·····return·{
1+ ·const·bar·=·()·=>·({
3 2 bar: {
4 3 foo: 1,
5 4 bar: 2,
6 5 }
7 - ·····};
8 - ·};
6+ ·····});
9 7

### Valid @@ -76,8 +74,8 @@ const qux = () => ({ a: 1 }) // already concise with parens - [Disable a rule](/linter/#disable-a-rule) - [Configure the code fix](/linter#configure-the-code-fix) - [Rule options](/linter/#rule-options) -- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/nursery/use_consistent_arrow_return.rs) -- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/nursery/useConsistentArrowReturn) +- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/style/use_consistent_arrow_return.rs) +- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/style/useConsistentArrowReturn)
diff --git a/src/content/docs/linter/rules/use-deprecated-date.mdx b/src/content/docs/linter/rules/use-deprecated-date.mdx index 877561614..fec91dc5d 100644 --- a/src/content/docs/linter/rules/use-deprecated-date.mdx +++ b/src/content/docs/linter/rules/use-deprecated-date.mdx @@ -9,14 +9,12 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; -:::caution -This rule is part of the [nursery](/linter/#nursery) group. This means that it is experimental and the behavior can change at any time. -::: ## Summary - Rule available since: `v2.2.6` -- Diagnostic Category: [`lint/nursery/useDeprecatedDate`](/reference/diagnostics#diagnostic-category) +- Diagnostic Category: [`lint/suspicious/useDeprecatedDate`](/reference/diagnostics#diagnostic-category) +- This rule isn't recommended, so you need to enable it. - This rule doesn't have a fix. -- The default severity of this rule is [**information**](/reference/diagnostics#information). +- The default severity of this rule is [**warning**](/reference/diagnostics#warning). - Sources: - Same as [`@graphql-eslint/require-deprecation-date`](https://the-guild.dev/graphql/eslint/rules/require-deprecation-date) @@ -25,7 +23,7 @@ This rule is part of the [nursery](/linter/#nursery) group. This means that it i { "linter": { "rules": { - "nursery": { + "suspicious": { "useDeprecatedDate": "error" } } @@ -50,7 +48,7 @@ query { } ``` -
code-block.graphql:2:10 lint/nursery/useDeprecatedDate ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The directive `@deprecated` should have a `deletionDate` argument.

1 │ query {
> 2 │ member @deprecated(reason: "Use `members` instead") {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3 │ id
4 │ }

Add a `deletionDate` argument to the directive.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.graphql:2:10 lint/suspicious/useDeprecatedDate ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The directive `@deprecated` should have a `deletionDate` argument.

1 │ query {
> 2 │ member @deprecated(reason: "Use `members` instead") {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3 │ id
4 │ }

Add a `deletionDate` argument to the directive.

### Valid @@ -67,8 +65,8 @@ query { - [Disable a rule](/linter/#disable-a-rule) - [Configure the code fix](/linter#configure-the-code-fix) - [Rule options](/linter/#rule-options) -- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_graphql_analyze/src/lint/nursery/use_deprecated_date.rs) -- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_graphql_analyze/tests/specs/nursery/useDeprecatedDate) +- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_graphql_analyze/src/lint/suspicious/use_deprecated_date.rs) +- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_graphql_analyze/tests/specs/suspicious/useDeprecatedDate)
diff --git a/src/content/docs/linter/rules/use-explicit-type.mdx b/src/content/docs/linter/rules/use-explicit-type.mdx index 1cedf9616..2fe2099d2 100644 --- a/src/content/docs/linter/rules/use-explicit-type.mdx +++ b/src/content/docs/linter/rules/use-explicit-type.mdx @@ -61,7 +61,7 @@ function test() { } ``` -
code-block.ts:2:1 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on function.

1 │ // Should indicate that no value is returned (void)
> 2 │ function test() {
^^^^^^^^^^^^^
3 │ return;
4 │ }

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the function.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.ts:2:1 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on function.

1 │ // Should indicate that no value is returned (void)
> 2 │ function test() {
^^^^^^^^^^^^^
3 │ return;
4 │ }

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the function.

This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/2017 for more information or to report possible bugs.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

```ts // Should indicate that a number is returned @@ -70,14 +70,14 @@ var fn = function () { }; ``` -
code-block.ts:2:10 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on function.

1 │ // Should indicate that a number is returned
> 2 │ var fn = function () {
^^^^^^^^^^^^^
> 3 │ return 1;
> 4 │ };
^
5 │

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the function.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.ts:2:10 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on function.

1 │ // Should indicate that a number is returned
> 2 │ var fn = function () {
^^^^^^^^^^^^^
> 3 │ return 1;
> 4 │ };
^
5 │

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the function.

This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/2017 for more information or to report possible bugs.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

```ts // Should indicate that a string is returned var arrowFn = () => 'test'; ``` -
code-block.ts:2:15 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on function.

1 │ // Should indicate that a string is returned
> 2 │ var arrowFn = () => 'test';
^^^^^^^^^^^^
3 │

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the function.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.ts:2:15 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on function.

1 │ // Should indicate that a string is returned
> 2 │ var arrowFn = () => 'test';
^^^^^^^^^^^^
3 │

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the function.

This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/2017 for more information or to report possible bugs.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

```ts class Test { @@ -88,7 +88,7 @@ class Test { } ``` -
code-block.ts:3:3 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on member.

1 │ class Test {
2 │ // Should indicate that no value is returned (void)
> 3 │ method() {
^^^^^^^^^^
> 4 │ return;
> 5 │ }
^
6 │ }
7 │

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the member.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.ts:3:3 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on member.

1 │ class Test {
2 │ // Should indicate that no value is returned (void)
> 3 │ method() {
^^^^^^^^^^
> 4 │ return;
> 5 │ }
^
6 │ }
7 │

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the member.

This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/2017 for more information or to report possible bugs.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

```ts // Should indicate that no value is returned (void) @@ -97,14 +97,14 @@ function test(a: number) { } ``` -
code-block.ts:2:1 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on function.

1 │ // Should indicate that no value is returned (void)
> 2 │ function test(a: number) {
^^^^^^^^^^^^^
3 │ a += 1;
4 │ }

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the function.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.ts:2:1 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on function.

1 │ // Should indicate that no value is returned (void)
> 2 │ function test(a: number) {
^^^^^^^^^^^^^
3 │ a += 1;
4 │ }

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the function.

This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/2017 for more information or to report possible bugs.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

```ts // Should use const assertions var func = (value: number) => ({ type: 'X', value }) as any; ``` -
code-block.ts:2:12 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on function.

1 │ // Should use const assertions
> 2 │ var func = (value: number) => ({ type: 'X', value }) as any;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3 │

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the function.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.ts:2:12 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on function.

1 │ // Should use const assertions
> 2 │ var func = (value: number) => ({ type: 'X', value }) as any;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3 │

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the function.

This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/2017 for more information or to report possible bugs.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

```ts // Unspecified variable type @@ -114,7 +114,7 @@ function fn(): string { const direct = fn(); ``` -
code-block.ts:5:7 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The variable doesn't have a type defined.

3 │ return "Not inline";
4 │ }
> 5 │ const direct = fn();
^^^^^^
6 │

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a type to the variable.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.ts:5:7 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The variable doesn't have a type defined.

3 │ return "Not inline";
4 │ }
> 5 │ const direct = fn();
^^^^^^
6 │

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a type to the variable.

This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/2017 for more information or to report possible bugs.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

```ts // Unspecified object member type @@ -124,14 +124,14 @@ function fn(): string { const nested = { result: fn() }; ``` -
code-block.ts:5:7 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The variable doesn't have a type defined.

3 │ return "Not inline";
4 │ }
> 5 │ const nested = { result: fn() };
^^^^^^
6 │

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a type to the variable.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.ts:5:7 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The variable doesn't have a type defined.

3 │ return "Not inline";
4 │ }
> 5 │ const nested = { result: fn() };
^^^^^^
6 │

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a type to the variable.

This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/2017 for more information or to report possible bugs.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

```ts // let bindings of null and undefined are usually overwritten by other code let foo = null; ``` -
code-block.ts:2:5 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The variable doesn't have a type defined.

1 │ // let bindings of null and undefined are usually overwritten by other code
> 2 │ let foo = null;
^^^
3 │

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a type to the variable.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.ts:2:5 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The variable doesn't have a type defined.

1 │ // let bindings of null and undefined are usually overwritten by other code
> 2 │ let foo = null;
^^^
3 │

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a type to the variable.

This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/2017 for more information or to report possible bugs.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

The following example is considered incorrect for a higher-order function, as the returned function does not specify a return type: @@ -139,7 +139,7 @@ The following example is considered incorrect for a higher-order function, as th var arrowFn = () => () => {}; ``` -
code-block.ts:1:21 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on function.

> 1 │ var arrowFn = () => () => {};
^^^^^^^^
2 │

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the function.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.ts:1:21 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on function.

> 1 │ var arrowFn = () => () => {};
^^^^^^^^
2 │

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the function.

This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/2017 for more information or to report possible bugs.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

```ts var arrowFn = () => { @@ -147,7 +147,7 @@ var arrowFn = () => { } ``` -
code-block.ts:2:10 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on function.

1 │ var arrowFn = () => {
> 2 │ return () => { };
^^^^^^^^^
3 │ }
4 │

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the function.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.ts:2:10 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on function.

1 │ var arrowFn = () => {
> 2 │ return () => { };
^^^^^^^^^
3 │ }
4 │

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the function.

This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/2017 for more information or to report possible bugs.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

The following example is considered incorrect for a higher-order function because the function body contains multiple statements. We only check whether the first statement is a function return. @@ -161,7 +161,7 @@ function f() { } ``` -
code-block.ts:2:1 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on function.

1 │ // A function has multiple statements in the body
> 2 │ function f() {
^^^^^^^^^^
3 │ if (x) {
4 │ return 0;

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the function.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.ts:2:1 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on function.

1 │ // A function has multiple statements in the body
> 2 │ function f() {
^^^^^^^^^^
3 │ if (x) {
4 │ return 0;

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the function.

This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/2017 for more information or to report possible bugs.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

```ts // A function has multiple statements in the body @@ -173,7 +173,7 @@ function f() { } ``` -
code-block.ts:2:1 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on function.

1 │ // A function has multiple statements in the body
> 2 │ function f() {
^^^^^^^^^^
3 │ let str = "test";
4 │ return (): string => {

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the function.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.ts:2:1 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on function.

1 │ // A function has multiple statements in the body
> 2 │ function f() {
^^^^^^^^^^
3 │ let str = "test";
4 │ return (): string => {

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the function.

This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/2017 for more information or to report possible bugs.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

```ts // A function has multiple statements in the body @@ -182,7 +182,7 @@ function f() { } ``` -
code-block.ts:2:1 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on function.

1 │ // A function has multiple statements in the body
> 2 │ function f() {
^^^^^^^^^^
3 │ let str = "test";
4 │ }

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the function.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.ts:2:1 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on function.

1 │ // A function has multiple statements in the body
> 2 │ function f() {
^^^^^^^^^^
3 │ let str = "test";
4 │ }

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the function.

This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/2017 for more information or to report possible bugs.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

The following example is considered incorrect for an interface method without a return type: @@ -192,7 +192,7 @@ interface Array { } ``` -
code-block.ts:2:3 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on member.

1 │ interface Array<Type> {
> 2 │ method();
^^^^^^^^^
3 │ }
4 │

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the member.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.ts:2:3 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on member.

1 │ interface Array<Type> {
> 2 │ method();
^^^^^^^^^
3 │ }
4 │

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the member.

This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/2017 for more information or to report possible bugs.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

The following example is considered incorrect for a type declaration of a function without a return type: @@ -203,7 +203,7 @@ type MyObject = { }; ``` -
code-block.ts:2:3 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on member.

1 │ type MyObject = {
> 2 │ (input: string);
^^^^^^^^^^^^^^^^
3 │ propertyName: string;
4 │ };

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the member.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.ts:2:3 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on member.

1 │ type MyObject = {
> 2 │ (input: string);
^^^^^^^^^^^^^^^^
3 │ propertyName: string;
4 │ };

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the member.

This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/2017 for more information or to report possible bugs.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

The following example is considered incorrect for an abstract class method without a return type: @@ -213,7 +213,7 @@ abstract class MyClass { } ``` -
code-block.ts:2:3 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on member.

1 │ abstract class MyClass {
> 2 │ public abstract method();
^^^^^^^^^^^^^^^^^^^^^^^^^
3 │ }
4 │

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the member.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.ts:2:3 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on member.

1 │ abstract class MyClass {
> 2 │ public abstract method();
^^^^^^^^^^^^^^^^^^^^^^^^^
3 │ }
4 │

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the member.

This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/2017 for more information or to report possible bugs.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

The following example is considered incorrect for an abstract class getter without a return type: @@ -223,7 +223,7 @@ abstract class P { } ``` -
code-block.ts:2:3 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on member.

1 │ abstract class P<T> {
> 2 │ abstract get poke();
^^^^^^^^^^^^^^^^^^^^
3 │ }
4 │

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the member.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.ts:2:3 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on member.

1 │ abstract class P<T> {
> 2 │ abstract get poke();
^^^^^^^^^^^^^^^^^^^^
3 │ }
4 │

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the member.

This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/2017 for more information or to report possible bugs.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

The following example is considered incorrect for a function declaration in a namespace without a return type: @@ -233,7 +233,7 @@ declare namespace myLib { } ``` -
code-block.ts:2:3 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on function declaration.

1 │ declare namespace myLib {
> 2 │ function makeGreeting(s: string);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3 │ }
4 │

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the function declaration.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.ts:2:3 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on function declaration.

1 │ declare namespace myLib {
> 2 │ function makeGreeting(s: string);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3 │ }
4 │

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the function declaration.

This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/2017 for more information or to report possible bugs.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

The following example is considered incorrect for a module function export without a return type: @@ -243,7 +243,7 @@ declare module "foo" { } ``` -
code-block.ts:2:18 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on function declaration.

1 │ declare module "foo" {
> 2 │ export default function bar();
^^^^^^^^^^^^^^^
3 │ }
4 │

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the function declaration.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.ts:2:18 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Missing return type on function declaration.

1 │ declare module "foo" {
> 2 │ export default function bar();
^^^^^^^^^^^^^^^
3 │ }
4 │

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Add a return type to the function declaration.

This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/2017 for more information or to report possible bugs.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

The following example is considered incorrect because `arg` has `any` type. @@ -251,7 +251,7 @@ The following example is considered incorrect because `arg` has `any` type. var arrowFn = (arg: any): string => `test ${arg}`; ``` -
code-block.ts:1:21 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The parameter has an any type.

> 1 │ var arrowFn = (arg: any): string => `test ${arg}`;
^^^
2 │

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Replace any with unknown or a more specific type.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.ts:1:21 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The parameter has an any type.

> 1 │ var arrowFn = (arg: any): string => `test ${arg}`;
^^^
2 │

Declaring the type makes the code self-documented and can speed up TypeScript type checking.

Replace any with unknown or a more specific type.

This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/2017 for more information or to report possible bugs.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

### Valid diff --git a/src/content/docs/linter/rules/use-max-params.mdx b/src/content/docs/linter/rules/use-max-params.mdx index e816d9761..286ca2701 100644 --- a/src/content/docs/linter/rules/use-max-params.mdx +++ b/src/content/docs/linter/rules/use-max-params.mdx @@ -9,12 +9,10 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; -:::caution -This rule is part of the [nursery](/linter/#nursery) group. This means that it is experimental and the behavior can change at any time. -::: ## Summary - Rule available since: `v2.2.0` -- Diagnostic Category: [`lint/nursery/useMaxParams`](/reference/diagnostics#diagnostic-category) +- Diagnostic Category: [`lint/complexity/useMaxParams`](/reference/diagnostics#diagnostic-category) +- This rule isn't recommended, so you need to enable it. - This rule doesn't have a fix. - The default severity of this rule is [**warning**](/reference/diagnostics#warning). - Sources: @@ -27,7 +25,7 @@ This rule is part of the [nursery](/linter/#nursery) group. This means that it i { "linter": { "rules": { - "nursery": { + "complexity": { "useMaxParams": "error" } } @@ -52,7 +50,7 @@ function foo(a, b, c, d, e, f, g, h) { } ``` -
code-block.js:1:13 lint/nursery/useMaxParams ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Function has 8 parameters, but only 4 are allowed.

> 1 │ function foo(a, b, c, d, e, f, g, h) {
^^^^^^^^^^^^^^^^^^^^^^^^
2 │ // too many parameters
3 │ }

Functions with many parameters are hard to read and maintain.

Consider using an options object, splitting into smaller functions, or grouping related parameters.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.js:1:13 lint/complexity/useMaxParams ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Function has 8 parameters, but only 4 are allowed.

> 1 │ function foo(a, b, c, d, e, f, g, h) {
^^^^^^^^^^^^^^^^^^^^^^^^
2 │ // too many parameters
3 │ }

Functions with many parameters are hard to read and maintain.

Consider using an options object, splitting into smaller functions, or grouping related parameters.

```js const bar = (a, b, c, d, e, f, g, h) => { @@ -60,7 +58,7 @@ const bar = (a, b, c, d, e, f, g, h) => { } ``` -
code-block.js:1:13 lint/nursery/useMaxParams ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Function has 8 parameters, but only 4 are allowed.

> 1 │ const bar = (a, b, c, d, e, f, g, h) => {
^^^^^^^^^^^^^^^^^^^^^^^^
2 │ // too many parameters
3 │ }

Functions with many parameters are hard to read and maintain.

Consider using an options object, splitting into smaller functions, or grouping related parameters.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.js:1:13 lint/complexity/useMaxParams ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Function has 8 parameters, but only 4 are allowed.

> 1 │ const bar = (a, b, c, d, e, f, g, h) => {
^^^^^^^^^^^^^^^^^^^^^^^^
2 │ // too many parameters
3 │ }

Functions with many parameters are hard to read and maintain.

Consider using an options object, splitting into smaller functions, or grouping related parameters.

```js class Baz { @@ -70,7 +68,7 @@ class Baz { } ``` -
code-block.js:2:11 lint/nursery/useMaxParams ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Function has 8 parameters, but only 4 are allowed.

1 │ class Baz {
> 2 │ method(a, b, c, d, e, f, g, h) {
^^^^^^^^^^^^^^^^^^^^^^^^
3 │ // too many parameters
4 │ }

Functions with many parameters are hard to read and maintain.

Consider using an options object, splitting into smaller functions, or grouping related parameters.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.js:2:11 lint/complexity/useMaxParams ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Function has 8 parameters, but only 4 are allowed.

1 │ class Baz {
> 2 │ method(a, b, c, d, e, f, g, h) {
^^^^^^^^^^^^^^^^^^^^^^^^
3 │ // too many parameters
4 │ }

Functions with many parameters are hard to read and maintain.

Consider using an options object, splitting into smaller functions, or grouping related parameters.

### Valid @@ -105,8 +103,8 @@ The maximum number of parameters allowed (default: 4). - [Disable a rule](/linter/#disable-a-rule) - [Configure the code fix](/linter#configure-the-code-fix) - [Rule options](/linter/#rule-options) -- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/nursery/use_max_params.rs) -- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/nursery/useMaxParams) +- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/complexity/use_max_params.rs) +- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/complexity/useMaxParams)
diff --git a/src/content/docs/linter/rules/use-qwik-method-usage.mdx b/src/content/docs/linter/rules/use-qwik-method-usage.mdx index d8a686550..63510c8d9 100644 --- a/src/content/docs/linter/rules/use-qwik-method-usage.mdx +++ b/src/content/docs/linter/rules/use-qwik-method-usage.mdx @@ -9,12 +9,10 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; -:::caution -This rule is part of the [nursery](/linter/#nursery) group. This means that it is experimental and the behavior can change at any time. -::: ## Summary - Rule available since: `v2.2.6` -- Diagnostic Category: [`lint/nursery/useQwikMethodUsage`](/reference/diagnostics#diagnostic-category) +- Diagnostic Category: [`lint/correctness/useQwikMethodUsage`](/reference/diagnostics#diagnostic-category) +- This rule is **recommended**, meaning it is enabled by default. - This rule doesn't have a fix. - The default severity of this rule is [**error**](/reference/diagnostics#error). - This rule belongs to the following domains: @@ -27,7 +25,7 @@ This rule is part of the [nursery](/linter/#nursery) group. This means that it i { "linter": { "rules": { - "nursery": { + "correctness": { "useQwikMethodUsage": "error" } } @@ -53,7 +51,7 @@ export const Counter = () => { }; ``` -
code-block.js:4:17 lint/nursery/useQwikMethodUsage ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Qwik hook detected outside of an allowed scope.

3 │ export const Counter = () => {
> 4 │ const count = useSignal(0);
^^^^^^^^^^^^
5 │ };
6 │

Qwik's reactive hooks (functions starting with use* followed by uppercase letter) must be:
- Used exclusively within `component$` functions
- Or encapsulated within other valid Qwik hooks

Check the Qwik documentation.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.js:4:17 lint/correctness/useQwikMethodUsage ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Qwik hook detected outside of an allowed scope.

3 │ export const Counter = () => {
> 4 │ const count = useSignal(0);
^^^^^^^^^^^^
5 │ };
6 │

Qwik's reactive hooks (functions starting with use* followed by uppercase letter) must be:
- Used exclusively within `component$` functions
- Or encapsulated within other valid Qwik hooks

Check the Qwik documentation.

### Valid @@ -75,8 +73,8 @@ export const useCounter = () => { - [Disable a rule](/linter/#disable-a-rule) - [Configure the code fix](/linter#configure-the-code-fix) - [Rule options](/linter/#rule-options) -- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/nursery/use_qwik_method_usage.rs) -- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/nursery/useQwikMethodUsage) +- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/correctness/use_qwik_method_usage.rs) +- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/correctness/useQwikMethodUsage)
diff --git a/src/content/docs/linter/rules/use-qwik-valid-lexical-scope.mdx b/src/content/docs/linter/rules/use-qwik-valid-lexical-scope.mdx index 7ac62a39b..ca753312a 100644 --- a/src/content/docs/linter/rules/use-qwik-valid-lexical-scope.mdx +++ b/src/content/docs/linter/rules/use-qwik-valid-lexical-scope.mdx @@ -9,12 +9,10 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; -:::caution -This rule is part of the [nursery](/linter/#nursery) group. This means that it is experimental and the behavior can change at any time. -::: ## Summary - Rule available since: `v2.2.6` -- Diagnostic Category: [`lint/nursery/useQwikValidLexicalScope`](/reference/diagnostics#diagnostic-category) +- Diagnostic Category: [`lint/correctness/useQwikValidLexicalScope`](/reference/diagnostics#diagnostic-category) +- This rule is **recommended**, meaning it is enabled by default. - This rule doesn't have a fix. - The default severity of this rule is [**error**](/reference/diagnostics#error). - This rule belongs to the following domains: @@ -27,7 +25,7 @@ This rule is part of the [nursery](/linter/#nursery) group. This means that it i { "linter": { "rules": { - "nursery": { + "correctness": { "useQwikValidLexicalScope": "error" } } @@ -52,7 +50,7 @@ const handleClick = () => { }; ``` -
code-block.js:2:21 lint/nursery/useQwikValidLexicalScope ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Non-serializable expression must be wrapped with $(...)

1 │ // Arrow function assigned without wrapping it in $(...)
> 2 │ const handleClick = () => {
^^^^^^^
> 3 │ console.log("clicked");
> 4 │ };
^
5 │

Qwik requires serializable closures for:
- Resumability (pausing/resuming execution)
- Code splitting (lazy loading components)
- Optimized rehydration (client-side continuation)

Wrap the expression with $(...) to make it serializable. Learn more: Qwik documentation.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

+
code-block.js:2:21 lint/correctness/useQwikValidLexicalScope ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Non-serializable expression must be wrapped with $(...)

1 │ // Arrow function assigned without wrapping it in $(...)
> 2 │ const handleClick = () => {
^^^^^^^
> 3 │ console.log("clicked");
> 4 │ };
^
5 │

Qwik requires serializable closures for:
- Resumability (pausing/resuming execution)
- Code splitting (lazy loading components)
- Optimized rehydration (client-side continuation)

Wrap the expression with $(...) to make it serializable. Learn more: Qwik documentation.

### Valid @@ -68,8 +66,8 @@ const handleClick = $(() => { - [Disable a rule](/linter/#disable-a-rule) - [Configure the code fix](/linter#configure-the-code-fix) - [Rule options](/linter/#rule-options) -- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/nursery/use_qwik_valid_lexical_scope.rs) -- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/nursery/useQwikValidLexicalScope) +- [Source Code](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/src/lint/correctness/use_qwik_valid_lexical_scope.rs) +- [Test Cases](https://github.com/biomejs/biome/blob/main/crates/biome_js_analyze/tests/specs/correctness/useQwikValidLexicalScope)
diff --git a/src/pages/metadata/rules.json.js b/src/pages/metadata/rules.json.js index 5acfa5836..ce76e2492 100644 --- a/src/pages/metadata/rules.json.js +++ b/src/pages/metadata/rules.json.js @@ -265,23 +265,6 @@ export function GET() { ], "docs": " Disallow deprecated media types.\n\n Several media types defined in earlier specifications have been deprecated and should\n no longer be used. The deprecated media types are still recognized, but they match nothing.\n\n For details on media types, see the\n [Media Queries Level 5 specification](https://drafts.csswg.org/mediaqueries-5/#media-types).\n\n ## Examples\n\n ### Invalid\n\n ```css,expect_diagnostic\n @media tv {}\n ```\n\n ```css,expect_diagnostic\n @media handheld and (min-width: 480px) {}\n ```\n\n ### Valid\n\n ```css\n @media screen {}\n ```\n\n ```css\n @media print and (min-resolution: 300dpi) {}\n ```\n\n ## Options\n\n ### `allow`\n\n Media types to allow (case-insensitive).\n\n ```json,options\n {\n \"options\": {\n \"allow\": [\"tv\", \"speech\"]\n }\n }\n ```\n\n #### Valid\n\n ```css,use_options\n @media tv {}\n @media speech {}\n ```\n\n" }, - "noEmptySource": { - "deprecated": false, - "version": "2.2.7", - "name": "noEmptySource", - "link": "https://biomejs.dev/linter/rules/no-empty-source", - "recommended": false, - "fixKind": "none", - "sources": [ - { - "kind": "sameLogic", - "source": { - "stylelint": "no-empty-source" - } - } - ], - "docs": " Disallow empty sources.\n\n A source containing only the following is considered empty:\n - Whitespace (spaces, tabs or newlines)\n - Comments\n\n ## Examples\n\n ### Invalid\n\n ```css,expect_diagnostic\n\n ```\n\n ```css,expect_diagnostic\n /* Only comments */\n ```\n\n ### Valid\n\n ```css\n a { }\n ```\n\n ## Options\n\n ### `allowComments`\n\n Whether the comments should be marked as meaningful.\n When this option has been set to `true`, a file with only comments is considered valid.\n\n Default `false`\n\n ```json,options\n {\n \"options\": {\n \"allowComments\": true\n }\n }\n ```\n\n #### Invalid\n\n ```css,expect_diagnostic,use_options\n\n ```\n\n #### Valid\n\n ```css,use_options\n /* Only comments */\n ```\n\n" - }, "noExcessiveLinesPerFile": { "deprecated": false, "version": "2.3.12", @@ -440,6 +423,23 @@ export function GET() { ], "docs": " Disallow CSS empty blocks.\n\n By default, it will allow empty blocks with comments inside.\n\n ## Examples\n\n ### Invalid\n\n ```css,expect_diagnostic\n p {}\n ```\n\n ```css,expect_diagnostic\n .b {}\n ```\n\n ```css,expect_diagnostic\n @media print { a {} }\n ```\n\n ### Valid\n\n ```css\n p {\n color: red;\n }\n ```\n\n ```css\n p { /* foo */ }\n ```\n\n ```css\n @media print { a { color: pink; } }\n ```\n\n" }, + "noEmptySource": { + "deprecated": false, + "version": "2.2.7", + "name": "noEmptySource", + "link": "https://biomejs.dev/linter/rules/no-empty-source", + "recommended": false, + "fixKind": "none", + "sources": [ + { + "kind": "sameLogic", + "source": { + "stylelint": "no-empty-source" + } + } + ], + "docs": " Disallow empty sources.\n\n A source containing only the following is considered empty:\n - Whitespace (spaces, tabs or newlines)\n - Comments\n\n ## Examples\n\n ### Invalid\n\n ```css,expect_diagnostic\n\n ```\n\n ```css,expect_diagnostic\n /* Only comments */\n ```\n\n ### Valid\n\n ```css\n a { }\n ```\n\n ## Options\n\n ### `allowComments`\n\n Whether the comments should be marked as meaningful.\n When this option has been set to `true`, a file with only comments is considered valid.\n\n Default `false`\n\n ```json,options\n {\n \"options\": {\n \"allowComments\": true\n }\n }\n ```\n\n #### Invalid\n\n ```css,expect_diagnostic,use_options\n\n ```\n\n #### Valid\n\n ```css,use_options\n /* Only comments */\n ```\n\n" + }, "noImportantInKeyframe": { "deprecated": false, "version": "1.8.0", @@ -642,15 +642,6 @@ export function GET() { ], "docs": " Require all variable definitions to be unique.\n\n A GraphQL operation is only valid if all its variables are uniquely named.\n\n ## Examples\n\n ### Invalid\n\n ```graphql,expect_diagnostic\n query ($x: Int, $x: Int) {\n field\n }\n ```\n\n ### Valid\n\n ```graphql\n query ($x: Int, $y: Int) {\n field\n }\n ```\n\n" }, - "noEmptySource": { - "deprecated": false, - "version": "2.2.7", - "name": "noEmptySource", - "link": "https://biomejs.dev/linter/rules/no-empty-source", - "recommended": false, - "fixKind": "none", - "docs": " Disallow empty sources.\n\n A source containing only the following is considered empty:\n - Whitespace (spaces, tabs or newlines)\n - Comments\n\n ## Examples\n\n ### Invalid\n\n ```graphql,expect_diagnostic\n\n ```\n\n ```graphql,ignore\n # Invalid comment\n ```\n\n ### Valid\n\n ```graphql\n query Member {}\n ```\n\n ```graphql\n fragment StrippedMember on Member {}\n ```\n\n ## Options\n\n ### `allowComments`\n\n Whether the comments should be marked as meaningful.\n When this option has been set to `true`, a file with only comments is considered valid.\n\n Default `false`\n\n\n ```json,options\n {\n \"options\": {\n \"allowComments\": true\n }\n }\n ```\n\n #### Invalid\n\n ```graphql,expect_diagnostic,use_options\n\n ```\n\n #### Valid\n\n ```graphql,ignore\n # Valid comment\n ```\n\n" - }, "noExcessiveLinesPerFile": { "deprecated": false, "version": "2.3.12", @@ -694,23 +685,6 @@ export function GET() { ], "docs": " Require all descriptions to follow the same style (either block or inline) to maintain consistency and improve readability across the schema.\n\n ## Examples\n\n ### style: `block`\n\n #### Invalid\n\n ```graphql,expect_diagnostic\n enum EnumValue {\n \"this is a description\"\n DEFAULT\n }\n ```\n\n #### Valid\n\n ```graphql\n enum EnumValue {\n \"\"\"\n this is a description\n \"\"\"\n DEFAULT\n }\n ```\n\n ## Options\n\n ### `style`\n\n This option will specify the description style.\n - `\"block\"`: Requires triple-quoted block descriptions (`\"\"\"...\"\"\"`)\n - `\"inline\"`: Requires single-quoted inline descriptions (`\"...\"`)\n\n Default `\"block\"`\n\n ```json,options\n {\n \"options\": {\n \"style\": \"inline\"\n }\n }\n ```\n\n ```graphql,expect_diagnostic,use_options\n enum EnumValue {\n \"\"\"\n this is a description\n \"\"\"\n DEFAULT\n }\n ```\n\n" }, - "useDeprecatedDate": { - "deprecated": false, - "version": "2.2.6", - "name": "useDeprecatedDate", - "link": "https://biomejs.dev/linter/rules/use-deprecated-date", - "recommended": false, - "fixKind": "none", - "sources": [ - { - "kind": "sameLogic", - "source": { - "eslintGraphql": "require-deprecation-date" - } - } - ], - "docs": " Require the `@deprecated` directive to specify a deletion date.\n\n Suggests removing deprecated code when the due date has been passed.\n\n ## Examples\n\n ### Invalid\n\n ```graphql,expect_diagnostic\n query {\n member @deprecated(reason: \"Use `members` instead\") {\n id\n }\n }\n ```\n\n ### Valid\n\n ```graphql\n query {\n member @deprecated(reason: \"Use `members` instead\", deletionDate: \"2099-12-25\") {\n id\n }\n }\n ```\n\n" - }, "useInputName": { "deprecated": false, "version": "2.3.14", @@ -816,6 +790,32 @@ export function GET() { } ], "docs": " No duplicated fields in GraphQL operations.\n\n Checks for duplicate fields in selection set, variables in operation definition, or in arguments set of a field.\n\n ## Examples\n\n ### Invalid\n\n ```graphql,expect_diagnostic\n query {\n users {\n id\n name\n email\n name\n }\n }\n ```\n\n ```graphql,expect_diagnostic\n query {\n users(\n first: 100,\n after: 10,\n filter: \"test\",\n first: 50\n ) {\n id\n }\n }\n ```\n\n ```graphql,expect_diagnostic\n query ($v: String, $t: String, $v: String) {\n id\n }\n ```\n\n ### Valid\n\n ```graphql\n query {\n users {\n id\n name\n email\n }\n }\n ```\n\n" + }, + "noEmptySource": { + "deprecated": false, + "version": "2.2.7", + "name": "noEmptySource", + "link": "https://biomejs.dev/linter/rules/no-empty-source", + "recommended": false, + "fixKind": "none", + "docs": " Disallow empty sources.\n\n A source containing only the following is considered empty:\n - Whitespace (spaces, tabs or newlines)\n - Comments\n\n ## Examples\n\n ### Invalid\n\n ```graphql,expect_diagnostic\n\n ```\n\n ```graphql,ignore\n # Invalid comment\n ```\n\n ### Valid\n\n ```graphql\n query Member {}\n ```\n\n ```graphql\n fragment StrippedMember on Member {}\n ```\n\n ## Options\n\n ### `allowComments`\n\n Whether the comments should be marked as meaningful.\n When this option has been set to `true`, a file with only comments is considered valid.\n\n Default `false`\n\n\n ```json,options\n {\n \"options\": {\n \"allowComments\": true\n }\n }\n ```\n\n #### Invalid\n\n ```graphql,expect_diagnostic,use_options\n\n ```\n\n #### Valid\n\n ```graphql,ignore\n # Valid comment\n ```\n\n" + }, + "useDeprecatedDate": { + "deprecated": false, + "version": "2.2.6", + "name": "useDeprecatedDate", + "link": "https://biomejs.dev/linter/rules/use-deprecated-date", + "recommended": false, + "fixKind": "none", + "sources": [ + { + "kind": "sameLogic", + "source": { + "eslintGraphql": "require-deprecation-date" + } + } + ], + "docs": " Require the `@deprecated` directive to specify a deletion date.\n\n Suggests removing deprecated code when the due date has been passed.\n\n ## Examples\n\n ### Invalid\n\n ```graphql,expect_diagnostic\n query {\n member @deprecated(reason: \"Use `members` instead\") {\n id\n }\n }\n ```\n\n ### Valid\n\n ```graphql\n query {\n member @deprecated(reason: \"Use `members` instead\", deletionDate: \"2099-12-25\") {\n id\n }\n }\n ```\n\n" } } }, @@ -921,7 +921,7 @@ export function GET() { } } ], - "docs": " Enforce `img` alt prop does not contain the word \"image\", \"picture\", or \"photo\".\n\n The rule will first check if `aria-hidden` is truthy to determine whether to enforce the rule. If the image is\n hidden, then the rule will always succeed.\n\n ## Examples\n\n ### Invalid\n\n ```html,expect_diagnostic\n \"photo;\n ```\n\n ```html,expect_diagnostic\n \"picture;\n ```\n\n ### Valid\n\n ```html\n <>\n \t\"alt\"\n \t\"Picture\n \n ```\n\n" + "docs": " Enforce `img` alt prop does not contain the word \"image\", \"picture\", or \"photo\".\n\n The rule will first check if `aria-hidden` is truthy to determine whether to enforce the rule. If the image is\n hidden, then the rule will always succeed.\n\n ## Examples\n\n ### Invalid\n\n ```html,expect_diagnostic\n \"photo;\n ```\n\n ```html,expect_diagnostic\n \"picture;\n ```\n\n ### Valid\n\n ```html\n
\n \t\"alt\"\n \t\"Picture\n
\n ```\n\n" }, "noSvgWithoutTitle": { "deprecated": false, @@ -930,7 +930,7 @@ export function GET() { "link": "https://biomejs.dev/linter/rules/no-svg-without-title", "recommended": true, "fixKind": "none", - "docs": " Enforces the usage of the `title` element for the `svg` element.\n\n It is not possible to specify the `alt` attribute for the `svg` as for the `img`.\n To make svg accessible, the following methods are available:\n - provide the `title` element as the first child to `svg`\n - provide `role=\"img\"` and `aria-label` or `aria-labelledby` to `svg`\n\n ## Examples\n\n ### Invalid\n\n ```html,expect_diagnostic\n foo\n ```\n\n ```html,expect_diagnostic\n \n \n \n \n ```\n\n ```html,expect_diagnostic\n \n foo\n \n ```\n\n ```html,expect_diagnostic\n \n foo\n \n ```\n\n ```html,expect_diagnostic\n \n \n \n \n foo\n \n \n \n \n ```\n\n ```html,expect_diagnostic\n \n ```\n\n ### Valid\n\n ```html\n \n Pass\n \n \n ```\n\n ```html\n \n Pass\n \n ```\n\n ```html\n \n Pass\n \n ```\n\n ```html\n \n Pass\n \n ```\n\n ```html\n \n Pass\n \n \n ```\n\n ```html\n \n ```\n\n ```html\n \n ```\n\n ```html\n foo\n ```\n\n\n ## Accessibility guidelines\n [Document Structure – SVG 1.1 (Second Edition)](https://www.w3.org/TR/SVG11/struct.html#DescriptionAndTitleElements)\n [ARIA: img role - Accessibility | MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/img_role)\n [Accessible SVGs | CSS-Tricks - CSS-Tricks](https://css-tricks.com/accessible-svgs/)\n [Contextually Marking up accessible images and SVGs | scottohara.me](https://www.scottohara.me/blog/2019/05/22/contextual-images-svgs-and-a11y.html)\n [Accessible SVGs](https://www.unimelb.edu.au/accessibility/techniques/accessible-svgs)\n\n" + "docs": " Enforces the usage of the `title` element for the `svg` element.\n\n It is not possible to specify the `alt` attribute for the `svg` as for the `img`.\n To make svg accessible, the following methods are available:\n - provide the `title` element as the first child to `svg`\n - provide `role=\"img\"` and `aria-label` or `aria-labelledby` to `svg`\n\n ## Examples\n\n ### Invalid\n\n ```html,expect_diagnostic\n foo\n ```\n\n ```html,expect_diagnostic\n \n \n \n \n ```\n\n ```html,expect_diagnostic\n \n foo\n \n ```\n\n ```html,expect_diagnostic\n \n foo\n \n ```\n\n ```html,expect_diagnostic\n \n \n \n \n foo\n \n \n \n \n ```\n\n ```html,expect_diagnostic\n \n ```\n\n ### Valid\n\n ```html\n \n Pass\n \n \n ```\n\n ```html\n \n Pass\n \n ```\n\n ```html\n \n Pass\n \n ```\n\n ```html\n \n Pass\n \n ```\n\n ```html\n \n Pass\n \n \n ```\n\n ```html\n \n ```\n\n ```html\n foo\n ```\n\n\n ## Accessibility guidelines\n [Document Structure – SVG 1.1 (Second Edition)](https://www.w3.org/TR/SVG11/struct.html#DescriptionAndTitleElements)\n [ARIA: img role - Accessibility | MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/img_role)\n [Accessible SVGs | CSS-Tricks - CSS-Tricks](https://css-tricks.com/accessible-svgs/)\n [Contextually Marking up accessible images and SVGs | scottohara.me](https://www.scottohara.me/blog/2019/05/22/contextual-images-svgs-and-a11y.html)\n [Accessible SVGs](https://www.unimelb.edu.au/accessibility/techniques/accessible-svgs)\n\n" }, "useAltText": { "deprecated": false, @@ -1768,6 +1768,15 @@ export function GET() { ], "docs": " Disallow unnecessary `catch` clauses.\n\n A `catch` clause that only rethrows the original error is redundant,\n and has no effect on the runtime behavior of the program.\n These redundant clauses can be a source of confusion and code bloat,\n so it’s better to disallow these unnecessary `catch` clauses.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n try {\n doSomething();\n } catch(e) {\n throw e;\n }\n ```\n ```js,expect_diagnostic\n try {\n doSomething();\n } catch(e) {\n throw e;\n } finally {\n doCleanUp();\n }\n ```\n ### Valid\n\n ```js\n try {\n doSomething();\n } catch(e) {\n doSomethingWhenCatch();\n throw e;\n }\n ```\n\n ```js\n try {\n doSomething();\n } catch(e) {\n handleError(e);\n }\n ```\n\n ```js\n try {\n doSomething();\n } finally {\n doCleanUp();\n }\n ```\n\n" }, + "noUselessCatchBinding": { + "deprecated": false, + "version": "2.2.3", + "name": "noUselessCatchBinding", + "link": "https://biomejs.dev/linter/rules/no-useless-catch-binding", + "recommended": false, + "fixKind": "unsafe", + "docs": " Disallow unused catch bindings.\n\n This rule disallows unnecessary catch bindings in accordance with ECMAScript 2019.\n See also: the ECMAScript 2019 “optional catch binding” feature in the language specification.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n try {\n // Do something\n } catch (unused) {}\n ```\n\n ```js,expect_diagnostic\n try {\n // Do something\n } catch ({ unused }) {}\n ```\n\n ```js,expect_diagnostic\n try {\n // Do something\n } catch ({ unused1, unused2 }) {}\n ```\n\n ### Valid\n\n ```js\n try {\n // Do something\n } catch (used) {\n console.error(used);\n }\n ```\n\n ```js\n try {\n // Do something\n } catch ({ used }) {\n console.error(used);\n }\n ```\n\n ```js\n try {\n // Do something\n } catch ({ used, unused }) {\n console.error(used);\n }\n ```\n\n ```js\n try {\n // Do something\n } catch {}\n ```\n\n" + }, "noUselessConstructor": { "deprecated": false, "version": "1.0.0", @@ -1945,6 +1954,23 @@ export function GET() { ], "docs": " Disallow useless `this` aliasing.\n\n Arrow functions inherits `this` from their enclosing scope;\n this makes `this` aliasing useless in this situation.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n class A {\n method() {\n const self = this;\n return () => {\n return self;\n }\n }\n }\n ```\n\n ### Valid\n\n ```js\n class A {\n method() {\n const self = this;\n return function() {\n this.g();\n return self;\n }\n }\n }\n ```\n\n" }, + "noUselessUndefined": { + "deprecated": false, + "version": "2.0.0", + "name": "noUselessUndefined", + "link": "https://biomejs.dev/linter/rules/no-useless-undefined", + "recommended": false, + "fixKind": "safe", + "sources": [ + { + "kind": "sameLogic", + "source": { + "eslintUnicorn": "no-useless-undefined" + } + } + ], + "docs": " Disallow the use of useless `undefined`.\n\n `undefined` is the default value for new variables, parameters, return statements, etc., so specifying it doesn't make any difference.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n let foo = undefined;\n ```\n\n ```js,expect_diagnostic\n const {foo = undefined} = bar;\n ```\n\n ```js,expect_diagnostic\n function foo() {\n return undefined;\n }\n ```\n\n ```js,expect_diagnostic\n function* foo() {\n yield undefined;\n }\n ```\n\n ```js,expect_diagnostic\n function foo(bar = undefined) {}\n ```\n\n ```js,expect_diagnostic\n function foo({bar = undefined}) {}\n ```\n\n ### Valid\n\n ```js\n let foo;\n const {foo} = bar;\n function foo() {\n return;\n }\n function* foo() {\n yield;\n }\n function foo(bar) {}\n function foo({bar}) {}\n foo();\n ```\n\n" + }, "noUselessUndefinedInitialization": { "deprecated": false, "version": "1.7.2", @@ -2088,6 +2114,35 @@ export function GET() { ], "docs": " Enforce the usage of a literal access to properties over computed property access.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n a.b[\"c\"];\n ```\n\n ```js,expect_diagnostic\n a.c[`d`]\n ```\n\n ```js,expect_diagnostic\n a.c[`d`] = \"something\"\n ```\n\n ```js,expect_diagnostic\n a = {\n \t['b']: d\n }\n ```\n\n ### Valid\n\n ```js\n a[\"c\" + \"d\"];\n a[d.c];\n ```\n\n" }, + "useMaxParams": { + "deprecated": false, + "version": "2.2.0", + "name": "useMaxParams", + "link": "https://biomejs.dev/linter/rules/use-max-params", + "recommended": false, + "fixKind": "none", + "sources": [ + { + "kind": "sameLogic", + "source": { + "eslint": "max-params" + } + }, + { + "kind": "sameLogic", + "source": { + "clippy": "too_many_arguments" + } + }, + { + "kind": "sameLogic", + "source": { + "eslintTypeScript": "max-params" + } + } + ], + "docs": " Enforce a maximum number of parameters in function definitions.\n\n Functions that take numerous parameters can be difficult to read and write\n because it requires the memorization of what each parameter is, its type,\n and the order they should appear in.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n function foo(a, b, c, d, e, f, g, h) {\n // too many parameters\n }\n ```\n\n ```js,expect_diagnostic\n const bar = (a, b, c, d, e, f, g, h) => {\n // too many parameters\n }\n ```\n\n ```js,expect_diagnostic\n class Baz {\n method(a, b, c, d, e, f, g, h) {\n // too many parameters\n }\n }\n ```\n\n ### Valid\n\n ```js\n function foo(a, b, c) {\n // within limit\n }\n ```\n\n ```js\n const bar = (a, b, c) => {\n // within limit\n }\n ```\n\n ```js\n class Baz {\n method(a, b, c) {\n // within limit\n }\n }\n ```\n\n ## Options\n\n ### max\n\n The maximum number of parameters allowed (default: 4).\n\n" + }, "useNumericLiterals": { "deprecated": false, "version": "1.0.0", @@ -2392,6 +2447,23 @@ export function GET() { ], "docs": " Disallow the use of variables, function parameters, classes, and enums before their declaration\n\n JavaScript doesn't allow the use of block-scoped variables (`let`, `const`), function parameters, and classes before their declaration.\n Similarly TypeScript doesn't allow the use of enums before their declaration.\n A `ReferenceError` will be thrown with any attempt to access the variable or the parameter before its declaration.\n\n The rule also reports the use of variables declared with `var` before their declarations.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n function f() {\n console.log(x);\n let x;\n }\n ```\n\n ```js,expect_diagnostic\n function f() {\n console.log(x);\n var x = 0;\n }\n ```\n\n ```js,expect_diagnostic\n function f(a = b, b = 0) {}\n ```\n\n ```js,expect_diagnostic\n new C();\n class C {}\n ```\n\n ### Valid\n\n ```js\n f();\n function f() {}\n ```\n\n ```js\n // An export can reference a variable before its declaration.\n export { CONSTANT };\n const CONSTANT = 0;\n ```\n\n ```js\n function f() { return CONSTANT; }\n const CONSTANT = 0;\n ```\n\n ```ts\n function f() {\n new C();\n }\n let c: C;\n class C {}\n ```\n" }, + "noNextAsyncClientComponent": { + "deprecated": false, + "version": "2.2.0", + "name": "noNextAsyncClientComponent", + "link": "https://biomejs.dev/linter/rules/no-next-async-client-component", + "recommended": false, + "fixKind": "none", + "sources": [ + { + "kind": "sameLogic", + "source": { + "eslintNext": "no-async-client-component" + } + } + ], + "docs": " Prevent client components from being async functions.\n\n This rule prevents the use of async functions for client components in Next.js applications.\n Client components marked with \"use client\" directive should not be async as this can cause\n hydration mismatches, break component rendering lifecycle, and lead to unexpected behavior\n with React's concurrent features.\n\n ## Examples\n\n ### Invalid\n\n ```jsx,expect_diagnostic\n \"use client\";\n\n export default async function MyComponent() {\n return
Hello
;\n }\n ```\n\n ### Valid\n\n ```jsx\n \"use client\";\n\n export default function MyComponent() {\n return
Hello
;\n }\n ```\n\n ```jsx\n // No \"use client\" directive - server component can be async\n export default async function ServerComponent() {\n const data = await fetch('/api/data');\n return
{data}
;\n }\n ```\n\n" + }, "noNodejsModules": { "deprecated": false, "version": "1.5.0", @@ -2648,6 +2720,23 @@ export function GET() { ], "docs": " Ensures the `super()` constructor is called exactly once on every code path in a class constructor before `this` is accessed if the class has a superclass\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n class A extends B {\n constructor() {}\n }\n ```\n\n ```js,expect_diagnostic\n class A extends B {\n constructor(value) {\n this.prop = value;\n super();\n }\n }\n ```\n\n ```js,expect_diagnostic\n class A extends B {\n constructor(cond) {\n if(cond) {\n super();\n }\n }\n }\n ```\n\n ### Valid\n\n ```js\n export default class A extends B {\n constructor() {\n super();\n }\n }\n ```\n\n ```js\n export class A {\n constructor() {}\n }\n ```\n\n" }, + "noUnresolvedImports": { + "deprecated": false, + "version": "2.0.0", + "name": "noUnresolvedImports", + "link": "https://biomejs.dev/linter/rules/no-unresolved-imports", + "recommended": false, + "fixKind": "none", + "sources": [ + { + "kind": "inspired", + "source": { + "eslintImport": "named" + } + } + ], + "docs": " Warn when importing non-existing exports.\n\n Importing a non-existing export is an error at runtime or build time.\n Biome can detect such incorrect imports and report errors for them.\n\n Note that if you use TypeScript, you probably don't want to use this\n rule, since TypeScript already performs such checks for you.\n\n ## Known Limitations\n\n * This rule does not validate imports through dynamic `import()`\n expressions or CommonJS `require()` calls.\n\n ## Examples\n\n ### Invalid\n\n ```js,file=foo.js\n export function foo() {};\n ```\n\n ```js,expect_diagnostic,file=bar.js\n // Attempt to import symbol with a typo:\n import { fooo } from \"./foo.js\";\n ```\n\n ### Valid\n\n ```js,file=foo.js\n export function foo() {};\n ```\n\n ```js,file=bar.js\n // Fixed typo:\n import { foo } from \"./foo.js\";\n ```\n" + }, "noUnsafeFinally": { "deprecated": false, "version": "1.0.0", @@ -2771,91 +2860,182 @@ export function GET() { ], "docs": " Disallow unused variables.\n\n There is an exception to this rule: variables that start with underscore, e.g. `let _something;`.\n\n The pattern of having an underscore as a prefix of a variable is a very diffuse\n pattern among programmers, and Biome follows it.\n\n This rule won't report unused imports.\n If you want to report unused imports,\n enable [noUnusedImports](https://biomejs.dev/linter/rules/no-unused-imports/).\n\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n let a = 4;\n a++;\n ```\n\n ```js,expect_diagnostic\n function foo() {}\n ```\n\n ```js,expect_diagnostic\n function foo() {\n foo();\n }\n ```\n\n ```js,expect_diagnostic\n const foo = () => {\n foo();\n };\n ```\n\n ```ts,expect_diagnostic\n export function f() {}\n ```\n\n ```js,expect_diagnostic\n const { brand } = car;\n ```\n\n ### Valid\n\n ```js\n function foo(b) {\n console.log(b)\n };\n foo();\n ```\n\n ```js\n export function foo(_unused) {}\n ```\n\n ```ts\n function used_overloaded(): number;\n function used_overloaded(s: string): string;\n function used_overloaded(s?: string) {\n return s;\n }\n used_overloaded();\n ```\n\n By default, unused variables declared inside destructured objects are ignored\n if the destructuring pattern also contains a rest property.\n (See the [rule options](#options) if you want to enable these checks).\n ```js\n const car = { brand: \"Tesla\", year: 2019, countryCode: \"US\" };\n const { brand, ...rest } = car;\n console.log(rest);\n ```\n\n ## Options\n\n ### `ignoreRestSiblings`\n\n Whether to ignore unused variables declared inside destructured objects\n containing rest properties (such as `const { a, b, ...rest } = obj`.\n\n Default: `true`\n\n #### Example\n\n ```json,options\n {\n \"options\": {\n \"ignoreRestSiblings\": false\n }\n }\n ```\n\n ```js,expect_diagnostic,use_options\n const car = { brand: \"Tesla\", year: 2019, countryCode: \"US\" };\n const { brand, ...other } = car;\n console.log(other);\n ```\n\n ```js,use_options\n const car = { brand: \"Tesla\", year: 2019, countryCode: \"US\" };\n const { brand: _, ...other } = car;\n console.log(other);\n ```\n" }, - "useImportExtensions": { - "deprecated": false, - "version": "1.8.0", - "name": "useImportExtensions", - "link": "https://biomejs.dev/linter/rules/use-import-extensions", - "recommended": false, - "fixKind": "safe", - "docs": " Enforce file extensions for relative imports.\n\n Browsers, Deno, and Node.js do not natively support importing files\n without extensions from JavaScript modules. This rule enforces the use\n of file extensions for relative imports to make the code more\n consistent -- and correct.\n\n In some cases, tooling can also benefit from explicit file extensions,\n because they do not need to guess which file to resolve.\n\n The rule checks both static imports (`import ... from \"...\"`) as well as\n dynamic imports such as `import(...)` and `require(...)`.\n\n ## Examples\n\n ### Invalid\n\n The following examples assume these imports will resolve to a file with\n an extension. Imports that don't resolve at all will not trigger a\n diagnostic.\n\n ```js\n import \"./foo\";\n ```\n ```js\n import \"./foo/\";\n ```\n ```js\n import \"../\";\n ```\n ```js\n import \"../.\";\n ```\n ```js\n import(\"./foo\");\n ```\n ```js\n require(\"./foo\");\n ```\n\n ### Valid\n\n ```js\n import \"biome\";\n ```\n ```js\n import \"./foo.js\";\n ```\n ```js\n import \"./bar/index.js\";\n ```\n ```js\n import(\"./foo.js\");\n ```\n ```js\n require(\"./foo.js\");\n ```\n\n ## Options\n\n The rule provides the options described below.\n\n ### extensionMappings\n\n A map of file extensions to their suggested replacements. This allows you\n to specify custom mappings for import extensions. For example, you can\n map TypeScript imports to JavaScript extensions.\n\n This is useful if you are bundling your code to JavaScript into a package\n and want to make sure all imports of TypeScript files use the `.js` extension\n instead.\n\n If no mapping is found for a given extension, and the import is missing an extension,\n the rule will suggest using the actual extension of the resolved file.\n\n Default: `{}` (empty object)\n\n ```json,options\n {\n \"options\": {\n \"extensionMappings\": {\n \"ts\": \"js\",\n \"tsx\": \"js\"\n }\n }\n }\n ```\n\n ### forceJsExtensions\n\n Normally, this rule suggests to use the extension of the module that is\n found in your project. For instance, `.ts` or `.tsx` for a TypeScript\n file. If this option is set to `true`, the rule will always suggest to\n use `.js` regardless of the extension in your project.\n\n This is useful if you use the `\"module\": \"node16\"` setting when building\n your code with `tsc`.\n\n Default: `false`\n\n ```json,options\n {\n \"options\": {\n \"forceJsExtensions\": true\n }\n }\n ```\n\n ## Editor Configuration\n\n If you use Visual Studio Code, you can ensure that it adds the file\n extension when automatically importing a variable by configuring\n `javascript.preferences.importModuleSpecifierEnding` and\n `typescript.preferences.importModuleSpecifierEnding`\n in your [settings](https://code.visualstudio.com/docs/getstarted/settings).\n\n ## Caveats\n\n If you are using TypeScript, TypeScript version 5.0 or later is\n required, also make sure to set\n [`allowImportingTsExtensions: true`](https://typescriptlang.org/tsconfig#allowImportingTsExtensions)\n in your `tsconfig.json`.\n" - }, - "useIsNan": { + "noVueDataObjectDeclaration": { "deprecated": false, - "version": "1.0.0", - "name": "useIsNan", - "link": "https://biomejs.dev/linter/rules/use-is-nan", + "version": "2.1.4", + "name": "noVueDataObjectDeclaration", + "link": "https://biomejs.dev/linter/rules/no-vue-data-object-declaration", "recommended": true, - "fixKind": "unsafe", + "fixKind": "safe", "sources": [ { - "kind": "sameLogic", + "kind": "inspired", "source": { - "eslint": "use-isnan" + "eslintVueJs": "no-deprecated-data-object-declaration" + } + }, + { + "kind": "inspired", + "source": { + "eslintVueJs": "no-shared-component-data" } } ], - "docs": " Require calls to `isNaN()` when checking for `NaN`.\n\n In JavaScript, `NaN` is a special value of the `Number` type.\n It’s used to represent any of the \"not-a-number\" values represented by the double-precision 64-bit format as specified by the IEEE Standard for Binary Floating-Point Arithmetic.\n\n Because `NaN` is unique in JavaScript by not being equal to anything, including itself, the results of comparisons to `NaN` are confusing:\n - `NaN` === `NaN` or `NaN` == `NaN` evaluate to false\n - `NaN` !== `NaN` or `NaN` != `NaN` evaluate to true\n\n Therefore, use `Number.isNaN()` or global `isNaN()` functions to test whether a value is `NaN`.\n\n Note that `Number.isNaN()` and `isNaN()` [do not have the same behavior](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isNaN#description).\n When the argument to `isNaN()` is not a number, the value is first coerced to a number.\n `Number.isNaN()` does not perform this coercion.\n Therefore, it is a more reliable way to test whether a value is `NaN`.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n 123 == NaN\n ```\n\n ```js,expect_diagnostic\n 123 != NaN\n ```\n\n ```js,expect_diagnostic\n switch(foo) { case (NaN): break; }\n ```\n\n ```js,expect_diagnostic\n Number.NaN == \"abc\"\n ```\n\n ### Valid\n\n ```js\n if (Number.isNaN(123) !== true) {}\n\n foo(Number.NaN / 2)\n\n switch(foo) {}\n ```\n\n" - }, - "useJsonImportAttributes": { - "deprecated": false, - "version": "2.0.0", - "name": "useJsonImportAttributes", - "link": "https://biomejs.dev/linter/rules/use-json-import-attributes", - "recommended": false, - "fixKind": "safe", - "docs": " Enforces the use of `with { type: \"json\" }` for JSON module imports.\n\n ECMAScript modules can import JSON modules. However, the specific import assertion `with { type: \"json\" }`\n is required to inform the JavaScript runtime that the imported file should be parsed as JSON.\n Omitting this assertion can lead to runtime errors or misinterpretation of the imported module.\n\n This rule ensures that all imports of `.json` files include this assertion.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n import jsonData from './data.json';\n ```\n\n ```js,expect_diagnostic\n import jsonData from './data.json' with { someOtherAttribute: \"value\" };\n ```\n\n ### Valid\n\n ```js\n import jsonData from './data.json' with { type: \"json\" };\n\n import jsonData from './data.json' with { type: \"json\", other: \"value\" };\n\n import code from './script.js'; // Not a JSON import\n ```\n\n" + "docs": " Enforce that Vue component `data` options are declared as functions.\n\n In Vue 3+, defining `data` as an object is deprecated because it leads to shared mutable state across component instances.\n This rule flags usages of `data: { … }` and offers an automatic fix to convert it into a function returning that object.\n\n See also:\n – Vue Migration Guide – Data Option: https://v3-migration.vuejs.org/breaking-changes/data-option.html :contentReference[oaicite:0]{index=0}\n – ESLint Plugin Vue: `no-deprecated-data-object-declaration`: https://eslint.vuejs.org/rules/no-deprecated-data-object-declaration :contentReference[oaicite:1]{index=1}\n\n ## Examples\n\n ### Invalid\n\n ```js\n // component-local data via function\n export default {\n /* ✗ BAD */\n data: { foo: null },\n };\n ```\n\n ```js\n // Composition API helper also deprecated\n defineComponent({\n /* ✗ BAD */\n data: { message: 'hi' }\n });\n ```\n\n ```js\n // Vue 3 entrypoint via createApp\n createApp({\n /* ✗ BAD */\n data: { active: true }\n }).mount('#app');\n ```\n\n ### Valid\n\n ```js\n // component-local data via function\n export default {\n /* ✓ GOOD */\n data() {\n return { foo: null };\n }\n };\n ```\n\n ```js\n // global registration with function syntax\n Vue.component('my-comp', {\n /* ✓ GOOD */\n data: function () {\n return { count: 0 };\n }\n });\n ```\n\n ```js\n // Composition API and createApp entrypoints\n defineComponent({\n /* ✓ GOOD */\n data() {\n return { message: 'hi' };\n }\n });\n\n createApp({\n /* ✓ GOOD */\n data: function() {\n return { active: true };\n }\n }).mount('#app');\n ```\n\n" }, - "useParseIntRadix": { + "noVueDuplicateKeys": { "deprecated": false, - "version": "2.0.0", - "name": "useParseIntRadix", - "link": "https://biomejs.dev/linter/rules/use-parse-int-radix", + "version": "2.2.5", + "name": "noVueDuplicateKeys", + "link": "https://biomejs.dev/linter/rules/no-vue-duplicate-keys", "recommended": true, - "fixKind": "unsafe", + "fixKind": "none", "sources": [ { "kind": "sameLogic", "source": { - "eslint": "radix" + "eslintVueJs": "no-dupe-keys" } } ], - "docs": " Enforce the consistent use of the radix argument when using `parseInt()`.\n\n When using the `parseInt()` function it is common to omit the second argument, the radix, and let the function try to determine from the first argument what type of number it is. By default, `parseInt()` will autodetect decimal and hexadecimal (via `0x` prefix). Prior to ECMAScript 5, `parseInt()` also autodetected octal literals, which caused problems because many developers assumed a leading `0` would be ignored.\n\n This confusion led to the suggestion that you always use the radix parameter to `parseInt()` to eliminate unintended consequences.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n parseInt(\"071\");\n ```\n\n ```js,expect_diagnostic\n parseInt(someValue);\n ```\n\n ```js,expect_diagnostic\n parseInt(\"071\", \"abc\");\n ```\n\n ```js,expect_diagnostic\n parseInt(\"071\", 37);\n ```\n\n ```js,expect_diagnostic\n parseInt();\n ```\n\n ### Valid\n\n ```js\n parseInt(\"071\", 10);\n parseInt(\"071\", 8);\n parseFloat(someValue);\n ```\n\n" + "docs": " Disallow duplicate keys in Vue component data, methods, computed properties, and other options.\n\n This rule prevents the use of duplicate keys across different Vue component options\n such as `props`, `data`, `computed`, `methods`, and `setup`. Even if keys don't conflict\n in the script tag, they may cause issues in the template since Vue allows direct\n access to these keys.\n\n ## Examples\n\n ### Invalid\n\n ```vue,expect_diagnostic\n \n ```\n\n ```vue,expect_diagnostic\n \n ```\n\n ```vue,expect_diagnostic\n \n ```\n\n ### Valid\n\n ```vue\n \n ```\n\n ```vue\n \n ```\n\n" }, - "useSingleJsDocAsterisk": { + "noVueReservedKeys": { "deprecated": false, - "version": "2.0.0", - "name": "useSingleJsDocAsterisk", - "link": "https://biomejs.dev/linter/rules/use-single-js-doc-asterisk", - "recommended": false, - "fixKind": "unsafe", + "version": "2.1.3", + "name": "noVueReservedKeys", + "link": "https://biomejs.dev/linter/rules/no-vue-reserved-keys", + "recommended": true, + "fixKind": "none", "sources": [ { "kind": "sameLogic", "source": { - "eslintJsDoc": "no-multi-asterisks" + "eslintVueJs": "no-reserved-keys" } } ], - "docs": " Enforce JSDoc comment lines to start with a single asterisk, except for the first one.\n\n This rule ensures that every line in a JSDoc block, except the opening one, starts with exactly one asterisk (`*`).\n Extra asterisks are unnecessary in JSDoc comments and are often introduced by mistake.\n\n Double asterisks (`**`) are still allowed, because they mark the start of bold text.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n /**\n ** Description\n */\n ```\n\n ```js,expect_diagnostic\n /**\n * Description\n * */\n ```\n\n ```js,expect_diagnostic\n /** @ts-ignore **/\n ```\n\n ### Valid\n\n ```js\n /**\n * Description\n * @public\n */\n ```\n\n ```js\n /** @ts-ignore */\n ```\n\n ```js\n /**\n * **Bold** text\n */\n ```\n\n" + "docs": " Disallow reserved keys in Vue component data and computed properties.\n\n Vue reserves certain keys for its internal use. Using these reserved keys\n in data properties, computed properties, methods, or other component options\n can cause conflicts and unpredictable behavior in your Vue components.\n\n This rule prevents the use of Vue reserved keys such as:\n - Keys starting with `$` (e.g., `$el`, `$data`, `$props`, `$refs`, etc.)\n - Keys starting with `_` in data properties (reserved for Vue internals)\n\n ## Examples\n\n ### Invalid\n\n ```vue,expect_diagnostic\n \n ```\n\n ```vue,expect_diagnostic\n \n ```\n\n ```vue,expect_diagnostic\n \n ```\n\n ```vue,expect_diagnostic\n \n ```\n\n ### Valid\n\n ```vue\n \n ```\n\n ```vue\n \n ```\n\n" }, - "useValidForDirection": { + "noVueReservedProps": { "deprecated": false, - "version": "1.0.0", - "name": "useValidForDirection", - "link": "https://biomejs.dev/linter/rules/use-valid-for-direction", + "version": "2.1.2", + "name": "noVueReservedProps", + "link": "https://biomejs.dev/linter/rules/no-vue-reserved-props", "recommended": true, "fixKind": "none", "sources": [ { "kind": "sameLogic", "source": { - "eslint": "for-direction" + "eslintVueJs": "no-reserved-props" } } ], - "docs": " Enforce \"for\" loop update clause moving the counter in the right direction.\n\n A for loop with a stop condition that can never be reached,\n such as one with a counter that moves in the wrong direction, will run infinitely.\n While there are occasions when an infinite loop is intended, the convention is to construct such loops as while loops.\n More typically, an infinite for loop is a bug.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n for (var i = 0; i < 10; i--) {\n }\n ```\n\n ```js,expect_diagnostic\n for (var i = 10; i >= 0; i++) {\n }\n ```\n\n ```js,expect_diagnostic\n for (var i = 0; i > 10; i++) {\n }\n ```\n\n ### Valid\n\n ```js\n for (var i = 0; i < 10; i++) {\n }\n ```\n" + "docs": " Disallow reserved names to be used as props.\n\n Vue reserves certain prop names for its internal use. Using these reserved names\n as prop names can cause conflicts and unexpected behavior in your Vue components.\n\n This rule prevents the use of the following reserved prop names:\n - `key` - Used by Vue for list rendering and component identification\n - `ref` - Used by Vue for template refs\n\n ## Examples\n\n ### Invalid\n\n ```vue,expect_diagnostic\n \n ```\n\n ```js,expect_diagnostic\n import {defineComponent} from 'vue';\n\n export default defineComponent({\n props: [\n 'key',\n ]\n });\n ```\n\n ```vue,expect_diagnostic\n \n ```\n\n ```vue,expect_diagnostic\n \n ```\n\n ### Valid\n\n ```js\n import {defineComponent} from 'vue';\n\n export default defineComponent({\n props: ['foo']\n });\n ```\n\n ```vue\n \n ```\n\n ```vue\n \n ```\n\n ```vue\n \n ```\n\n" + }, + "noVueSetupPropsReactivityLoss": { + "deprecated": false, + "version": "2.2.6", + "name": "noVueSetupPropsReactivityLoss", + "link": "https://biomejs.dev/linter/rules/no-vue-setup-props-reactivity-loss", + "recommended": false, + "fixKind": "none", + "sources": [ + { + "kind": "inspired", + "source": { + "eslintVueJs": "no-setup-props-reactivity-loss" + } + } + ], + "docs": " Disallow destructuring of `props` passed to `setup` in Vue projects.\n\n In Vue's Composition API, props must be accessed as `props.propertyName` to maintain\n reactivity. Destructuring `props` directly in the `setup` function parameters will\n cause the resulting variables to lose their reactive nature.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n export default {\n setup({ count }) {\n return () => h('div', count);\n }\n }\n ```\n\n ### Valid\n\n ```js\n export default {\n setup(props) {\n return () => h('div', props.count);\n }\n }\n ```\n\n" + }, + "useImportExtensions": { + "deprecated": false, + "version": "1.8.0", + "name": "useImportExtensions", + "link": "https://biomejs.dev/linter/rules/use-import-extensions", + "recommended": false, + "fixKind": "safe", + "docs": " Enforce file extensions for relative imports.\n\n Browsers, Deno, and Node.js do not natively support importing files\n without extensions from JavaScript modules. This rule enforces the use\n of file extensions for relative imports to make the code more\n consistent -- and correct.\n\n In some cases, tooling can also benefit from explicit file extensions,\n because they do not need to guess which file to resolve.\n\n The rule checks both static imports (`import ... from \"...\"`) as well as\n dynamic imports such as `import(...)` and `require(...)`.\n\n ## Examples\n\n ### Invalid\n\n The following examples assume these imports will resolve to a file with\n an extension. Imports that don't resolve at all will not trigger a\n diagnostic.\n\n ```js\n import \"./foo\";\n ```\n ```js\n import \"./foo/\";\n ```\n ```js\n import \"../\";\n ```\n ```js\n import \"../.\";\n ```\n ```js\n import(\"./foo\");\n ```\n ```js\n require(\"./foo\");\n ```\n\n ### Valid\n\n ```js\n import \"biome\";\n ```\n ```js\n import \"./foo.js\";\n ```\n ```js\n import \"./bar/index.js\";\n ```\n ```js\n import(\"./foo.js\");\n ```\n ```js\n require(\"./foo.js\");\n ```\n\n ## Options\n\n The rule provides the options described below.\n\n ### extensionMappings\n\n A map of file extensions to their suggested replacements. This allows you\n to specify custom mappings for import extensions. For example, you can\n map TypeScript imports to JavaScript extensions.\n\n This is useful if you are bundling your code to JavaScript into a package\n and want to make sure all imports of TypeScript files use the `.js` extension\n instead.\n\n If no mapping is found for a given extension, and the import is missing an extension,\n the rule will suggest using the actual extension of the resolved file.\n\n Default: `{}` (empty object)\n\n ```json,options\n {\n \"options\": {\n \"extensionMappings\": {\n \"ts\": \"js\",\n \"tsx\": \"js\"\n }\n }\n }\n ```\n\n ### forceJsExtensions\n\n Normally, this rule suggests to use the extension of the module that is\n found in your project. For instance, `.ts` or `.tsx` for a TypeScript\n file. If this option is set to `true`, the rule will always suggest to\n use `.js` regardless of the extension in your project.\n\n This is useful if you use the `\"module\": \"node16\"` setting when building\n your code with `tsc`.\n\n Default: `false`\n\n ```json,options\n {\n \"options\": {\n \"forceJsExtensions\": true\n }\n }\n ```\n\n ## Editor Configuration\n\n If you use Visual Studio Code, you can ensure that it adds the file\n extension when automatically importing a variable by configuring\n `javascript.preferences.importModuleSpecifierEnding` and\n `typescript.preferences.importModuleSpecifierEnding`\n in your [settings](https://code.visualstudio.com/docs/getstarted/settings).\n\n ## Caveats\n\n If you are using TypeScript, TypeScript version 5.0 or later is\n required, also make sure to set\n [`allowImportingTsExtensions: true`](https://typescriptlang.org/tsconfig#allowImportingTsExtensions)\n in your `tsconfig.json`.\n" + }, + "useIsNan": { + "deprecated": false, + "version": "1.0.0", + "name": "useIsNan", + "link": "https://biomejs.dev/linter/rules/use-is-nan", + "recommended": true, + "fixKind": "unsafe", + "sources": [ + { + "kind": "sameLogic", + "source": { + "eslint": "use-isnan" + } + } + ], + "docs": " Require calls to `isNaN()` when checking for `NaN`.\n\n In JavaScript, `NaN` is a special value of the `Number` type.\n It’s used to represent any of the \"not-a-number\" values represented by the double-precision 64-bit format as specified by the IEEE Standard for Binary Floating-Point Arithmetic.\n\n Because `NaN` is unique in JavaScript by not being equal to anything, including itself, the results of comparisons to `NaN` are confusing:\n - `NaN` === `NaN` or `NaN` == `NaN` evaluate to false\n - `NaN` !== `NaN` or `NaN` != `NaN` evaluate to true\n\n Therefore, use `Number.isNaN()` or global `isNaN()` functions to test whether a value is `NaN`.\n\n Note that `Number.isNaN()` and `isNaN()` [do not have the same behavior](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isNaN#description).\n When the argument to `isNaN()` is not a number, the value is first coerced to a number.\n `Number.isNaN()` does not perform this coercion.\n Therefore, it is a more reliable way to test whether a value is `NaN`.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n 123 == NaN\n ```\n\n ```js,expect_diagnostic\n 123 != NaN\n ```\n\n ```js,expect_diagnostic\n switch(foo) { case (NaN): break; }\n ```\n\n ```js,expect_diagnostic\n Number.NaN == \"abc\"\n ```\n\n ### Valid\n\n ```js\n if (Number.isNaN(123) !== true) {}\n\n foo(Number.NaN / 2)\n\n switch(foo) {}\n ```\n\n" + }, + "useJsonImportAttributes": { + "deprecated": false, + "version": "2.0.0", + "name": "useJsonImportAttributes", + "link": "https://biomejs.dev/linter/rules/use-json-import-attributes", + "recommended": false, + "fixKind": "safe", + "docs": " Enforces the use of `with { type: \"json\" }` for JSON module imports.\n\n ECMAScript modules can import JSON modules. However, the specific import assertion `with { type: \"json\" }`\n is required to inform the JavaScript runtime that the imported file should be parsed as JSON.\n Omitting this assertion can lead to runtime errors or misinterpretation of the imported module.\n\n This rule ensures that all imports of `.json` files include this assertion.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n import jsonData from './data.json';\n ```\n\n ```js,expect_diagnostic\n import jsonData from './data.json' with { someOtherAttribute: \"value\" };\n ```\n\n ### Valid\n\n ```js\n import jsonData from './data.json' with { type: \"json\" };\n\n import jsonData from './data.json' with { type: \"json\", other: \"value\" };\n\n import code from './script.js'; // Not a JSON import\n ```\n\n" + }, + "useParseIntRadix": { + "deprecated": false, + "version": "2.0.0", + "name": "useParseIntRadix", + "link": "https://biomejs.dev/linter/rules/use-parse-int-radix", + "recommended": true, + "fixKind": "unsafe", + "sources": [ + { + "kind": "sameLogic", + "source": { + "eslint": "radix" + } + } + ], + "docs": " Enforce the consistent use of the radix argument when using `parseInt()`.\n\n When using the `parseInt()` function it is common to omit the second argument, the radix, and let the function try to determine from the first argument what type of number it is. By default, `parseInt()` will autodetect decimal and hexadecimal (via `0x` prefix). Prior to ECMAScript 5, `parseInt()` also autodetected octal literals, which caused problems because many developers assumed a leading `0` would be ignored.\n\n This confusion led to the suggestion that you always use the radix parameter to `parseInt()` to eliminate unintended consequences.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n parseInt(\"071\");\n ```\n\n ```js,expect_diagnostic\n parseInt(someValue);\n ```\n\n ```js,expect_diagnostic\n parseInt(\"071\", \"abc\");\n ```\n\n ```js,expect_diagnostic\n parseInt(\"071\", 37);\n ```\n\n ```js,expect_diagnostic\n parseInt();\n ```\n\n ### Valid\n\n ```js\n parseInt(\"071\", 10);\n parseInt(\"071\", 8);\n parseFloat(someValue);\n ```\n\n" + }, + "useSingleJsDocAsterisk": { + "deprecated": false, + "version": "2.0.0", + "name": "useSingleJsDocAsterisk", + "link": "https://biomejs.dev/linter/rules/use-single-js-doc-asterisk", + "recommended": false, + "fixKind": "unsafe", + "sources": [ + { + "kind": "sameLogic", + "source": { + "eslintJsDoc": "no-multi-asterisks" + } + } + ], + "docs": " Enforce JSDoc comment lines to start with a single asterisk, except for the first one.\n\n This rule ensures that every line in a JSDoc block, except the opening one, starts with exactly one asterisk (`*`).\n Extra asterisks are unnecessary in JSDoc comments and are often introduced by mistake.\n\n Double asterisks (`**`) are still allowed, because they mark the start of bold text.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n /**\n ** Description\n */\n ```\n\n ```js,expect_diagnostic\n /**\n * Description\n * */\n ```\n\n ```js,expect_diagnostic\n /** @ts-ignore **/\n ```\n\n ### Valid\n\n ```js\n /**\n * Description\n * @public\n */\n ```\n\n ```js\n /** @ts-ignore */\n ```\n\n ```js\n /**\n * **Bold** text\n */\n ```\n\n" + }, + "useValidForDirection": { + "deprecated": false, + "version": "1.0.0", + "name": "useValidForDirection", + "link": "https://biomejs.dev/linter/rules/use-valid-for-direction", + "recommended": true, + "fixKind": "none", + "sources": [ + { + "kind": "sameLogic", + "source": { + "eslint": "for-direction" + } + } + ], + "docs": " Enforce \"for\" loop update clause moving the counter in the right direction.\n\n A for loop with a stop condition that can never be reached,\n such as one with a counter that moves in the wrong direction, will run infinitely.\n While there are occasions when an infinite loop is intended, the convention is to construct such loops as while loops.\n More typically, an infinite for loop is a bug.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n for (var i = 0; i < 10; i--) {\n }\n ```\n\n ```js,expect_diagnostic\n for (var i = 10; i >= 0; i++) {\n }\n ```\n\n ```js,expect_diagnostic\n for (var i = 0; i > 10; i++) {\n }\n ```\n\n ### Valid\n\n ```js\n for (var i = 0; i < 10; i++) {\n }\n ```\n" }, "useValidTypeof": { "deprecated": false, @@ -2927,29 +3107,6 @@ export function GET() { ], "docs": " Disallow continue statements.\n\n The continue statement terminates execution of the statements in the current iteration of the current or labeled loop, and continues execution of the loop with the next iteration.\n When used incorrectly it makes code less testable, less readable and less maintainable.\n Structured control flow statements such as if should be used instead.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n let sum = 0,\n i;\n\n for(i = 0; i < 10; i++) {\n if(i >= 5) {\n continue;\n }\n\n sum += i;\n }\n ```\n\n ### Valid\n\n ```js\n let sum = 0,\n i;\n\n for(i = 0; i < 10; i++) {\n if(i < 5) {\n sum += i;\n }\n }\n ```\n\n" }, - "noDeprecatedImports": { - "deprecated": false, - "version": "2.2.5", - "name": "noDeprecatedImports", - "link": "https://biomejs.dev/linter/rules/no-deprecated-imports", - "recommended": false, - "fixKind": "none", - "sources": [ - { - "kind": "inspired", - "source": { - "eslintTypeScript": "no-deprecated" - } - }, - { - "kind": "inspired", - "source": { - "eslintImport": "no-deprecated" - } - } - ], - "docs": " Restrict imports of deprecated exports.\n\n This rule flags any imports for symbols (such as types, functions, or\n anything else that can be imported), that are documented with a JSDoc\n comment that contains an \"@deprecated\" annotation.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic,file=foo.js\n import { oldUtility } from \"./utils.js\";\n ```\n\n ```js,file=utils.js\n /**\n * @deprecated\n */\n export function oldUtility() {}\n ```\n\n ### Valid\n\n ```js,file=foo.js\n import { newUtility, oldUtility } from \"./utils.js\";\n ```\n\n ```js,file=utils.js\n export function newUtility() {}\n\n // @deprecated (this is not a JSDoc comment)\n export function oldUtility() {}\n ```\n\n" - }, "noDivRegex": { "deprecated": false, "version": "2.3.12", @@ -3001,23 +3158,6 @@ export function GET() { ], "docs": " Disallow JSX prop spreading the same identifier multiple times.\n\n Enforces that any unique expression is only spread once.\n Generally spreading the same expression twice is an indicator of a mistake since any attribute between the spreads may be overridden when the intent was not to.\n Even when that is not the case this will lead to unnecessary computations being performed.\n\n ## Examples\n\n ### Invalid\n\n ```jsx,expect_diagnostic\n
\n ```\n\n ### Valid\n\n ```jsx\n
\n ```\n\n" }, - "noEmptySource": { - "deprecated": false, - "version": "2.2.7", - "name": "noEmptySource", - "link": "https://biomejs.dev/linter/rules/no-empty-source", - "recommended": false, - "fixKind": "none", - "sources": [ - { - "kind": "sameLogic", - "source": { - "eslintUnicorn": "no-empty-file" - } - } - ], - "docs": " Disallow empty sources.\n\n A source containing only the following is considered empty:\n - Whitespace (spaces, tabs or newlines)\n - Comments\n - Directives\n - Empty statements\n - Empty block statements\n - Hashbang\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n\n ```\n\n ```js,expect_diagnostic\n // Only comments\n ```\n\n ```js,expect_diagnostic\n /* Only comments */\n ```\n\n ```js,expect_diagnostic\n 'use strict';\n ```\n\n ```js,expect_diagnostic\n ;\n ```\n\n ```js,expect_diagnostic\n {\n }\n ```\n\n ```js,expect_diagnostic\n #!/usr/bin/env node\n ```\n\n ### Valid\n\n ```js\n const x = 0;\n ```\n\n ```js\n 'use strict';\n const x = 0;\n ```\n\n ```js\n ;;\n const x = 0;\n ```\n\n ```js\n {\n const x = 0;\n }\n ```\n\n ## Options\n\n ### `allowComments`\n\n Whether the comments should be marked as meaningful.\n When this option has been set to `true`, a file with only comments is considered valid.\n\n Default `false`\n\n ```json,options\n {\n \"options\": {\n \"allowComments\": true\n }\n }\n ```\n\n #### Invalid\n\n ```js,expect_diagnostic,use_options\n\n ```\n\n #### Valid\n\n ```js,use_options\n /* Only comments */\n ```\n\n" - }, "noEqualsToNull": { "deprecated": false, "version": "2.3.8", @@ -3103,23 +3243,6 @@ export function GET() { ], "docs": " Disallow iterating using a for-in loop.\n\n A for-in loop (`for (const i in o)`) iterates over the properties of an Object. While it is legal to use for-in loops with array values, it is not common. There are several potential bugs with this:\n\n 1. It iterates over all enumerable properties, including non-index ones and the entire prototype chain. For example, [`RegExp.prototype.exec`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec) returns an array with additional properties, and `for-in` will iterate over them. Some libraries or even your own code may add additional methods to `Array.prototype` (either as polyfill or as custom methods), and if not done properly, they may be iterated over as well.\n 2. It skips holes in the array. While sparse arrays are rare and advised against, they are still possible and your code should be able to handle them.\n 3. The \"index\" is returned as a string, not a number. This can be caught by TypeScript, but can still lead to subtle bugs.\n\n You may have confused for-in with for-of, which iterates over the elements of the array. If you actually need the index, use a regular `for` loop or the `forEach` method.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n for (const i in array) {\n console.log(i, array[i]);\n }\n ```\n\n ### Valid\n\n ```js\n for (const value of array) {\n console.log(value);\n }\n ```\n ```js\n for (let i = 0; i < array.length; i += 1) {\n console.log(i, array[i]);\n }\n ```\n ```js\n array.forEach((value, i) => {\n console.log(i, value);\n });\n ```\n ```js\n for (const [i, value] of array.entries()) {\n console.log(i, value);\n }\n ```\n\n" }, - "noImportCycles": { - "deprecated": false, - "version": "2.0.0", - "name": "noImportCycles", - "link": "https://biomejs.dev/linter/rules/no-import-cycles", - "recommended": false, - "fixKind": "none", - "sources": [ - { - "kind": "sameLogic", - "source": { - "eslintImport": "no-cycle" - } - } - ], - "docs": " Prevent import cycles.\n\n This rule warns when a file imports another file that, either directly\n or indirectly, imports the original file again.\n\n Cycles can lead to symbols that are unexpectedly `undefined` and are\n generally considered poor code hygiene.\n\n If a cycle is detected, it is advised to move code such that imports\n only go in a single direction, i.e. they don't point \"back\" to the\n importing file.\n\n However, files that import themselves are allowed, and the rule won't trigger for these use cases.\n This allows for encapsulation of functions/variables into a namespace instead of using a\n static class (triggers [noStaticOnlyClass](https://biomejs.dev/linter/rules/no-static-only-class)).\n\n :::note\n This rule is computationally expensive. If you are particularly\n pressed for lint time, or don't think you have an issue with dependency\n cycles, you may not want this rule enabled.\n :::\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic,file=foobar.js\n import { baz } from \"./baz.js\";\n\n export function foo() {\n baz();\n }\n\n export function bar() {\n console.log(\"foobar\");\n }\n ```\n\n ```js,expect_diagnostic,file=baz.js\n import { bar } from \"./foobar.js\";\n\n export function baz() {\n bar();\n }\n ```\n\n ### Valid\n\n ```js,file=foo.js\n import { baz } from \"./baz.js\";\n\n export function foo() {\n baz();\n }\n ```\n\n ```js,file=bar.js\n export function bar() {\n console.log(\"foobar\");\n }\n ```\n\n ```js,file=baz.js\n import { bar } from \"./bar.js\";\n\n export function baz() {\n bar();\n }\n ```\n\n ```js,file=foobaz.js\n export function foo() {\n console.log(\"foobaz\");\n }\n\n export * as baz from './foobaz.js';\n\n import { baz } from './foobaz.js';\n ```\n\n ```ts,file=types.ts\n import type { bar } from \"./qux.ts\";\n\n export type Foo = {\n bar: typeof bar;\n };\n ```\n\n ```ts,file=qux.ts\n import type { Foo } from \"./types.ts\";\n\n export function bar(foo: Foo) {\n console.log(foo);\n }\n ```\n\n ## Options\n\n The rule provides the options described below.\n\n ### `ignoreTypes`\n\n Ignores type-only imports when finding an import cycle. A type-only import (`import type`)\n will be removed by the compiler, so it cuts an import cycle at runtime. Note that named type\n imports (`import { type Foo }`) aren't considered as type-only because it's not removed by\n the compiler if the `verbatimModuleSyntax` option is enabled. Enabled by default.\n\n ```json,options\n {\n \"options\": {\n \"ignoreTypes\": false\n }\n }\n ```\n\n #### Invalid\n\n ```ts,file=types.ts\n import type { bar } from \"./qux.ts\";\n\n export type Foo = {\n bar: typeof bar;\n };\n ```\n\n ```ts,use_options,expect_diagnostic,file=qux.ts\n import type { Foo } from \"./types.ts\";\n\n export function bar(foo: Foo) {\n console.log(foo);\n }\n ```\n" - }, "noIncrementDecrement": { "deprecated": false, "version": "2.3.2", @@ -3188,23 +3311,6 @@ export function GET() { ], "docs": " Disallow nested `.then()` or `.catch()` promise calls.\n\n Nesting `.then()` or `.catch()` calls defeats the purpose of promises,\n which is to create a flat chain of asynchronous operations. Nested promise\n callbacks can make code harder to read and maintain.\n\n However, nesting is allowed when the nested callback references variables\n from the outer scope, as flattening would break the code in such cases.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n doThing().then(function() { return a.then() })\n ```\n\n ```js,expect_diagnostic\n doThing().then(() => b.catch())\n ```\n\n ```js,expect_diagnostic\n doThing()\n .then(a => getB(a)\n .then(b => getC(b))\n )\n ```\n\n ### Valid\n\n ```js\n // Simple returns\n doThing().then(function() { return 4 })\n doThing().then(() => 4)\n ```\n\n ```js\n // Chained promises (no nesting)\n doThing()\n .then(a => getB(a))\n .then(b => getC(b))\n ```\n\n ```js\n // Nested but references outer scope variable 'a'\n doThing()\n .then(a => getB(a)\n .then(b => getC(a, b))\n )\n ```\n\n ```js\n // Promise.resolve/all are fine\n doThing().then(function() { return Promise.all([a,b,c]) })\n doThing().then(() => Promise.resolve(4))\n ```\n\n" }, - "noNextAsyncClientComponent": { - "deprecated": false, - "version": "2.2.0", - "name": "noNextAsyncClientComponent", - "link": "https://biomejs.dev/linter/rules/no-next-async-client-component", - "recommended": false, - "fixKind": "none", - "sources": [ - { - "kind": "sameLogic", - "source": { - "eslintNext": "no-async-client-component" - } - } - ], - "docs": " Prevent client components from being async functions.\n\n This rule prevents the use of async functions for client components in Next.js applications.\n Client components marked with \"use client\" directive should not be async as this can cause\n hydration mismatches, break component rendering lifecycle, and lead to unexpected behavior\n with React's concurrent features.\n\n ## Examples\n\n ### Invalid\n\n ```jsx,expect_diagnostic\n \"use client\";\n\n export default async function MyComponent() {\n return
Hello
;\n }\n ```\n\n ### Valid\n\n ```jsx\n \"use client\";\n\n export default function MyComponent() {\n return
Hello
;\n }\n ```\n\n ```jsx\n // No \"use client\" directive - server component can be async\n export default async function ServerComponent() {\n const data = await fetch('/api/data');\n return
{data}
;\n }\n ```\n\n" - }, "noParametersOnlyUsedInRecursion": { "deprecated": false, "version": "2.3.3", @@ -3239,29 +3345,6 @@ export function GET() { ], "docs": " Disallow the use of the deprecated `__proto__` object property.\n\n [`Object.prototype.__proto__`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/proto)\n is a special accessor used to get or set the prototype of an object. \\\n\n However, it has been **deprecated** since _ECMAScript 2009_, being much slower and much less reliable than its\n modern counterparts [`Object.getPrototypeOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getPrototypeOf)\n and [`Object.setPrototypeOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/setPrototypeOf).\n\n Since it is a regular property on `Object.prototype`,\n `__proto__` **will not work** on `null`-prototype objects that do not extend from `Object.prototype`\n nor ones having created their own `__proto__` properties via `Object.defineProperty`.\n\n As such, this rule encourages the use of `Object.getPrototypeOf()` and `Object.setPrototypeOf()`\n in lieu of directly accessing `__proto__`.\n\n :::info\n Note that this does **not** check for the use of `__proto__` inside object literal definitions\n to set a newly created object's prototype, \\\n which is standard practice and well-optimized in modern browsers.\n :::\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n obj.__proto__ = a;\n ```\n\n ```js,expect_diagnostic\n const b = obj.__proto__;\n ```\n\n ### Valid\n\n ```js\n const a = Object.getPrototypeOf(obj);\n ```\n\n ```js\n Object.setPrototypeOf(obj, b);\n ```\n\n ```js\n // This sets `foo`'s prototype to `null` (similar to `Object.create`), and is\n // well-defined across browsers.\n const foo = {\n __proto__: null,\n a: 1,\n }\n ```\n" }, - "noReactForwardRef": { - "deprecated": false, - "version": "2.2.5", - "name": "noReactForwardRef", - "link": "https://biomejs.dev/linter/rules/no-react-forward-ref", - "recommended": false, - "fixKind": "unsafe", - "sources": [ - { - "kind": "sameLogic", - "source": { - "eslintReactX": "no-forward-ref" - } - }, - { - "kind": "sameLogic", - "source": { - "eslintReactXyz": "no-forward-ref" - } - } - ], - "docs": " Replaces usages of `forwardRef` with passing `ref` as a prop.\n\n In React 19, `forwardRef` is no longer necessary. Pass `ref` as a prop instead.\n This rule detects the usage of the `forwardRef` API, and it suggests using the prop `ref`\n instead.\n See [the official blog post](https://react.dev/blog/2024/12/05/react-19#ref-as-a-prop) for details.\n\n This rule should be disabled if you are working with React 18 or earlier.\n\n ## Examples\n\n ### Invalid\n\n ```jsx,expect_diagnostic\n import { forwardRef } from \"react\";\n\n const MyInput = forwardRef(function MyInput(props, ref) {\n return ;\n });\n ```\n\n ```jsx,expect_diagnostic\n import { forwardRef } from \"react\";\n\n const MyInput = forwardRef((props, ref) => {\n return ;\n });\n ```\n\n ### Valid\n\n ```jsx\n function MyInput({ ref, ...props }) {\n return ;\n }\n ```\n\n ```jsx\n const MyInput = ({ ref, ...props }) => {\n return ;\n }\n ```\n\n" - }, "noRedundantDefaultExport": { "deprecated": false, "version": "2.3.14", @@ -3414,49 +3497,6 @@ export function GET() { ], "docs": " Disallow unnecessary type-based conditions that can be statically determined as redundant.\n\n This rule detects if expressions inside conditions are statically inferrable and yield\n falsy or truthy values that don't change during the life cycle of the program.\n\n ## Examples\n\n ### Invalid\n\n ```ts\n function head(items: T[]) {\n if (items) { // This check is unnecessary\n return items[0].toUpperCase();\n }\n }\n ```\n\n ```ts\n function foo(arg: 'bar' | 'baz') {\n if (arg) { // This check is unnecessary\n }\n }\n ```\n\n ```ts\n function bar(arg: string) {\n return arg?.length; // ?. is unnecessary\n }\n ```\n\n Contrary to the source rule, this rule doesn't trigger bindings that are assigned to multiple\n values. In the following example, the variable `greeting` is assigned to multiple values; hence\n it can't be inferred to a truthy or falsy value.\n\n ```ts\n let greeting = false;\n\n function changeGreeting() {\n greeting = \"Hello World!\"\n }\n\n if (greeting) {} // rule not triggered here\n\n ```\n\n\n ### Valid\n\n ```ts\n function head(items: T[] | null) {\n if (items) { // This check is necessary\n return items[0].toUpperCase();\n }\n }\n ```\n\n ```ts\n function foo(arg: 'bar' | 'baz' | null) {\n if (arg) { // This check is necessary\n }\n }\n ```\n\n ```ts\n function bar(arg: string | undefined) {\n return arg?.length; // ?. is necessary\n }\n ```\n\n" }, - "noUnresolvedImports": { - "deprecated": false, - "version": "2.0.0", - "name": "noUnresolvedImports", - "link": "https://biomejs.dev/linter/rules/no-unresolved-imports", - "recommended": false, - "fixKind": "none", - "sources": [ - { - "kind": "inspired", - "source": { - "eslintImport": "named" - } - } - ], - "docs": " Warn when importing non-existing exports.\n\n Importing a non-existing export is an error at runtime or build time.\n Biome can detect such incorrect imports and report errors for them.\n\n Note that if you use TypeScript, you probably don't want to use this\n rule, since TypeScript already performs such checks for you.\n\n ## Known Limitations\n\n * This rule does not validate imports through dynamic `import()`\n expressions or CommonJS `require()` calls.\n\n ## Examples\n\n ### Invalid\n\n ```js,file=foo.js\n export function foo() {};\n ```\n\n ```js,expect_diagnostic,file=bar.js\n // Attempt to import symbol with a typo:\n import { fooo } from \"./foo.js\";\n ```\n\n ### Valid\n\n ```js,file=foo.js\n export function foo() {};\n ```\n\n ```js,file=bar.js\n // Fixed typo:\n import { foo } from \"./foo.js\";\n ```\n" - }, - "noUnusedExpressions": { - "deprecated": false, - "version": "2.2.5", - "name": "noUnusedExpressions", - "link": "https://biomejs.dev/linter/rules/no-unused-expressions", - "recommended": false, - "fixKind": "none", - "sources": [ - { - "kind": "sameLogic", - "source": { - "eslint": "no-unused-expressions" - } - } - ], - "docs": " Disallow expression statements that are neither a function call nor an\n assignment.\n\n When an expression is used as a statement, it should be explicitly clear\n what the intention behind the expression is. This is clear for function\n calls and assignments, because the call or the assignment itself is the\n primary intention behind the statement. For other expression kinds, the\n intention is much more ambiguous; it could be the expression contains\n side-effects that are not very explicit, but it could also be that it is\n an error where the author forgot to use the result of the expression,\n such as a forgotten `return` keyword, or it could point to a function\n that the author forgot to call.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n 0\n ```\n\n ```js,expect_diagnostic\n if(0) 0\n ```\n\n ```js,expect_diagnostic\n {0}\n ```\n\n ```js,expect_diagnostic\n f(0), {}\n ```\n\n ```js,expect_diagnostic\n a && b()\n ```\n\n ```js,expect_diagnostic\n a, b()\n ```\n\n ```js,expect_diagnostic\n c = a, b\n ```\n\n ```js,expect_diagnostic\n a() && function namedFunctionInExpressionContext () {f();}\n ```\n\n ```js,expect_diagnostic\n (function anIncompleteIIFE () {});\n ```\n\n ```js,expect_diagnostic\n injectGlobal`body{ color: red; }`\n ```\n\n ```ts,expect_diagnostic\n Set\n ```\n\n ```ts,expect_diagnostic\n 1 as number\n ```\n\n ```ts,expect_diagnostic\n window!\n ```\n\n JSX expressions are considered invalid when used as a statement too:\n\n ```jsx,expect_diagnostic\n \n ```\n\n ```jsx,expect_diagnostic\n <>\n ```\n\n ### Valid\n\n ```js\n {} // In this context, this is a block statement, not an object literal\n\n { myLabel: foo() } // In this context, this is a block statement with a label and expression, not an object literal\n\n function namedFunctionDeclaration () {}\n\n (function aGenuineIIFE () {}());\n\n f()\n\n a = 0\n\n new C\n\n delete a.b\n\n void a\n ```\n\n ### Handling of Directives\n\n Any stand-alone string at the start of a script, module, or function is\n considered a directive and is therefore allowed.\n\n ```js\n \"use strict\";\n \"use asm\"\n \"use stricter\";\n \"use babel\"\n \"any other strings like this in the directive prologue\";\n \"this is still the directive prologue\";\n\n function foo() {\n \"bar\";\n }\n\n class Foo {\n someMethod() {\n \"use strict\";\n }\n }\n ```\n\n The following are **not** considered valid directives:\n\n ```js,expect_diagnostic\n doSomething();\n \"use strict\"; // this isn't in a directive prologue, because there is a non-directive statement before it\n ```\n\n ```js,expect_diagnostic\n function foo() {\n \"bar\" + 1;\n }\n ```\n\n ```js,expect_diagnostic\n class Foo {\n static {\n \"use strict\"; // class static blocks do not have directive prologues\n }\n }\n ```\n" - }, - "noUselessCatchBinding": { - "deprecated": false, - "version": "2.2.3", - "name": "noUselessCatchBinding", - "link": "https://biomejs.dev/linter/rules/no-useless-catch-binding", - "recommended": false, - "fixKind": "unsafe", - "docs": " Disallow unused catch bindings.\n\n This rule disallows unnecessary catch bindings in accordance with ECMAScript 2019.\n See also: the ECMAScript 2019 “optional catch binding” feature in the language specification.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n try {\n // Do something\n } catch (unused) {}\n ```\n\n ```js,expect_diagnostic\n try {\n // Do something\n } catch ({ unused }) {}\n ```\n\n ```js,expect_diagnostic\n try {\n // Do something\n } catch ({ unused1, unused2 }) {}\n ```\n\n ### Valid\n\n ```js\n try {\n // Do something\n } catch (used) {\n console.error(used);\n }\n ```\n\n ```js\n try {\n // Do something\n } catch ({ used }) {\n console.error(used);\n }\n ```\n\n ```js\n try {\n // Do something\n } catch ({ used, unused }) {\n console.error(used);\n }\n ```\n\n ```js\n try {\n // Do something\n } catch {}\n ```\n\n" - }, "noUselessReturn": { "deprecated": false, "version": "2.3.15", @@ -3474,23 +3514,6 @@ export function GET() { ], "docs": " Disallow redundant return statements.\n\n A `return;` statement with nothing after it is redundant when it is the\n last reachable statement in a function body. Removing it does not change\n the function's behavior, as execution naturally falls through to the end.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n function foo() {\n return;\n }\n ```\n\n ```js,expect_diagnostic\n function foo() {\n doSomething();\n return;\n }\n ```\n\n ```js,expect_diagnostic\n function foo() {\n if (condition) {\n bar();\n return;\n }\n }\n ```\n\n ### Valid\n\n ```js\n function foo() {\n return 5;\n }\n ```\n\n ```js\n function foo() {\n if (condition) {\n return;\n }\n bar();\n }\n ```\n\n ```js\n function foo() {\n for (const x of xs) {\n return;\n }\n }\n ```\n\n" }, - "noUselessUndefined": { - "deprecated": false, - "version": "2.0.0", - "name": "noUselessUndefined", - "link": "https://biomejs.dev/linter/rules/no-useless-undefined", - "recommended": false, - "fixKind": "safe", - "sources": [ - { - "kind": "sameLogic", - "source": { - "eslintUnicorn": "no-useless-undefined" - } - } - ], - "docs": " Disallow the use of useless `undefined`.\n\n `undefined` is the default value for new variables, parameters, return statements, etc., so specifying it doesn't make any difference.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n let foo = undefined;\n ```\n\n ```js,expect_diagnostic\n const {foo = undefined} = bar;\n ```\n\n ```js,expect_diagnostic\n function foo() {\n return undefined;\n }\n ```\n\n ```js,expect_diagnostic\n function* foo() {\n yield undefined;\n }\n ```\n\n ```js,expect_diagnostic\n function foo(bar = undefined) {}\n ```\n\n ```js,expect_diagnostic\n function foo({bar = undefined}) {}\n ```\n\n ### Valid\n\n ```js\n let foo;\n const {foo} = bar;\n function foo() {\n return;\n }\n function* foo() {\n yield;\n }\n function foo(bar) {}\n function foo({bar}) {}\n foo();\n ```\n\n" - }, "noVueArrowFuncInWatch": { "deprecated": false, "version": "2.3.14", @@ -3508,46 +3531,6 @@ export function GET() { ], "docs": " Disallows using arrow functions when defining a watcher.\n\n When using the Options API in Vue.js, defining watchers with arrow functions is discouraged. This is because arrow functions bind to their parent context, which means that the `this` keyword inside the arrow function does not refer to the Vue instance as expected. Instead, it refers to the context in which the arrow function was defined, which can be confusing.\n\n ## Examples\n\n ### Invalid\n\n ```vue,expect_diagnostic\n \n ```\n\n ```vue,expect_diagnostic\n \n ```\n\n ### Valid\n\n ```vue\n \n ```\n\n References:\n - https://vuejs.org/api/options-state.html#watch\n\n" }, - "noVueDataObjectDeclaration": { - "deprecated": false, - "version": "2.1.4", - "name": "noVueDataObjectDeclaration", - "link": "https://biomejs.dev/linter/rules/no-vue-data-object-declaration", - "recommended": true, - "fixKind": "safe", - "sources": [ - { - "kind": "inspired", - "source": { - "eslintVueJs": "no-deprecated-data-object-declaration" - } - }, - { - "kind": "inspired", - "source": { - "eslintVueJs": "no-shared-component-data" - } - } - ], - "docs": " Enforce that Vue component `data` options are declared as functions.\n\n In Vue 3+, defining `data` as an object is deprecated because it leads to shared mutable state across component instances.\n This rule flags usages of `data: { … }` and offers an automatic fix to convert it into a function returning that object.\n\n See also:\n – Vue Migration Guide – Data Option: https://v3-migration.vuejs.org/breaking-changes/data-option.html :contentReference[oaicite:0]{index=0}\n – ESLint Plugin Vue: `no-deprecated-data-object-declaration`: https://eslint.vuejs.org/rules/no-deprecated-data-object-declaration :contentReference[oaicite:1]{index=1}\n\n ## Examples\n\n ### Invalid\n\n ```js\n // component-local data via function\n export default {\n /* ✗ BAD */\n data: { foo: null },\n };\n ```\n\n ```js\n // Composition API helper also deprecated\n defineComponent({\n /* ✗ BAD */\n data: { message: 'hi' }\n });\n ```\n\n ```js\n // Vue 3 entrypoint via createApp\n createApp({\n /* ✗ BAD */\n data: { active: true }\n }).mount('#app');\n ```\n\n ### Valid\n\n ```js\n // component-local data via function\n export default {\n /* ✓ GOOD */\n data() {\n return { foo: null };\n }\n };\n ```\n\n ```js\n // global registration with function syntax\n Vue.component('my-comp', {\n /* ✓ GOOD */\n data: function () {\n return { count: 0 };\n }\n });\n ```\n\n ```js\n // Composition API and createApp entrypoints\n defineComponent({\n /* ✓ GOOD */\n data() {\n return { message: 'hi' };\n }\n });\n\n createApp({\n /* ✓ GOOD */\n data: function() {\n return { active: true };\n }\n }).mount('#app');\n ```\n\n" - }, - "noVueDuplicateKeys": { - "deprecated": false, - "version": "2.2.5", - "name": "noVueDuplicateKeys", - "link": "https://biomejs.dev/linter/rules/no-vue-duplicate-keys", - "recommended": true, - "fixKind": "none", - "sources": [ - { - "kind": "sameLogic", - "source": { - "eslintVueJs": "no-dupe-keys" - } - } - ], - "docs": " Disallow duplicate keys in Vue component data, methods, computed properties, and other options.\n\n This rule prevents the use of duplicate keys across different Vue component options\n such as `props`, `data`, `computed`, `methods`, and `setup`. Even if keys don't conflict\n in the script tag, they may cause issues in the template since Vue allows direct\n access to these keys.\n\n ## Examples\n\n ### Invalid\n\n ```vue,expect_diagnostic\n \n ```\n\n ```vue,expect_diagnostic\n \n ```\n\n ```vue,expect_diagnostic\n \n ```\n\n ### Valid\n\n ```vue\n \n ```\n\n ```vue\n \n ```\n\n" - }, "noVueOptionsApi": { "deprecated": false, "version": "2.3.12", @@ -3557,57 +3540,6 @@ export function GET() { "fixKind": "none", "docs": " Disallow the use of Vue Options API.\n\n Vue 3.6's Vapor Mode does not support the Options API.\n Components must use the Composition API (`\n ```\n\n ```vue,expect_diagnostic\n \n ```\n\n ```vue,expect_diagnostic\n \n ```\n\n ```vue,expect_diagnostic\n \n ```\n\n ```js,expect_diagnostic\n import { defineComponent } from 'vue'\n\n defineComponent({\n name: 'MyComponent',\n data() {\n return { count: 0 }\n }\n })\n ```\n\n ### Valid\n\n ```vue\n \n ```\n\n ```vue\n \n ```\n\n ```vue\n \n ```\n\n ## Related Rules\n\n - [useVueVapor](https://biomejs.dev/linter/rules/use-vue-vapor): Enforces the use of Vapor mode in Vue components\n\n ## Resources\n\n - [Vue 3 Composition API](https://vuejs.org/api/composition-api-setup.html)\n - [Options API vs Composition API](https://vuejs.org/guide/introduction.html#api-styles)\n\n" }, - "noVueReservedKeys": { - "deprecated": false, - "version": "2.1.3", - "name": "noVueReservedKeys", - "link": "https://biomejs.dev/linter/rules/no-vue-reserved-keys", - "recommended": true, - "fixKind": "none", - "sources": [ - { - "kind": "sameLogic", - "source": { - "eslintVueJs": "no-reserved-keys" - } - } - ], - "docs": " Disallow reserved keys in Vue component data and computed properties.\n\n Vue reserves certain keys for its internal use. Using these reserved keys\n in data properties, computed properties, methods, or other component options\n can cause conflicts and unpredictable behavior in your Vue components.\n\n This rule prevents the use of Vue reserved keys such as:\n - Keys starting with `$` (e.g., `$el`, `$data`, `$props`, `$refs`, etc.)\n - Keys starting with `_` in data properties (reserved for Vue internals)\n\n ## Examples\n\n ### Invalid\n\n ```vue,expect_diagnostic\n \n ```\n\n ```vue,expect_diagnostic\n \n ```\n\n ```vue,expect_diagnostic\n \n ```\n\n ```vue,expect_diagnostic\n \n ```\n\n ### Valid\n\n ```vue\n \n ```\n\n ```vue\n \n ```\n\n" - }, - "noVueReservedProps": { - "deprecated": false, - "version": "2.1.2", - "name": "noVueReservedProps", - "link": "https://biomejs.dev/linter/rules/no-vue-reserved-props", - "recommended": true, - "fixKind": "none", - "sources": [ - { - "kind": "sameLogic", - "source": { - "eslintVueJs": "no-reserved-props" - } - } - ], - "docs": " Disallow reserved names to be used as props.\n\n Vue reserves certain prop names for its internal use. Using these reserved names\n as prop names can cause conflicts and unexpected behavior in your Vue components.\n\n This rule prevents the use of the following reserved prop names:\n - `key` - Used by Vue for list rendering and component identification\n - `ref` - Used by Vue for template refs\n\n ## Examples\n\n ### Invalid\n\n ```vue,expect_diagnostic\n \n ```\n\n ```js,expect_diagnostic\n import {defineComponent} from 'vue';\n\n export default defineComponent({\n props: [\n 'key',\n ]\n });\n ```\n\n ```vue,expect_diagnostic\n \n ```\n\n ```vue,expect_diagnostic\n \n ```\n\n ### Valid\n\n ```js\n import {defineComponent} from 'vue';\n\n export default defineComponent({\n props: ['foo']\n });\n ```\n\n ```vue\n \n ```\n\n ```vue\n \n ```\n\n ```vue\n \n ```\n\n" - }, - "noVueSetupPropsReactivityLoss": { - "deprecated": false, - "version": "2.2.6", - "name": "noVueSetupPropsReactivityLoss", - "link": "https://biomejs.dev/linter/rules/no-vue-setup-props-reactivity-loss", - "recommended": false, - "fixKind": "none", - "sources": [ - { - "kind": "inspired", - "source": { - "eslintVueJs": "no-setup-props-reactivity-loss" - } - } - ], - "docs": " Disallow destructuring of `props` passed to `setup` in Vue projects.\n\n In Vue's Composition API, props must be accessed as `props.propertyName` to maintain\n reactivity. Destructuring `props` directly in the `setup` function parameters will\n cause the resulting variables to lose their reactive nature.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n export default {\n setup({ count }) {\n return () => h('div', count);\n }\n }\n ```\n\n ### Valid\n\n ```js\n export default {\n setup(props) {\n return () => h('div', props.count);\n }\n }\n ```\n\n" - }, "useArraySortCompare": { "deprecated": false, "version": "2.3.5", @@ -3642,23 +3574,6 @@ export function GET() { ], "docs": " Enforce that `await` is _only_ used on `Promise` values.\n\n :::caution\n At the moment, this rule only checks for instances of the global\n `Promise` class. This is a major shortcoming compared to the ESLint\n rule if you are using custom `Promise`-like implementations such as\n [Bluebird](http://bluebirdjs.com/) or in-house solutions.\n :::\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic,file=invalid-primitive.js\n await 'value';\n ```\n\n ```js,expect_diagnostic,file=invalid-function-call.js\n const createValue = () => 'value';\n await createValue();\n ```\n\n ### Valid\n\n ```js,file=valid-examples.js\n await Promise.resolve('value');\n\n const createValue = async () => 'value';\n await createValue();\n ```\n\n" }, - "useConsistentArrowReturn": { - "deprecated": false, - "version": "2.2.3", - "name": "useConsistentArrowReturn", - "link": "https://biomejs.dev/linter/rules/use-consistent-arrow-return", - "recommended": false, - "fixKind": "safe", - "sources": [ - { - "kind": "sameLogic", - "source": { - "eslint": "arrow-body-style" - } - } - ], - "docs": " Enforce consistent arrow function bodies.\n\n This rule enforces the use of arrow functions with no body block when the function body consists of a single return statement.\n This rule does not report when:\n - the function body contains directives (e.g. `\"use strict\"`), or\n - the body (or its descendants) contain comments, or\n - the single `return` has no argument (`return;`).\n\n The fix wraps expressions in parentheses when required for correctness (e.g. object literals and sequence expressions).\n\n ## Examples\n\n ### Invalid\n\n```js,expect_diagnostic\n const bar = () => {\n return {\n bar: {\n foo: 1,\n bar: 2,\n }\n };\n };\n ```\n\n ### Valid\n\n ```js\n const foo = () => 0;\n const bar = () => { \"use strict\"; return 1 }\n const baz = () => { /* intentional */ return x }\n const qux = () => ({ a: 1 }) // already concise with parens\n ```\n\n" - }, "useDestructuring": { "deprecated": false, "version": "2.3.9", @@ -3744,35 +3659,6 @@ export function GET() { ], "docs": " Enforce the use of `globalThis` over `window`, `self`, and `global`.\n\n `globalThis` is a standard way to access the global object across platforms such as browsers, Web Workers, Node.js and so on, and using it can make your code portable.\n\n However, there are several exceptions that are allowed:\n\n 1. Certain window/Web Workers-specific APIs, such as `window.innerHeight` and `self.postMessage`\n 2. Window-specific events, such as `window.addEventListener('resize')`\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n window.foo;\n ```\n\n ```js,expect_diagnostic\n window.addEventListener('click', () => {});\n ```\n\n ### Valid\n\n ```js\n globalThis.foo;\n ```\n\n ```js\n globalThis.addEventListener('click', () => {});\n ```\n\n ```js\n // window/Web Workers-specific APIs are allowed\n window.innerWidth;\n self.postMessage({ type: 'ready' });\n ```\n\n ```js\n // window-specific events are allowed\n window.addEventListener('resize', () => {});\n ```\n\n" }, - "useMaxParams": { - "deprecated": false, - "version": "2.2.0", - "name": "useMaxParams", - "link": "https://biomejs.dev/linter/rules/use-max-params", - "recommended": false, - "fixKind": "none", - "sources": [ - { - "kind": "sameLogic", - "source": { - "eslint": "max-params" - } - }, - { - "kind": "sameLogic", - "source": { - "clippy": "too_many_arguments" - } - }, - { - "kind": "sameLogic", - "source": { - "eslintTypeScript": "max-params" - } - } - ], - "docs": " Enforce a maximum number of parameters in function definitions.\n\n Functions that take numerous parameters can be difficult to read and write\n because it requires the memorization of what each parameter is, its type,\n and the order they should appear in.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n function foo(a, b, c, d, e, f, g, h) {\n // too many parameters\n }\n ```\n\n ```js,expect_diagnostic\n const bar = (a, b, c, d, e, f, g, h) => {\n // too many parameters\n }\n ```\n\n ```js,expect_diagnostic\n class Baz {\n method(a, b, c, d, e, f, g, h) {\n // too many parameters\n }\n }\n ```\n\n ### Valid\n\n ```js\n function foo(a, b, c) {\n // within limit\n }\n ```\n\n ```js\n const bar = (a, b, c) => {\n // within limit\n }\n ```\n\n ```js\n class Baz {\n method(a, b, c) {\n // within limit\n }\n }\n ```\n\n ## Options\n\n ### max\n\n The maximum number of parameters allowed (default: 4).\n\n" - }, "useRegexpExec": { "deprecated": false, "version": "2.3.9", @@ -4407,6 +4293,23 @@ export function GET() { ], "docs": " Enforce using single `if` instead of nested `if` clauses.\n\n If an `if (b)` statement is the only statement in an `if (a)` block, it is often clearer to use an `if (a && b)` form.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n if (condition) {\n if (anotherCondition) {\n // ...\n }\n }\n ```\n\n ```js,expect_diagnostic\n if (condition) {\n // Comment\n if (anotherCondition) {\n // ...\n }\n }\n ```\n\n ### Valid\n\n ```js\n if (condition && anotherCondition) {\n // ...\n }\n ```\n\n ```js\n if (condition) {\n if (anotherCondition) {\n // ...\n }\n doSomething();\n }\n ```\n\n ```js\n if (condition) {\n if (anotherCondition) {\n // ...\n } else {\n // ...\n }\n }\n ```\n\n" }, + "useConsistentArrowReturn": { + "deprecated": false, + "version": "2.2.3", + "name": "useConsistentArrowReturn", + "link": "https://biomejs.dev/linter/rules/use-consistent-arrow-return", + "recommended": false, + "fixKind": "safe", + "sources": [ + { + "kind": "sameLogic", + "source": { + "eslint": "arrow-body-style" + } + } + ], + "docs": " Enforce consistent arrow function bodies.\n\n This rule enforces the use of arrow functions with no body block when the function body consists of a single return statement.\n This rule does not report when:\n - the function body contains directives (e.g. `\"use strict\"`), or\n - the body (or its descendants) contain comments, or\n - the single `return` has no argument (`return;`).\n\n The fix wraps expressions in parentheses when required for correctness (e.g. object literals and sequence expressions).\n\n ## Examples\n\n ### Invalid\n\n```js,expect_diagnostic\n const bar = () => {\n return {\n bar: {\n foo: 1,\n bar: 2,\n }\n };\n };\n ```\n\n ### Valid\n\n ```js\n const foo = () => 0;\n const bar = () => { \"use strict\"; return 1 }\n const baz = () => { /* intentional */ return x }\n const qux = () => ({ a: 1 }) // already concise with parens\n ```\n\n" + }, "useConsistentBuiltinInstantiation": { "deprecated": false, "version": "1.7.2", @@ -5072,6 +4975,29 @@ export function GET() { ], "docs": " Disallow the use of `debugger`\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n debugger;\n ```\n\n ### Valid\n\n ```js\n const test = { debugger: 1 };\n test.debugger;\n```\n" }, + "noDeprecatedImports": { + "deprecated": false, + "version": "2.2.5", + "name": "noDeprecatedImports", + "link": "https://biomejs.dev/linter/rules/no-deprecated-imports", + "recommended": false, + "fixKind": "none", + "sources": [ + { + "kind": "inspired", + "source": { + "eslintTypeScript": "no-deprecated" + } + }, + { + "kind": "inspired", + "source": { + "eslintImport": "no-deprecated" + } + } + ], + "docs": " Restrict imports of deprecated exports.\n\n This rule flags any imports for symbols (such as types, functions, or\n anything else that can be imported), that are documented with a JSDoc\n comment that contains an \"@deprecated\" annotation.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic,file=foo.js\n import { oldUtility } from \"./utils.js\";\n ```\n\n ```js,file=utils.js\n /**\n * @deprecated\n */\n export function oldUtility() {}\n ```\n\n ### Valid\n\n ```js,file=foo.js\n import { newUtility, oldUtility } from \"./utils.js\";\n ```\n\n ```js,file=utils.js\n export function newUtility() {}\n\n // @deprecated (this is not a JSDoc comment)\n export function oldUtility() {}\n ```\n\n" + }, "noDocumentCookie": { "deprecated": false, "version": "1.9.4", @@ -5255,6 +5181,23 @@ export function GET() { ], "docs": " Disallow empty block statements and static blocks.\n\n Empty static blocks and block statements, while not technically errors, usually occur due to refactoring that wasn’t completed. They can cause confusion when reading code.\n\n This rule disallows empty block statements and static blocks.\n This rule ignores block statements or static blocks which contain a comment (for example, in an empty catch or finally block of a try statement to indicate that execution should continue regardless of errors).\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n function emptyFunctionBody () {}\n ```\n\n ```js,expect_diagnostic\n try {\n doSomething();\n } catch(ex) {\n\n }\n ```\n\n ```js,expect_diagnostic\n class Foo {\n static {}\n }\n ```\n\n ### Valid\n\n ```js\n function foo () {\n doSomething();\n }\n ```\n\n ```js\n try {\n doSomething();\n } catch (ex) {\n // continue regardless of error\n }\n ```\n\n" }, + "noEmptySource": { + "deprecated": false, + "version": "2.2.7", + "name": "noEmptySource", + "link": "https://biomejs.dev/linter/rules/no-empty-source", + "recommended": false, + "fixKind": "none", + "sources": [ + { + "kind": "sameLogic", + "source": { + "eslintUnicorn": "no-empty-file" + } + } + ], + "docs": " Disallow empty sources.\n\n A source containing only the following is considered empty:\n - Whitespace (spaces, tabs or newlines)\n - Comments\n - Directives\n - Empty statements\n - Empty block statements\n - Hashbang\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n\n ```\n\n ```js,expect_diagnostic\n // Only comments\n ```\n\n ```js,expect_diagnostic\n /* Only comments */\n ```\n\n ```js,expect_diagnostic\n 'use strict';\n ```\n\n ```js,expect_diagnostic\n ;\n ```\n\n ```js,expect_diagnostic\n {\n }\n ```\n\n ```js,expect_diagnostic\n #!/usr/bin/env node\n ```\n\n ### Valid\n\n ```js\n const x = 0;\n ```\n\n ```js\n 'use strict';\n const x = 0;\n ```\n\n ```js\n ;;\n const x = 0;\n ```\n\n ```js\n {\n const x = 0;\n }\n ```\n\n ## Options\n\n ### `allowComments`\n\n Whether the comments should be marked as meaningful.\n When this option has been set to `true`, a file with only comments is considered valid.\n\n Default `false`\n\n ```json,options\n {\n \"options\": {\n \"allowComments\": true\n }\n }\n ```\n\n #### Invalid\n\n ```js,expect_diagnostic,use_options\n\n ```\n\n #### Valid\n\n ```js,use_options\n /* Only comments */\n ```\n\n" + }, "noExportsInTest": { "deprecated": false, "version": "1.6.0", @@ -5381,6 +5324,23 @@ export function GET() { ], "docs": " Disallow assigning to imported bindings\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n import x from \"y\";\n x = 1;\n ```\n ```js,expect_diagnostic\n import y from \"y\";\n [y] = 1;\n ```\n ```js,expect_diagnostic\n import z from \"y\";\n ({ z } = 1);\n ```\n ```js,expect_diagnostic\n import a from \"y\";\n [...a] = 1;\n ```\n ```js,expect_diagnostic\n import b from \"y\";\n ({ ...b } = 1);\n ```\n ```js,expect_diagnostic\n import c from \"y\";\n for (c in y) {};\n ```\n\n ```js,expect_diagnostic\n import d from \"y\";\n d += 1;\n ```\n ```js,expect_diagnostic\n import * as e from \"y\";\n e = 1;\n ```\n" }, + "noImportCycles": { + "deprecated": false, + "version": "2.0.0", + "name": "noImportCycles", + "link": "https://biomejs.dev/linter/rules/no-import-cycles", + "recommended": false, + "fixKind": "none", + "sources": [ + { + "kind": "sameLogic", + "source": { + "eslintImport": "no-cycle" + } + } + ], + "docs": " Prevent import cycles.\n\n This rule warns when a file imports another file that, either directly\n or indirectly, imports the original file again.\n\n Cycles can lead to symbols that are unexpectedly `undefined` and are\n generally considered poor code hygiene.\n\n If a cycle is detected, it is advised to move code such that imports\n only go in a single direction, i.e. they don't point \"back\" to the\n importing file.\n\n However, files that import themselves are allowed, and the rule won't trigger for these use cases.\n This allows for encapsulation of functions/variables into a namespace instead of using a\n static class (triggers [noStaticOnlyClass](https://biomejs.dev/linter/rules/no-static-only-class)).\n\n :::note\n This rule is computationally expensive. If you are particularly\n pressed for lint time, or don't think you have an issue with dependency\n cycles, you may not want this rule enabled.\n :::\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic,file=foobar.js\n import { baz } from \"./baz.js\";\n\n export function foo() {\n baz();\n }\n\n export function bar() {\n console.log(\"foobar\");\n }\n ```\n\n ```js,expect_diagnostic,file=baz.js\n import { bar } from \"./foobar.js\";\n\n export function baz() {\n bar();\n }\n ```\n\n ### Valid\n\n ```js,file=foo.js\n import { baz } from \"./baz.js\";\n\n export function foo() {\n baz();\n }\n ```\n\n ```js,file=bar.js\n export function bar() {\n console.log(\"foobar\");\n }\n ```\n\n ```js,file=baz.js\n import { bar } from \"./bar.js\";\n\n export function baz() {\n bar();\n }\n ```\n\n ```js,file=foobaz.js\n export function foo() {\n console.log(\"foobaz\");\n }\n\n export * as baz from './foobaz.js';\n\n import { baz } from './foobaz.js';\n ```\n\n ```ts,file=types.ts\n import type { bar } from \"./qux.ts\";\n\n export type Foo = {\n bar: typeof bar;\n };\n ```\n\n ```ts,file=qux.ts\n import type { Foo } from \"./types.ts\";\n\n export function bar(foo: Foo) {\n console.log(foo);\n }\n ```\n\n ## Options\n\n The rule provides the options described below.\n\n ### `ignoreTypes`\n\n Ignores type-only imports when finding an import cycle. A type-only import (`import type`)\n will be removed by the compiler, so it cuts an import cycle at runtime. Note that named type\n imports (`import { type Foo }`) aren't considered as type-only because it's not removed by\n the compiler if the `verbatimModuleSyntax` option is enabled. Enabled by default.\n\n ```json,options\n {\n \"options\": {\n \"ignoreTypes\": false\n }\n }\n ```\n\n #### Invalid\n\n ```ts,file=types.ts\n import type { bar } from \"./qux.ts\";\n\n export type Foo = {\n bar: typeof bar;\n };\n ```\n\n ```ts,use_options,expect_diagnostic,file=qux.ts\n import type { Foo } from \"./types.ts\";\n\n export function bar(foo: Foo) {\n console.log(foo);\n }\n ```\n" + }, "noIrregularWhitespace": { "deprecated": false, "version": "1.9.0", @@ -5535,6 +5495,29 @@ export function GET() { ], "docs": " Disallow direct use of `Object.prototype` builtins.\n\n ECMAScript 5.1 added `Object.create` which allows the creation of an object with a custom prototype.\n This pattern is often used for objects used as Maps. However, this pattern can lead to errors\n if something else relies on prototype properties/methods.\n Moreover, the methods could be shadowed, this can lead to random bugs and denial of service\n vulnerabilities. For example, calling `hasOwnProperty` directly on parsed JSON like `{\"hasOwnProperty\": 1}` could lead to vulnerabilities.\n To avoid subtle bugs like this, you should call these methods from `Object.prototype`.\n For example, `foo.isPrototypeOf(bar)` should be replaced with `Object.prototype.isPrototypeOf.call(foo, \"bar\")`\n As for the `hasOwn` method, `foo.hasOwn(\"bar\")` should be replaced with `Object.hasOwn(foo, \"bar\")`.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n var invalid = foo.hasOwnProperty(\"bar\");\n ```\n\n ```js,expect_diagnostic\n var invalid = foo.isPrototypeOf(bar);\n ```\n\n ```js,expect_diagnostic\n var invalid = foo.propertyIsEnumerable(\"bar\");\n ```\n\n ```js,expect_diagnostic\n Object.hasOwnProperty.call(foo, \"bar\");\n ```\n\n ### Valid\n\n ```js\n var valid = Object.hasOwn(foo, \"bar\");\n var valid = Object.prototype.isPrototypeOf.call(foo, bar);\n var valid = {}.propertyIsEnumerable.call(foo, \"bar\");\n ```\n\n" }, + "noReactForwardRef": { + "deprecated": false, + "version": "2.2.5", + "name": "noReactForwardRef", + "link": "https://biomejs.dev/linter/rules/no-react-forward-ref", + "recommended": false, + "fixKind": "unsafe", + "sources": [ + { + "kind": "sameLogic", + "source": { + "eslintReactX": "no-forward-ref" + } + }, + { + "kind": "sameLogic", + "source": { + "eslintReactXyz": "no-forward-ref" + } + } + ], + "docs": " Replaces usages of `forwardRef` with passing `ref` as a prop.\n\n In React 19, `forwardRef` is no longer necessary. Pass `ref` as a prop instead.\n This rule detects the usage of the `forwardRef` API, and it suggests using the prop `ref`\n instead.\n See [the official blog post](https://react.dev/blog/2024/12/05/react-19#ref-as-a-prop) for details.\n\n This rule should be disabled if you are working with React 18 or earlier.\n\n ## Examples\n\n ### Invalid\n\n ```jsx,expect_diagnostic\n import { forwardRef } from \"react\";\n\n const MyInput = forwardRef(function MyInput(props, ref) {\n return ;\n });\n ```\n\n ```jsx,expect_diagnostic\n import { forwardRef } from \"react\";\n\n const MyInput = forwardRef((props, ref) => {\n return ;\n });\n ```\n\n ### Valid\n\n ```jsx\n function MyInput({ ref, ...props }) {\n return ;\n }\n ```\n\n ```jsx\n const MyInput = ({ ref, ...props }) => {\n return ;\n }\n ```\n\n" + }, "noReactSpecificProps": { "deprecated": false, "version": "1.7.2", @@ -5755,6 +5738,23 @@ export function GET() { ], "docs": " Disallow using unsafe negation.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n !1 in [1,2];\n ```\n\n ```js,expect_diagnostic\n /**test*/!/** test*/1 instanceof [1,2];\n ```\n\n ### Valid\n ```js\n -1 in [1,2];\n ~1 in [1,2];\n typeof 1 in [1,2];\n void 1 in [1,2];\n delete 1 in [1,2];\n +1 instanceof [1,2];\n ```\n" }, + "noUnusedExpressions": { + "deprecated": false, + "version": "2.2.5", + "name": "noUnusedExpressions", + "link": "https://biomejs.dev/linter/rules/no-unused-expressions", + "recommended": false, + "fixKind": "none", + "sources": [ + { + "kind": "sameLogic", + "source": { + "eslint": "no-unused-expressions" + } + } + ], + "docs": " Disallow expression statements that are neither a function call nor an\n assignment.\n\n When an expression is used as a statement, it should be explicitly clear\n what the intention behind the expression is. This is clear for function\n calls and assignments, because the call or the assignment itself is the\n primary intention behind the statement. For other expression kinds, the\n intention is much more ambiguous; it could be the expression contains\n side-effects that are not very explicit, but it could also be that it is\n an error where the author forgot to use the result of the expression,\n such as a forgotten `return` keyword, or it could point to a function\n that the author forgot to call.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n 0\n ```\n\n ```js,expect_diagnostic\n if(0) 0\n ```\n\n ```js,expect_diagnostic\n {0}\n ```\n\n ```js,expect_diagnostic\n f(0), {}\n ```\n\n ```js,expect_diagnostic\n a && b()\n ```\n\n ```js,expect_diagnostic\n a, b()\n ```\n\n ```js,expect_diagnostic\n c = a, b\n ```\n\n ```js,expect_diagnostic\n a() && function namedFunctionInExpressionContext () {f();}\n ```\n\n ```js,expect_diagnostic\n (function anIncompleteIIFE () {});\n ```\n\n ```js,expect_diagnostic\n injectGlobal`body{ color: red; }`\n ```\n\n ```ts,expect_diagnostic\n Set\n ```\n\n ```ts,expect_diagnostic\n 1 as number\n ```\n\n ```ts,expect_diagnostic\n window!\n ```\n\n JSX expressions are considered invalid when used as a statement too:\n\n ```jsx,expect_diagnostic\n \n ```\n\n ```jsx,expect_diagnostic\n <>\n ```\n\n ### Valid\n\n ```js\n {} // In this context, this is a block statement, not an object literal\n\n { myLabel: foo() } // In this context, this is a block statement with a label and expression, not an object literal\n\n function namedFunctionDeclaration () {}\n\n (function aGenuineIIFE () {}());\n\n f()\n\n a = 0\n\n new C\n\n delete a.b\n\n void a\n ```\n\n ### Handling of Directives\n\n Any stand-alone string at the start of a script, module, or function is\n considered a directive and is therefore allowed.\n\n ```js\n \"use strict\";\n \"use asm\"\n \"use stricter\";\n \"use babel\"\n \"any other strings like this in the directive prologue\";\n \"this is still the directive prologue\";\n\n function foo() {\n \"bar\";\n }\n\n class Foo {\n someMethod() {\n \"use strict\";\n }\n }\n ```\n\n The following are **not** considered valid directives:\n\n ```js,expect_diagnostic\n doSomething();\n \"use strict\"; // this isn't in a directive prologue, because there is a non-directive statement before it\n ```\n\n ```js,expect_diagnostic\n function foo() {\n \"bar\" + 1;\n }\n ```\n\n ```js,expect_diagnostic\n class Foo {\n static {\n \"use strict\"; // class static blocks do not have directive prologues\n }\n }\n ```\n" + }, "noUselessEscapeInString": { "deprecated": false, "version": "2.0.0", @@ -6002,6 +6002,26 @@ export function GET() { }, "json": { "nursery": { + "useRequiredScripts": { + "deprecated": false, + "version": "2.3.9", + "name": "useRequiredScripts", + "link": "https://biomejs.dev/linter/rules/use-required-scripts", + "recommended": false, + "fixKind": "none", + "docs": " Enforce the presence of required scripts in package.json.\n\n This rule ensures that specified scripts are defined in the `scripts` section of a `package.json` file.\n It's particularly useful in monorepo environments where consistency across workspaces is important.\n\n Without required scripts configured, this rule doesn't do anything.\n\n ## Examples\n\n ### Invalid\n\n ```json,options\n {\n \"options\": {\n \"requiredScripts\": [\"test\", \"build\"]\n }\n }\n ```\n\n ```json,use_options\n {\n \"scripts\": {\n \"test\": \"vitest\"\n }\n }\n ```\n\n ### Valid\n\n ```json,use_options\n {\n \"scripts\": {\n \"test\": \"vitest\",\n \"build\": \"tsc\"\n }\n }\n ```\n\n ## Options\n\n ### `requiredScripts`\n\n An array of script names that must be present in the `scripts` section of `package.json`.\n Default: `[]` (no scripts required)\n\n" + } + }, + "suspicious": { + "noBiomeFirstException": { + "deprecated": false, + "version": "2.2.0", + "name": "noBiomeFirstException", + "link": "https://biomejs.dev/linter/rules/no-biome-first-exception", + "recommended": true, + "fixKind": "safe", + "docs": " Prevents the misuse of glob patterns inside the `files.includes` field.\n\n ## Leading of negated patterns\n If the first pattern of `files.includes` starts with the leading `!`, Biome won't have any file to crawl. Generally,\n it is a good practice to declare the files/folders to include first, and then the files/folder to ignore.\n\n Check the [official documentation](https://biomejs.dev/guides/configure-biome/#exclude-files-via-configuration) for more examples.\n\n ### Examples\n\n #### Invalid\n\n ```json,ignore\n {\n \"files\": {\n \"includes\": [\"!dist\"]\n }\n }\n ```\n\n #### Valid\n\n ```json,ignore\n {\n \"files\": {\n \"includes\": [\"src/**\", \"!dist\"]\n }\n }\n ```\n\n ## Leading with catch-all `**`\n\n If the user configuration file extends from other sources (other configuration files or libraries), and those files contain the catch-all glob `**` in `files.includes`,\n the rule will trigger a violation if also the user configuration file has a `**`.\n\n #### Invalid\n\n ```jsonc,ignore\n // biome.json\n {\n \"extends\": [\"./base.json\"],\n \"files\": {\n \"includes\": [\"**\", \"!**/test\"]\n }\n }\n ```\n\n ```jsonc,ignore\n // base.json\n {\n \"files\": {\n \"includes\": [\"**\", \"!**/dist\"]\n }\n }\n ```\n\n" + }, "noDuplicateDependencies": { "deprecated": false, "version": "2.2.4", @@ -6025,26 +6045,6 @@ export function GET() { ], "docs": " Prevent the listing of duplicate dependencies.\n The rule supports the following dependency groups: \"bundledDependencies\", \"bundleDependencies\", \"dependencies\", \"devDependencies\", \"overrides\", \"optionalDependencies\", and \"peerDependencies\".\n\n Dependencies are not allowed to be listed twice under the same dependency group.\n\n ## Examples\n\n ### Invalid\n\n ```json\n {\n \"dependencies\": {\n \"foo\": \"1.0.0\",\n \"foo\": \"2.0.0\"\n }\n }\n ```\n\n ```json\n {\n \"bundleDependencies\": [\"foo\", \"foo\"]\n }\n ```\n\n ### Valid\n\n ```json\n {\n \"dependencies\": {\n \"foo\": \"2.0.0\"\n }\n }\n ```\n\n ```json\n {\n \"bundleDependencies\": [\"foo\"]\n }\n ```\n\n Some dependency group dependencies are checked against other dependency groups;\n - Dependencies listed in \"dependencies\" cannot be listed under \"devDependencies\", \"optionalDependencies\" or \"peerDependencies\".\n - Dependencies listed in \"optionalDependencies\" cannot be listed under \"peerDependencies\" (and vice versa).\n\n Dependencies listed in \"devDependencies\" are allowed to be listed in \"optionalDependencies\" or \"peerDependencies\".\n And dependencies listed in \"overrides\" & \"bundleDependencies\" are not checked against other dependency groups.\n\n ## Examples\n\n ### Invalid\n\n ```json\n {\n \"dependencies\": {\n \"foo\": \"1.0.0\"\n },\n \"devDependencies\": {\n \"foo\": \"1.0.0\"\n }\n }\n ```\n\n ### Valid\n\n ```json\n {\n \"dependencies\": {\n \"foo\": \"1.0.0\"\n }\n }\n ```\n\n" }, - "useRequiredScripts": { - "deprecated": false, - "version": "2.3.9", - "name": "useRequiredScripts", - "link": "https://biomejs.dev/linter/rules/use-required-scripts", - "recommended": false, - "fixKind": "none", - "docs": " Enforce the presence of required scripts in package.json.\n\n This rule ensures that specified scripts are defined in the `scripts` section of a `package.json` file.\n It's particularly useful in monorepo environments where consistency across workspaces is important.\n\n Without required scripts configured, this rule doesn't do anything.\n\n ## Examples\n\n ### Invalid\n\n ```json,options\n {\n \"options\": {\n \"requiredScripts\": [\"test\", \"build\"]\n }\n }\n ```\n\n ```json,use_options\n {\n \"scripts\": {\n \"test\": \"vitest\"\n }\n }\n ```\n\n ### Valid\n\n ```json,use_options\n {\n \"scripts\": {\n \"test\": \"vitest\",\n \"build\": \"tsc\"\n }\n }\n ```\n\n ## Options\n\n ### `requiredScripts`\n\n An array of script names that must be present in the `scripts` section of `package.json`.\n Default: `[]` (no scripts required)\n\n" - } - }, - "suspicious": { - "noBiomeFirstException": { - "deprecated": false, - "version": "2.2.0", - "name": "noBiomeFirstException", - "link": "https://biomejs.dev/linter/rules/no-biome-first-exception", - "recommended": true, - "fixKind": "safe", - "docs": " Prevents the misuse of glob patterns inside the `files.includes` field.\n\n ## Leading of negated patterns\n If the first pattern of `files.includes` starts with the leading `!`, Biome won't have any file to crawl. Generally,\n it is a good practice to declare the files/folders to include first, and then the files/folder to ignore.\n\n Check the [official documentation](https://biomejs.dev/guides/configure-biome/#exclude-files-via-configuration) for more examples.\n\n ### Examples\n\n #### Invalid\n\n ```json,ignore\n {\n \"files\": {\n \"includes\": [\"!dist\"]\n }\n }\n ```\n\n #### Valid\n\n ```json,ignore\n {\n \"files\": {\n \"includes\": [\"src/**\", \"!dist\"]\n }\n }\n ```\n\n ## Leading with catch-all `**`\n\n If the user configuration file extends from other sources (other configuration files or libraries), and those files contain the catch-all glob `**` in `files.includes`,\n the rule will trigger a violation if also the user configuration file has a `**`.\n\n #### Invalid\n\n ```jsonc,ignore\n // biome.json\n {\n \"extends\": [\"./base.json\"],\n \"files\": {\n \"includes\": [\"**\", \"!**/test\"]\n }\n }\n ```\n\n ```jsonc,ignore\n // base.json\n {\n \"files\": {\n \"includes\": [\"**\", \"!**/dist\"]\n }\n }\n ```\n\n" - }, "noDuplicateObjectKeys": { "deprecated": false, "version": "1.0.0", @@ -6321,7 +6321,7 @@ export function GET() { "link": "https://biomejs.dev/linter/rules/no-svg-without-title", "recommended": true, "fixKind": "none", - "docs": " Enforces the usage of the `title` element for the `svg` element.\n\n It is not possible to specify the `alt` attribute for the `svg` as for the `img`.\n To make svg accessible, the following methods are available:\n - provide the `title` element as the first child to `svg`\n - provide `role=\"img\"` and `aria-label` or `aria-labelledby` to `svg`\n\n ## Examples\n\n ### Invalid\n\n ```jsx,expect_diagnostic\n foo\n ```\n\n ```jsx,expect_diagnostic\n \n \n \n \n ```\n\n ```jsx,expect_diagnostic\n foo\n ```\n\n ```jsx,expect_diagnostic\n \n \n \n \n foo\n \n \n \n \n ```\n\n ```jsx,expect_diagnostic\n \n ```\n\n ### Valid\n\n\n ```jsx\n \n Pass\n \n \n ```\n\n ```jsx\n \n Pass\n \n ```\n\n ```jsx\n \n Pass\n \n ```\n\n ```jsx\n \n Pass\n \n \n ```\n\n ```jsx\n \n ```\n\n ```jsx\n \n ```\n\n ```jsx\n \n Pass\n \n ```\n\n ```jsx\n foo\n ```\n\n\n ## Accessibility guidelines\n [Document Structure – SVG 1.1 (Second Edition)](https://www.w3.org/TR/SVG11/struct.html#DescriptionAndTitleElements)\n [ARIA: img role - Accessibility | MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/img_role)\n [Accessible SVGs | CSS-Tricks - CSS-Tricks](https://css-tricks.com/accessible-svgs/)\n [Contextually Marking up accessible images and SVGs | scottohara.me](https://www.scottohara.me/blog/2019/05/22/contextual-images-svgs-and-a11y.html)\n [Accessible SVGs](https://www.unimelb.edu.au/accessibility/techniques/accessible-svgs)\n\n" + "docs": " Enforces the usage of the `title` element for the `svg` element.\n\n It is not possible to specify the `alt` attribute for the `svg` as for the `img`.\n To make svg accessible, the following methods are available:\n - provide the `title` element as the first child to `svg`\n - provide `role=\"img\"` and `aria-label` or `aria-labelledby` to `svg`\n\n ## Examples\n\n ### Invalid\n\n ```jsx,expect_diagnostic\n foo\n ```\n\n ```jsx,expect_diagnostic\n \n \n \n \n ```\n\n ```jsx,expect_diagnostic\n foo\n ```\n\n ```jsx,expect_diagnostic\n \n \n \n \n foo\n \n \n \n \n ```\n\n ```jsx,expect_diagnostic\n \n ```\n\n ### Valid\n\n\n ```jsx\n \n Pass\n \n \n ```\n\n ```jsx\n \n Pass\n \n ```\n\n ```jsx\n \n Pass\n \n ```\n\n ```jsx\n \n Pass\n \n \n ```\n\n ```jsx\n \n ```\n\n ```jsx\n \n Pass\n \n ```\n\n ```jsx\n foo\n ```\n\n\n ## Accessibility guidelines\n [Document Structure – SVG 1.1 (Second Edition)](https://www.w3.org/TR/SVG11/struct.html#DescriptionAndTitleElements)\n [ARIA: img role - Accessibility | MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/img_role)\n [Accessible SVGs | CSS-Tricks - CSS-Tricks](https://css-tricks.com/accessible-svgs/)\n [Contextually Marking up accessible images and SVGs | scottohara.me](https://www.scottohara.me/blog/2019/05/22/contextual-images-svgs-and-a11y.html)\n [Accessible SVGs](https://www.unimelb.edu.au/accessibility/techniques/accessible-svgs)\n\n" }, "useAltText": { "deprecated": false, @@ -6882,6 +6882,40 @@ export function GET() { ], "docs": " Prefer using the `class` prop as a classlist over the `classnames` helper.\n\n This rule encourages the use of `class` prop which natively supports strings, objects, and arrays, enabling fine-grained reactivity and optimal performance. Using utilities like `classnames` can interfere with Qwik's reactivity model and prevent the framework from optimizing component updates. Prefer using the built-in `class` prop for best results.\n\n For more information, see: [Qwik documentation on class bindings](https://qwik.dev/docs/components/rendering/#class-and-style-bindings)\n\n ## Examples\n\n ### Invalid\n\n ```jsx,expect_diagnostic\n
\n ```\n\n ### Valid\n\n ```jsx\n
\n ```\n" }, + "useQwikMethodUsage": { + "deprecated": false, + "version": "2.2.6", + "name": "useQwikMethodUsage", + "link": "https://biomejs.dev/linter/rules/use-qwik-method-usage", + "recommended": true, + "fixKind": "none", + "sources": [ + { + "kind": "sameLogic", + "source": { + "eslintQwik": "use-method-usage" + } + } + ], + "docs": " Disallow `use*` hooks outside of `component$` or other `use*` hooks in Qwik applications.\n\n Ensures Qwik's lifecycle hooks are only used in valid reactive contexts.\n See [Qwik Component Lifecycle](https://qwik.dev/docs/components/lifecycle/) for proper hook usage.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n import { useSignal } from \"@builder.io/qwik\";\n\n export const Counter = () => {\n const count = useSignal(0);\n };\n ```\n\n ### Valid\n\n ```js\n import { component$, useSignal } from \"@builder.io/qwik\";\n\n export const Counter = component$(() => {\n const count = useSignal(0);\n });\n\n export const useCounter = () => {\n const count = useSignal(0);\n return count;\n };\n ```\n" + }, + "useQwikValidLexicalScope": { + "deprecated": false, + "version": "2.2.6", + "name": "useQwikValidLexicalScope", + "link": "https://biomejs.dev/linter/rules/use-qwik-valid-lexical-scope", + "recommended": true, + "fixKind": "none", + "sources": [ + { + "kind": "sameLogic", + "source": { + "eslintQwik": "valid-lexical-scope" + } + } + ], + "docs": " Disallow unserializable expressions in Qwik dollar ($) scopes.\n\n Ensures all captured values in Qwik components can be properly serialized for resumability.\n See [Qwik Optimizer: Lexical Scope](https://qwik.dev/docs/advanced/optimizer/#lexical-scope) for proper usage patterns.\n\n ## Examples\n\n ### Invalid\n\n ```js,expect_diagnostic\n // Arrow function assigned without wrapping it in $(...)\n const handleClick = () => {\n console.log(\"clicked\");\n };\n ```\n\n ### Valid\n\n ```js\n const handleClick = $(() => {\n // Valid: only using serializable variables or props\n console.log(\"clicked\");\n });\n ```\n\n" + }, "useUniqueElementIds": { "deprecated": false, "version": "2.0.0", @@ -6910,23 +6944,6 @@ export function GET() { ], "docs": " Prevent usage of `next/script`'s `beforeInteractive` strategy outside of `pages/_document.js` in a Next.js project.\n\n Next.js provides a `next/script` component to optimize the loading of third-party scripts. Using the `beforeInteractive`\n strategy allows scripts to be preloaded before any first-party code. `beforeInteractive` scripts must be placed in `pages/_document.js`.\n\n This rule checks for any usage of the `beforeInteractive` scripts outside of these files.\n\n ## Examples\n\n ### Invalid\n\n ```jsx,expect_diagnostic\n // pages/index.jsx\n import Script from 'next/script'\n\n export default function Index() {\n return (\n
\n \n
\n )\n }\n ```\n\n ### Valid\n\n ```jsx,ignore\n // pages/_document.jsx\n import { Html, Head, Main, NextScript } from 'next/document'\n import Script from 'next/script'\n\n export default function Document() {\n return (\n \n \n \n
\n \n \n \n \n )\n }\n ```\n\n" }, - "noJsxLiterals": { - "deprecated": false, - "version": "2.2.4", - "name": "noJsxLiterals", - "link": "https://biomejs.dev/linter/rules/no-jsx-literals", - "recommended": false, - "fixKind": "none", - "sources": [ - { - "kind": "sameLogic", - "source": { - "eslintReact": "jsx-no-literals" - } - } - ], - "docs": " Disallow string literals inside JSX elements.\n\n This rule discourages the use of\n string literals directly within JSX elements. String literals in JSX can make code harder\n to maintain, especially in applications that require internationalization or dynamic content.\n\n ## Examples\n\n ### Invalid\n\n ```jsx,expect_diagnostic\n
Hello World
\n ```\n\n ```jsx,expect_diagnostic\n <>Welcome to our site\n ```\n\n ```jsx,expect_diagnostic\n \n Please enter your name\n \n ```\n\n ### Valid\n\n ```jsx\n
{'Hello World'}
\n ```\n\n ```jsx\n <>{'Welcome to our site'}\n ```\n\n ```jsx\n \n {'Please enter your name'}\n \n ```\n\n ```jsx\n
{`Hello ${name}`}
\n ```\n\n ## Options\n\n ### `noStrings`\n\n When enabled, the rule will also flag string literals inside JSX expressions and attributes.\n\n > **Default:** `false`\n\n ```json,options\n {\n \"options\": {\n \"noStrings\": true\n }\n }\n ```\n\n ```jsx,expect_diagnostic,use_options\n \n {'Please enter your name'}\n \n ```\n ```jsx,expect_diagnostic,use_options\n \n ```\n\n\n\n ### `allowedStrings`\n\n An array of strings that are allowed as literals. This can be useful for common words\n or characters that don't need to be wrapped in expressions.\n\n ```json,options\n {\n \"options\": {\n \"allowedStrings\": [\"Hello\", \" \", \"·\"]\n }\n }\n ```\n\n ```jsx,use_options\n <>\n
Hello
\n
 
\n
·
\n \n ```\n\n ### `ignoreProps`\n\n When enabled, the rule will ignore string literals used as prop values.\n\n > **Default:** `false`\n\n ```json,options\n {\n \"options\": {\n \"ignoreProps\": true\n }\n }\n ```\n\n ```jsx,use_options\n <>\n \n \n \n ```\n\n" - }, "noJsxPropsBind": { "deprecated": false, "version": "2.3.11", @@ -6994,40 +7011,6 @@ export function GET() { } ], "docs": " Enforce `id` attribute on `next/script` components with inline content or `dangerouslySetInnerHTML`.\n\n Using inline scripts or `dangerouslySetInnerHTML` in `next/script` components requires an `id` attribute to ensure that Next.js can track and optimize them correctly.\n\n ## Examples\n\n ### Invalid\n\n ```jsx,expect_diagnostic\n import Script from 'next/script'\n\n export default function Page() {\n return (\n \n )\n }\n ```\n\n ```jsx,expect_diagnostic\n import Script from 'next/script'\n\n export default function Page() {\n return (\n \n )\n }\n ```\n\n ```jsx\n import Script from 'next/script'\n\n export default function Page() {\n return (\n