From 286500063fca77352f7068738ddf4dcdcb9b2e81 Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Mon, 16 Oct 2023 11:32:12 +0100 Subject: [PATCH 1/7] chore: promote rules --- .../src/categories.rs | 20 +- .../src/analyzers/a11y/use_anchor_content.rs | 3 +- .../src/analyzers/complexity.rs | 4 + .../no_excessive_complexity.rs | 0 .../src/analyzers/complexity/no_for_each.rs | 6 +- .../{nursery => complexity}/no_void.rs | 0 .../no_approximative_numeric_constant.rs | 2 +- .../no_empty_character_class_in_regex.rs | 2 +- .../nursery/no_misleading_instantiator.rs | 2 +- .../no_misrefactored_shorthand_assign.rs | 2 +- .../src/analyzers/nursery/no_useless_else.rs | 2 +- .../no_useless_lone_block_statements.rs | 2 +- .../nursery/use_as_const_assertion.rs | 2 +- .../analyzers/nursery/use_shorthand_assign.rs | 5 +- .../biome_js_analyze/src/analyzers/style.rs | 2 + .../use_collapsed_else_if.rs | 0 .../analyzers/style/use_enum_initializers.rs | 3 +- .../src/analyzers/suspicious.rs | 4 + .../no_confusing_void_type.rs | 17 +- .../no_fallthrough_switch_clause.rs | 2 +- .../a11y/no_aria_unsupported_elements.rs | 5 +- .../a11y/use_valid_aria_props.rs | 3 +- ...eractive_element_to_noninteractive_role.rs | 2 +- ...use_aria_activedescendant_with_tabindex.rs | 2 +- crates/biome_js_analyze/src/lib.rs | 4 +- crates/biome_js_analyze/src/options.rs | 6 +- .../src/semantic_analyzers.rs | 3 +- .../a11y/no_positive_tabindex.rs | 3 +- .../src/semantic_analyzers/correctness.rs | 4 + .../use_exhaustive_dependencies.rs | 0 .../use_hook_at_top_level.rs | 5 +- .../src/semantic_analyzers/nursery.rs | 10 - .../nursery/no_invalid_new_builtin.rs | 2 +- .../nursery/no_unused_imports.rs | 2 +- .../src/semantic_analyzers/performance.rs | 14 + .../no_accumulating_spread.rs | 5 +- .../src/semantic_analyzers/suspicious.rs | 4 + .../no_global_is_nan.rs | 0 .../{nursery => suspicious}/use_is_array.rs | 0 .../noExcessiveComplexity/booleanOperators.js | 0 .../booleanOperators.js.snap | 2 +- .../booleanOperators.options.json | 2 +- .../booleanOperators2.js | 0 .../booleanOperators2.js.snap | 2 +- .../booleanOperators2.options.json | 2 +- .../complexEventHandler.ts | 0 .../complexEventHandler.ts.snap | 2 +- .../noExcessiveComplexity/excessiveNesting.js | 0 .../excessiveNesting.js.snap | 2 +- .../noExcessiveComplexity/functionalChain.js | 0 .../functionalChain.js.snap | 2 +- .../functionalChain.options.json | 2 +- .../noExcessiveComplexity/getWords.js | 0 .../noExcessiveComplexity/getWords.js.snap | 0 .../getWords.options.json | 2 +- .../noExcessiveComplexity/invalidConfig.js | 0 .../invalidConfig.js.snap | 0 .../invalidConfig.options.json | 2 +- .../noExcessiveComplexity/lambdas.js | 0 .../noExcessiveComplexity/lambdas.js.snap | 8 +- .../lambdas.options.json | 2 +- .../nestedControlFlowStructures.js | 0 .../nestedControlFlowStructures.js.snap | 2 +- .../nestedControlFlowStructures.options.json | 2 +- .../noExcessiveComplexity/simpleBranches.js | 0 .../simpleBranches.js.snap | 2 +- .../simpleBranches.options.json | 2 +- .../noExcessiveComplexity/simpleBranches2.js | 0 .../simpleBranches2.js.snap | 2 +- .../simpleBranches2.options.json | 2 +- .../noExcessiveComplexity/sumOfPrimes.js | 0 .../noExcessiveComplexity/sumOfPrimes.js.snap | 2 +- .../sumOfPrimes.options.json | 2 +- .../noExcessiveComplexity/valid.js | 0 .../noExcessiveComplexity/valid.js.snap | 0 .../complexity/noForEach/invalid.js.snap | 8 + .../{nursery => complexity}/noVoid/invalid.js | 0 .../noVoid/invalid.js.snap | 8 +- .../{nursery => complexity}/noVoid/valid.js | 0 .../noVoid/valid.js.snap | 0 .../checkHooksImportedFromReact.js | 0 .../checkHooksImportedFromReact.js.snap | 2 +- .../useExhaustiveDependencies/customHook.js | 0 .../customHook.js.snap | 4 +- .../customHook.options.json | 2 +- .../extraDependenciesInvalid.js | 0 .../extraDependenciesInvalid.js.snap | 10 +- .../malformedOptions.js | 0 .../malformedOptions.js.snap | 0 .../malformedOptions.options.json | 2 +- .../missingDependenciesInvalid.js | 0 .../missingDependenciesInvalid.js.snap | 48 +- .../useExhaustiveDependencies/newline.js | 0 .../useExhaustiveDependencies/newline.js.snap | 0 .../useExhaustiveDependencies/valid.js | 0 .../useExhaustiveDependencies/valid.js.snap | 0 .../useExhaustiveDependencies/valid.ts | 0 .../useExhaustiveDependencies/valid.ts.snap | 0 .../useHookAtTopLevel/customHook.js | 0 .../useHookAtTopLevel/customHook.js.snap | 2 +- .../useHookAtTopLevel/customHook.options.json | 2 +- .../useHookAtTopLevel/invalid.js | 0 .../useHookAtTopLevel/invalid.js.snap | 36 +- .../useHookAtTopLevel/invalid.ts | 0 .../useHookAtTopLevel/invalid.ts.snap | 2 +- .../useHookAtTopLevel/valid.js | 0 .../useHookAtTopLevel/valid.js.snap | 0 .../useHookAtTopLevel/valid.ts | 0 .../useHookAtTopLevel/valid.ts.snap | 0 .../noAccumulatingSpread/invalid.jsonc | 0 .../noAccumulatingSpread/invalid.jsonc.snap | 64 ++- .../noAccumulatingSpread/valid.jsonc | 0 .../noAccumulatingSpread/valid.jsonc.snap | 0 .../useCollapsedElseIf/invalid.js | 0 .../useCollapsedElseIf/invalid.js.snap | 20 +- .../useCollapsedElseIf/valid.js | 0 .../useCollapsedElseIf/valid.js.snap | 0 .../noConfusingVoidType/invalid.ts | 0 .../noConfusingVoidType/invalid.ts.snap | 33 +- .../noConfusingVoidType/valid.ts | 0 .../noConfusingVoidType/valid.ts.snap | 0 .../noFallthroughSwitchClause/invalid.js | 0 .../noFallthroughSwitchClause/invalid.js.snap | 44 +- .../noFallthroughSwitchClause/valid.js | 0 .../noFallthroughSwitchClause/valid.js.snap | 0 .../noGlobalIsNan/invalid.js | 0 .../noGlobalIsNan/invalid.js.snap | 18 +- .../noGlobalIsNan/valid.js | 0 .../noGlobalIsNan/valid.js.snap | 0 .../useIsArray/invalid.js | 0 .../useIsArray/invalid.js.snap | 6 +- .../useIsArray/valid-shadowing.js | 0 .../useIsArray/valid-shadowing.js.snap | 0 .../useIsArray/valid.js | 0 .../useIsArray/valid.js.snap | 0 .../src/transformers/ts_enum.rs | 2 +- .../src/configuration/parse/json/rules.rs | 485 +++++++++--------- editors/vscode/configuration_schema.json | 140 ++--- .../@biomejs/backend-jsonrpc/src/workspace.ts | 100 ++-- .../@biomejs/biome/configuration_schema.json | 140 ++--- .../generated/RecommendedRules.astro | 7 + .../linter/rules/no-accumulating-spread.md | 24 +- .../no-approximative-numeric-constant.md | 2 +- .../linter/rules/no-confusing-void-type.md | 30 +- .../no-empty-character-class-in-regex.md | 2 +- .../linter/rules/no-excessive-complexity.md | 8 +- .../rules/no-fallthrough-switch-clause.md | 10 +- .../content/docs/linter/rules/no-for-each.md | 12 +- .../docs/linter/rules/no-global-is-nan.md | 8 +- ...eractive-element-to-noninteractive-role.md | 2 +- .../linter/rules/no-invalid-new-builtin.md | 2 +- .../rules/no-misleading-instantiator.md | 2 +- .../no-misrefactored-shorthand-assign.md | 2 +- .../docs/linter/rules/no-unused-imports.md | 2 +- .../docs/linter/rules/no-useless-else.md | 2 +- .../rules/no-useless-lone-block-statements.md | 2 +- .../src/content/docs/linter/rules/no-void.md | 8 +- ...use-aria-activedescendant-with-tabindex.md | 2 +- .../linter/rules/use-as-const-assertion.md | 2 +- .../linter/rules/use-collapsed-else-if.md | 12 +- .../rules/use-exhaustive-dependencies.md | 14 +- .../linter/rules/use-hook-at-top-level.md | 8 +- .../content/docs/linter/rules/use-is-array.md | 8 +- .../docs/linter/rules/use-shorthand-assign.md | 2 +- xtask/codegen/src/generate_new_lintrule.rs | 2 +- xtask/codegen/src/promote_rule.rs | 16 +- xtask/lintdoc/src/main.rs | 33 +- 167 files changed, 879 insertions(+), 723 deletions(-) rename crates/biome_js_analyze/src/analyzers/{nursery => complexity}/no_excessive_complexity.rs (100%) rename crates/biome_js_analyze/src/analyzers/{nursery => complexity}/no_void.rs (100%) rename crates/biome_js_analyze/src/analyzers/{nursery => style}/use_collapsed_else_if.rs (100%) rename crates/biome_js_analyze/src/analyzers/{nursery => suspicious}/no_confusing_void_type.rs (92%) rename crates/biome_js_analyze/src/analyzers/{nursery => suspicious}/no_fallthrough_switch_clause.rs (99%) rename crates/biome_js_analyze/src/semantic_analyzers/{nursery => correctness}/use_exhaustive_dependencies.rs (100%) rename crates/biome_js_analyze/src/semantic_analyzers/{nursery => correctness}/use_hook_at_top_level.rs (97%) create mode 100644 crates/biome_js_analyze/src/semantic_analyzers/performance.rs rename crates/biome_js_analyze/src/semantic_analyzers/{nursery => performance}/no_accumulating_spread.rs (96%) rename crates/biome_js_analyze/src/semantic_analyzers/{nursery => suspicious}/no_global_is_nan.rs (100%) rename crates/biome_js_analyze/src/semantic_analyzers/{nursery => suspicious}/use_is_array.rs (100%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/booleanOperators.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/booleanOperators.js.snap (87%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/booleanOperators.options.json (92%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/booleanOperators2.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/booleanOperators2.js.snap (87%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/booleanOperators2.options.json (92%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/complexEventHandler.ts (100%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/complexEventHandler.ts.snap (96%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/excessiveNesting.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/excessiveNesting.js.snap (94%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/functionalChain.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/functionalChain.js.snap (89%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/functionalChain.options.json (92%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/getWords.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/getWords.js.snap (100%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/getWords.options.json (92%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/invalidConfig.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/invalidConfig.js.snap (100%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/invalidConfig.options.json (92%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/lambdas.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/lambdas.js.snap (86%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/lambdas.options.json (92%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/nestedControlFlowStructures.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/nestedControlFlowStructures.js.snap (84%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/nestedControlFlowStructures.options.json (92%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/simpleBranches.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/simpleBranches.js.snap (85%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/simpleBranches.options.json (92%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/simpleBranches2.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/simpleBranches2.js.snap (85%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/simpleBranches2.options.json (92%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/sumOfPrimes.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/sumOfPrimes.js.snap (86%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/sumOfPrimes.options.json (92%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/valid.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noExcessiveComplexity/valid.js.snap (100%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noVoid/invalid.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noVoid/invalid.js.snap (81%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noVoid/valid.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => complexity}/noVoid/valid.js.snap (100%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/useExhaustiveDependencies/checkHooksImportedFromReact.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/useExhaustiveDependencies/checkHooksImportedFromReact.js.snap (87%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/useExhaustiveDependencies/customHook.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/useExhaustiveDependencies/customHook.js.snap (77%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/useExhaustiveDependencies/customHook.options.json (94%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/useExhaustiveDependencies/extraDependenciesInvalid.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/useExhaustiveDependencies/extraDependenciesInvalid.js.snap (81%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/useExhaustiveDependencies/malformedOptions.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/useExhaustiveDependencies/malformedOptions.js.snap (100%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/useExhaustiveDependencies/malformedOptions.options.json (94%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/useExhaustiveDependencies/missingDependenciesInvalid.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/useExhaustiveDependencies/missingDependenciesInvalid.js.snap (81%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/useExhaustiveDependencies/newline.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/useExhaustiveDependencies/newline.js.snap (100%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/useExhaustiveDependencies/valid.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/useExhaustiveDependencies/valid.js.snap (100%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/useExhaustiveDependencies/valid.ts (100%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/useExhaustiveDependencies/valid.ts.snap (100%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/useHookAtTopLevel/customHook.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/useHookAtTopLevel/customHook.js.snap (86%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/useHookAtTopLevel/customHook.options.json (93%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/useHookAtTopLevel/invalid.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/useHookAtTopLevel/invalid.js.snap (85%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/useHookAtTopLevel/invalid.ts (100%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/useHookAtTopLevel/invalid.ts.snap (87%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/useHookAtTopLevel/valid.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/useHookAtTopLevel/valid.js.snap (100%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/useHookAtTopLevel/valid.ts (100%) rename crates/biome_js_analyze/tests/specs/{nursery => correctness}/useHookAtTopLevel/valid.ts.snap (100%) rename crates/biome_js_analyze/tests/specs/{nursery => performance}/noAccumulatingSpread/invalid.jsonc (100%) rename crates/biome_js_analyze/tests/specs/{nursery => performance}/noAccumulatingSpread/invalid.jsonc.snap (63%) rename crates/biome_js_analyze/tests/specs/{nursery => performance}/noAccumulatingSpread/valid.jsonc (100%) rename crates/biome_js_analyze/tests/specs/{nursery => performance}/noAccumulatingSpread/valid.jsonc.snap (100%) rename crates/biome_js_analyze/tests/specs/{nursery => style}/useCollapsedElseIf/invalid.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => style}/useCollapsedElseIf/invalid.js.snap (81%) rename crates/biome_js_analyze/tests/specs/{nursery => style}/useCollapsedElseIf/valid.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => style}/useCollapsedElseIf/valid.js.snap (100%) rename crates/biome_js_analyze/tests/specs/{nursery => suspicious}/noConfusingVoidType/invalid.ts (100%) rename crates/biome_js_analyze/tests/specs/{nursery => suspicious}/noConfusingVoidType/invalid.ts.snap (84%) rename crates/biome_js_analyze/tests/specs/{nursery => suspicious}/noConfusingVoidType/valid.ts (100%) rename crates/biome_js_analyze/tests/specs/{nursery => suspicious}/noConfusingVoidType/valid.ts.snap (100%) rename crates/biome_js_analyze/tests/specs/{nursery => suspicious}/noFallthroughSwitchClause/invalid.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => suspicious}/noFallthroughSwitchClause/invalid.js.snap (81%) rename crates/biome_js_analyze/tests/specs/{nursery => suspicious}/noFallthroughSwitchClause/valid.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => suspicious}/noFallthroughSwitchClause/valid.js.snap (100%) rename crates/biome_js_analyze/tests/specs/{nursery => suspicious}/noGlobalIsNan/invalid.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => suspicious}/noGlobalIsNan/invalid.js.snap (82%) rename crates/biome_js_analyze/tests/specs/{nursery => suspicious}/noGlobalIsNan/valid.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => suspicious}/noGlobalIsNan/valid.js.snap (100%) rename crates/biome_js_analyze/tests/specs/{nursery => suspicious}/useIsArray/invalid.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => suspicious}/useIsArray/invalid.js.snap (92%) rename crates/biome_js_analyze/tests/specs/{nursery => suspicious}/useIsArray/valid-shadowing.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => suspicious}/useIsArray/valid-shadowing.js.snap (100%) rename crates/biome_js_analyze/tests/specs/{nursery => suspicious}/useIsArray/valid.js (100%) rename crates/biome_js_analyze/tests/specs/{nursery => suspicious}/useIsArray/valid.js.snap (100%) diff --git a/crates/biome_diagnostics_categories/src/categories.rs b/crates/biome_diagnostics_categories/src/categories.rs index 547d0b6f2d0b..d16605f740e6 100644 --- a/crates/biome_diagnostics_categories/src/categories.rs +++ b/crates/biome_diagnostics_categories/src/categories.rs @@ -40,6 +40,7 @@ define_categories! { "lint/a11y/useValidAriaValues": "https://biomejs.dev/linter/rules/use-valid-aria-values", "lint/a11y/useValidLang": "https://biomejs.dev/linter/rules/use-valid-lang", "lint/complexity/noBannedTypes": "https://biomejs.dev/linter/rules/no-banned-types", + "lint/complexity/noExcessiveComplexity": "https://biomejs.dev/linter/rules/no-excessive-complexity", "lint/complexity/noExtraBooleanCast": "https://biomejs.dev/linter/rules/no-extra-boolean-cast", "lint/complexity/noForEach": "https://biomejs.dev/linter/rules/no-for-each", "lint/complexity/noMultipleSpacesInRegularExpressionLiterals": "https://biomejs.dev/linter/rules/no-multiple-spaces-in-regular-expression-literals", @@ -53,6 +54,7 @@ define_categories! { "lint/complexity/noUselessSwitchCase": "https://biomejs.dev/linter/rules/no-useless-switch-case", "lint/complexity/noUselessThisAlias": "https://biomejs.dev/linter/rules/no-useless-this-alias", "lint/complexity/noUselessTypeConstraint": "https://biomejs.dev/linter/rules/no-useless-type-constraint", + "lint/complexity/noVoid": "https://biomejs.dev/linter/rules/no-void", "lint/complexity/noWith": "https://biomejs.dev/linter/rules/no-with", "lint/complexity/useFlatMap": "https://biomejs.dev/linter/rules/use-flat-map", "lint/complexity/useLiteralKeys": "https://biomejs.dev/linter/rules/use-literal-keys", @@ -85,19 +87,16 @@ define_categories! { "lint/correctness/noUnusedVariables": "https://biomejs.dev/linter/rules/no-unused-variables", "lint/correctness/noVoidElementsWithChildren": "https://biomejs.dev/linter/rules/no-void-elements-with-children", "lint/correctness/noVoidTypeReturn": "https://biomejs.dev/linter/rules/no-void-type-return", + "lint/correctness/useExhaustiveDependencies": "https://biomejs.dev/linter/rules/use-exhaustive-dependencies", + "lint/correctness/useHookAtTopLevel": "https://biomejs.dev/linter/rules/use-hook-at-top-level", "lint/correctness/useIsNan": "https://biomejs.dev/linter/rules/use-is-nan", "lint/correctness/useValidForDirection": "https://biomejs.dev/linter/rules/use-valid-for-direction", "lint/correctness/useYield": "https://biomejs.dev/linter/rules/use-yield", - "lint/nursery/noAccumulatingSpread": "https://biomejs.dev/linter/rules/no-accumulating-spread", "lint/nursery/noApproximativeNumericConstant": "https://biomejs.dev/lint/rules/no-approximative-numeric-constant", - "lint/nursery/noConfusingVoidType": "https://biomejs.dev/linter/rules/no-confusing-void-type", "lint/nursery/noDuplicateJsonKeys": "https://biomejs.dev/linter/rules/no-duplicate-json-keys", "lint/nursery/noEmptyBlockStatements": "https://biomejs.dev/lint/rules/no-empty-block-statements", "lint/nursery/noEmptyCharacterClassInRegex": "https://biomejs.dev/lint/rules/no-empty-character-class-in-regex", - "lint/nursery/noExcessiveComplexity": "https://biomejs.dev/linter/rules/no-excessive-complexity", - "lint/nursery/noFallthroughSwitchClause": "https://biomejs.dev/linter/rules/no-fallthrough-switch-clause", "lint/nursery/noGlobalIsFinite": "https://biomejs.dev/linter/rules/no-global-is-finite", - "lint/nursery/noGlobalIsNan": "https://biomejs.dev/linter/rules/no-global-is-nan", "lint/nursery/noInteractiveElementToNoninteractiveRole": "https://biomejs.dev/lint/rules/no-interactive-element-to-noninteractive-role", "lint/nursery/noInvalidNewBuiltin": "https://biomejs.dev/lint/rules/no-invalid-new-builtin", "lint/nursery/noMisleadingInstantiator": "https://biomejs.dev/linter/rules/no-misleading-instantiator", @@ -105,18 +104,14 @@ define_categories! { "lint/nursery/noUnusedImports": "https://biomejs.dev/lint/rules/no-unused-imports", "lint/nursery/noUselessElse": "https://biomejs.dev/lint/rules/no-useless-else", "lint/nursery/noUselessLoneBlockStatements": "https://biomejs.dev/lint/rules/no-useless-lone-block-statements", - "lint/nursery/noVoid": "https://biomejs.dev/linter/rules/no-void", "lint/nursery/useAriaActivedescendantWithTabindex": "https://biomejs.dev/lint/rules/use-aria-activedescendant-with-tabindex", "lint/nursery/useArrowFunction": "https://biomejs.dev/linter/rules/use-arrow-function", "lint/nursery/useAsConstAssertion": "https://biomejs.dev/lint/rules/use-as-const-assertion", "lint/nursery/useBiomeSuppressionComment": "https://biomejs.dev/lint/rules/use-biome-suppression-comment", - "lint/nursery/useCollapsedElseIf": "https://biomejs.dev/lint/rules/use-collapsed-else-if", - "lint/nursery/useExhaustiveDependencies": "https://biomejs.dev/linter/rules/use-exhaustive-dependencies", "lint/nursery/useGroupedTypeImport": "https://biomejs.dev/linter/rules/use-grouped-type-import", - "lint/nursery/useHookAtTopLevel": "https://biomejs.dev/linter/rules/use-hook-at-top-level", "lint/nursery/useImportRestrictions": "https://biomejs.dev/linter/rules/use-import-restrictions", - "lint/nursery/useIsArray": "https://biomejs.dev/linter/rules/use-is-array", "lint/nursery/useShorthandAssign": "https://biomejs.dev/lint/rules/use-shorthand-assign", + "lint/performance/noAccumulatingSpread": "https://biomejs.dev/linter/rules/no-accumulating-spread", "lint/performance/noDelete": "https://biomejs.dev/linter/rules/no-delete", "lint/security/noDangerouslySetInnerHtml": "https://biomejs.dev/linter/rules/no-dangerously-set-inner-html", "lint/security/noDangerouslySetInnerHtmlWithChildren": "https://biomejs.dev/linter/rules/no-dangerously-set-inner-html-with-children", @@ -134,6 +129,7 @@ define_categories! { "lint/style/noUnusedTemplateLiteral": "https://biomejs.dev/linter/rules/no-unused-template-literal", "lint/style/noVar": "https://biomejs.dev/linter/rules/no-var", "lint/style/useBlockStatements": "https://biomejs.dev/linter/rules/use-block-statements", + "lint/style/useCollapsedElseIf": "https://biomejs.dev/lint/rules/use-collapsed-else-if", "lint/style/useConst": "https://biomejs.dev/linter/rules/use-const", "lint/style/useDefaultParameterLast": "https://biomejs.dev/linter/rules/use-default-parameter-last", "lint/style/useEnumInitializers": "https://biomejs.dev/linter/rules/use-enum-initializers", @@ -156,6 +152,7 @@ define_categories! { "lint/suspicious/noCommentText": "https://biomejs.dev/linter/rules/no-comment-text", "lint/suspicious/noCompareNegZero": "https://biomejs.dev/linter/rules/no-compare-neg-zero", "lint/suspicious/noConfusingLabels": "https://biomejs.dev/linter/rules/no-confusing-labels", + "lint/suspicious/noConfusingVoidType": "https://biomejs.dev/linter/rules/no-confusing-void-type", "lint/suspicious/noConsoleLog": "https://biomejs.dev/linter/rules/no-console-log", "lint/suspicious/noConstEnum": "https://biomejs.dev/linter/rules/no-const-enum", "lint/suspicious/noControlCharactersInRegex": "https://biomejs.dev/linter/rules/no-control-characters-in-regex", @@ -169,7 +166,9 @@ define_categories! { "lint/suspicious/noEmptyInterface": "https://biomejs.dev/linter/rules/no-empty-interface", "lint/suspicious/noExplicitAny": "https://biomejs.dev/linter/rules/no-explicit-any", "lint/suspicious/noExtraNonNullAssertion": "https://biomejs.dev/linter/rules/no-extra-non-null-assertion", + "lint/suspicious/noFallthroughSwitchClause": "https://biomejs.dev/linter/rules/no-fallthrough-switch-clause", "lint/suspicious/noFunctionAssign": "https://biomejs.dev/linter/rules/no-function-assign", + "lint/suspicious/noGlobalIsNan": "https://biomejs.dev/linter/rules/no-global-is-nan", "lint/suspicious/noImportAssign": "https://biomejs.dev/linter/rules/no-import-assign", "lint/suspicious/noLabelVar": "https://biomejs.dev/linter/rules/no-label-var", "lint/suspicious/noPrototypeBuiltins": "https://biomejs.dev/linter/rules/no-prototype-builtins", @@ -182,6 +181,7 @@ define_categories! { "lint/suspicious/noUnsafeNegation": "https://biomejs.dev/linter/rules/no-unsafe-negation", "lint/suspicious/useDefaultSwitchClauseLast": "https://biomejs.dev/linter/rules/use-default-switch-clause-last", "lint/suspicious/useGetterReturn": "https://biomejs.dev/linter/rules/use-getter-return", + "lint/suspicious/useIsArray": "https://biomejs.dev/linter/rules/use-is-array", "lint/suspicious/useNamespaceKeyword": "https://biomejs.dev/linter/rules/use-namespace-keyword", "lint/suspicious/useValidTypeof": "https://biomejs.dev/linter/rules/use-valid-typeof", ; diff --git a/crates/biome_js_analyze/src/analyzers/a11y/use_anchor_content.rs b/crates/biome_js_analyze/src/analyzers/a11y/use_anchor_content.rs index aa15a86d6ce8..64fe6f7802c3 100644 --- a/crates/biome_js_analyze/src/analyzers/a11y/use_anchor_content.rs +++ b/crates/biome_js_analyze/src/analyzers/a11y/use_anchor_content.rs @@ -1,5 +1,5 @@ use biome_analyze::context::RuleContext; -use biome_analyze::{declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic}; +use biome_analyze::{declare_rule, ActionCategory, Ast, FixKind, Rule, RuleDiagnostic}; use biome_console::markup; use biome_diagnostics::Applicability; use biome_js_syntax::jsx_ext::AnyJsxElement; @@ -68,6 +68,7 @@ declare_rule! { version: "1.0.0", name: "useAnchorContent", recommended: true, + fix_kind: FixKind::Unsafe, } } diff --git a/crates/biome_js_analyze/src/analyzers/complexity.rs b/crates/biome_js_analyze/src/analyzers/complexity.rs index fe2bd7f814a6..034417df5fc4 100644 --- a/crates/biome_js_analyze/src/analyzers/complexity.rs +++ b/crates/biome_js_analyze/src/analyzers/complexity.rs @@ -2,6 +2,7 @@ use biome_analyze::declare_group; +pub(crate) mod no_excessive_complexity; pub(crate) mod no_extra_boolean_cast; pub(crate) mod no_for_each; pub(crate) mod no_multiple_spaces_in_regular_expression_literals; @@ -13,6 +14,7 @@ pub(crate) mod no_useless_label; pub(crate) mod no_useless_rename; pub(crate) mod no_useless_switch_case; pub(crate) mod no_useless_type_constraint; +pub(crate) mod no_void; pub(crate) mod no_with; pub(crate) mod use_flat_map; pub(crate) mod use_literal_keys; @@ -24,6 +26,7 @@ declare_group! { pub (crate) Complexity { name : "complexity" , rules : [ + self :: no_excessive_complexity :: NoExcessiveComplexity , self :: no_extra_boolean_cast :: NoExtraBooleanCast , self :: no_for_each :: NoForEach , self :: no_multiple_spaces_in_regular_expression_literals :: NoMultipleSpacesInRegularExpressionLiterals , @@ -35,6 +38,7 @@ declare_group! { self :: no_useless_rename :: NoUselessRename , self :: no_useless_switch_case :: NoUselessSwitchCase , self :: no_useless_type_constraint :: NoUselessTypeConstraint , + self :: no_void :: NoVoid , self :: no_with :: NoWith , self :: use_flat_map :: UseFlatMap , self :: use_literal_keys :: UseLiteralKeys , diff --git a/crates/biome_js_analyze/src/analyzers/nursery/no_excessive_complexity.rs b/crates/biome_js_analyze/src/analyzers/complexity/no_excessive_complexity.rs similarity index 100% rename from crates/biome_js_analyze/src/analyzers/nursery/no_excessive_complexity.rs rename to crates/biome_js_analyze/src/analyzers/complexity/no_excessive_complexity.rs diff --git a/crates/biome_js_analyze/src/analyzers/complexity/no_for_each.rs b/crates/biome_js_analyze/src/analyzers/complexity/no_for_each.rs index 73058efae4a3..e83baa4296b6 100644 --- a/crates/biome_js_analyze/src/analyzers/complexity/no_for_each.rs +++ b/crates/biome_js_analyze/src/analyzers/complexity/no_for_each.rs @@ -43,7 +43,7 @@ declare_rule! { pub(crate) NoForEach { version: "1.0.0", name: "noForEach", - recommended: false, + recommended: true, } } @@ -69,6 +69,8 @@ impl Rule for NoForEach { markup! { "Prefer for...of instead of Array.forEach" }, - )) + ).note(markup!{ + "forEach"" could lead to performance issue when working with large arrays. When combined with functions like .filter or .map, this causes multiple iterations over the same type." + })) } } diff --git a/crates/biome_js_analyze/src/analyzers/nursery/no_void.rs b/crates/biome_js_analyze/src/analyzers/complexity/no_void.rs similarity index 100% rename from crates/biome_js_analyze/src/analyzers/nursery/no_void.rs rename to crates/biome_js_analyze/src/analyzers/complexity/no_void.rs diff --git a/crates/biome_js_analyze/src/analyzers/nursery/no_approximative_numeric_constant.rs b/crates/biome_js_analyze/src/analyzers/nursery/no_approximative_numeric_constant.rs index 2632a231a527..6aab81effd4d 100644 --- a/crates/biome_js_analyze/src/analyzers/nursery/no_approximative_numeric_constant.rs +++ b/crates/biome_js_analyze/src/analyzers/nursery/no_approximative_numeric_constant.rs @@ -31,7 +31,7 @@ declare_rule! { /// ``` /// pub(crate) NoApproximativeNumericConstant { - version: "next", + version: "1.3.0", name: "noApproximativeNumericConstant", recommended: false, } diff --git a/crates/biome_js_analyze/src/analyzers/nursery/no_empty_character_class_in_regex.rs b/crates/biome_js_analyze/src/analyzers/nursery/no_empty_character_class_in_regex.rs index d14d336491da..6e5b322acfe1 100644 --- a/crates/biome_js_analyze/src/analyzers/nursery/no_empty_character_class_in_regex.rs +++ b/crates/biome_js_analyze/src/analyzers/nursery/no_empty_character_class_in_regex.rs @@ -41,7 +41,7 @@ declare_rule! { /// ``` /// pub(crate) NoEmptyCharacterClassInRegex { - version: "next", + version: "1.3.0", name: "noEmptyCharacterClassInRegex", recommended: true, } diff --git a/crates/biome_js_analyze/src/analyzers/nursery/no_misleading_instantiator.rs b/crates/biome_js_analyze/src/analyzers/nursery/no_misleading_instantiator.rs index b3f22538e0c2..3a96eb35eff4 100644 --- a/crates/biome_js_analyze/src/analyzers/nursery/no_misleading_instantiator.rs +++ b/crates/biome_js_analyze/src/analyzers/nursery/no_misleading_instantiator.rs @@ -49,7 +49,7 @@ declare_rule! { /// ``` /// pub(crate) NoMisleadingInstantiator { - version: "next", + version: "1.3.0", name: "noMisleadingInstantiator", recommended: true, } diff --git a/crates/biome_js_analyze/src/analyzers/nursery/no_misrefactored_shorthand_assign.rs b/crates/biome_js_analyze/src/analyzers/nursery/no_misrefactored_shorthand_assign.rs index e14f8504f5bb..7e8ac6eafb1f 100644 --- a/crates/biome_js_analyze/src/analyzers/nursery/no_misrefactored_shorthand_assign.rs +++ b/crates/biome_js_analyze/src/analyzers/nursery/no_misrefactored_shorthand_assign.rs @@ -52,7 +52,7 @@ declare_rule! { /// ``` /// pub(crate) NoMisrefactoredShorthandAssign { - version: "next", + version: "1.3.0", name: "noMisrefactoredShorthandAssign", recommended: false, fix_kind: FixKind::Unsafe, diff --git a/crates/biome_js_analyze/src/analyzers/nursery/no_useless_else.rs b/crates/biome_js_analyze/src/analyzers/nursery/no_useless_else.rs index 605ce644ac2b..19595aab7b85 100644 --- a/crates/biome_js_analyze/src/analyzers/nursery/no_useless_else.rs +++ b/crates/biome_js_analyze/src/analyzers/nursery/no_useless_else.rs @@ -61,7 +61,7 @@ declare_rule! { /// } /// ``` pub(crate) NoUselessElse { - version: "next", + version: "1.3.0", name: "noUselessElse", recommended: true, fix_kind: FixKind::Unsafe, diff --git a/crates/biome_js_analyze/src/analyzers/nursery/no_useless_lone_block_statements.rs b/crates/biome_js_analyze/src/analyzers/nursery/no_useless_lone_block_statements.rs index 1d8a532e69b4..870350b049a8 100644 --- a/crates/biome_js_analyze/src/analyzers/nursery/no_useless_lone_block_statements.rs +++ b/crates/biome_js_analyze/src/analyzers/nursery/no_useless_lone_block_statements.rs @@ -46,7 +46,7 @@ declare_rule! { /// ``` /// pub(crate) NoUselessLoneBlockStatements { - version: "next", + version: "1.3.0", name: "noUselessLoneBlockStatements", recommended: false, fix_kind: FixKind::Unsafe, diff --git a/crates/biome_js_analyze/src/analyzers/nursery/use_as_const_assertion.rs b/crates/biome_js_analyze/src/analyzers/nursery/use_as_const_assertion.rs index d99960c326c1..ff2c1289fc61 100644 --- a/crates/biome_js_analyze/src/analyzers/nursery/use_as_const_assertion.rs +++ b/crates/biome_js_analyze/src/analyzers/nursery/use_as_const_assertion.rs @@ -48,7 +48,7 @@ declare_rule! { /// ``` /// pub(crate) UseAsConstAssertion { - version: "next", + version: "1.3.0", name: "useAsConstAssertion", recommended: true, fix_kind: FixKind::Safe, diff --git a/crates/biome_js_analyze/src/analyzers/nursery/use_shorthand_assign.rs b/crates/biome_js_analyze/src/analyzers/nursery/use_shorthand_assign.rs index 8215a64e804e..4657f377ea18 100644 --- a/crates/biome_js_analyze/src/analyzers/nursery/use_shorthand_assign.rs +++ b/crates/biome_js_analyze/src/analyzers/nursery/use_shorthand_assign.rs @@ -1,5 +1,5 @@ use biome_analyze::{ - context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic, + context::RuleContext, declare_rule, ActionCategory, Ast, FixKind, Rule, RuleDiagnostic, }; use biome_console::markup; use biome_diagnostics::Applicability; @@ -53,9 +53,10 @@ declare_rule! { /// ``` /// pub(crate) UseShorthandAssign { - version: "next", + version: "1.3.0", name: "useShorthandAssign", recommended: false, + fix_kind: FixKind::Unsafe, } } diff --git a/crates/biome_js_analyze/src/analyzers/style.rs b/crates/biome_js_analyze/src/analyzers/style.rs index 677f0d582494..2bbdfa069764 100644 --- a/crates/biome_js_analyze/src/analyzers/style.rs +++ b/crates/biome_js_analyze/src/analyzers/style.rs @@ -11,6 +11,7 @@ pub(crate) mod no_non_null_assertion; pub(crate) mod no_parameter_properties; pub(crate) mod no_unused_template_literal; pub(crate) mod use_block_statements; +pub(crate) mod use_collapsed_else_if; pub(crate) mod use_default_parameter_last; pub(crate) mod use_enum_initializers; pub(crate) mod use_exponentiation_operator; @@ -36,6 +37,7 @@ declare_group! { self :: no_parameter_properties :: NoParameterProperties , self :: no_unused_template_literal :: NoUnusedTemplateLiteral , self :: use_block_statements :: UseBlockStatements , + self :: use_collapsed_else_if :: UseCollapsedElseIf , self :: use_default_parameter_last :: UseDefaultParameterLast , self :: use_enum_initializers :: UseEnumInitializers , self :: use_exponentiation_operator :: UseExponentiationOperator , diff --git a/crates/biome_js_analyze/src/analyzers/nursery/use_collapsed_else_if.rs b/crates/biome_js_analyze/src/analyzers/style/use_collapsed_else_if.rs similarity index 100% rename from crates/biome_js_analyze/src/analyzers/nursery/use_collapsed_else_if.rs rename to crates/biome_js_analyze/src/analyzers/style/use_collapsed_else_if.rs diff --git a/crates/biome_js_analyze/src/analyzers/style/use_enum_initializers.rs b/crates/biome_js_analyze/src/analyzers/style/use_enum_initializers.rs index 3520ba3a97a1..31c09e6433bc 100644 --- a/crates/biome_js_analyze/src/analyzers/style/use_enum_initializers.rs +++ b/crates/biome_js_analyze/src/analyzers/style/use_enum_initializers.rs @@ -1,6 +1,6 @@ use crate::JsRuleAction; use biome_analyze::context::RuleContext; -use biome_analyze::{declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic}; +use biome_analyze::{declare_rule, ActionCategory, Ast, FixKind, Rule, RuleDiagnostic}; use biome_console::markup; use biome_diagnostics::Applicability; use biome_js_factory::make; @@ -70,6 +70,7 @@ declare_rule! { version: "1.0.0", name: "useEnumInitializers", recommended: true, + fix_kind: FixKind::Safe, } } diff --git a/crates/biome_js_analyze/src/analyzers/suspicious.rs b/crates/biome_js_analyze/src/analyzers/suspicious.rs index 1bf1df542588..23bbaa07633c 100644 --- a/crates/biome_js_analyze/src/analyzers/suspicious.rs +++ b/crates/biome_js_analyze/src/analyzers/suspicious.rs @@ -7,6 +7,7 @@ pub(crate) mod no_async_promise_executor; pub(crate) mod no_comment_text; pub(crate) mod no_compare_neg_zero; pub(crate) mod no_confusing_labels; +pub(crate) mod no_confusing_void_type; pub(crate) mod no_const_enum; pub(crate) mod no_control_characters_in_regex; pub(crate) mod no_debugger; @@ -18,6 +19,7 @@ pub(crate) mod no_duplicate_object_keys; pub(crate) mod no_empty_interface; pub(crate) mod no_explicit_any; pub(crate) mod no_extra_non_null_assertion; +pub(crate) mod no_fallthrough_switch_clause; pub(crate) mod no_prototype_builtins; pub(crate) mod no_redundant_use_strict; pub(crate) mod no_self_compare; @@ -38,6 +40,7 @@ declare_group! { self :: no_comment_text :: NoCommentText , self :: no_compare_neg_zero :: NoCompareNegZero , self :: no_confusing_labels :: NoConfusingLabels , + self :: no_confusing_void_type :: NoConfusingVoidType , self :: no_const_enum :: NoConstEnum , self :: no_control_characters_in_regex :: NoControlCharactersInRegex , self :: no_debugger :: NoDebugger , @@ -49,6 +52,7 @@ declare_group! { self :: no_empty_interface :: NoEmptyInterface , self :: no_explicit_any :: NoExplicitAny , self :: no_extra_non_null_assertion :: NoExtraNonNullAssertion , + self :: no_fallthrough_switch_clause :: NoFallthroughSwitchClause , self :: no_prototype_builtins :: NoPrototypeBuiltins , self :: no_redundant_use_strict :: NoRedundantUseStrict , self :: no_self_compare :: NoSelfCompare , diff --git a/crates/biome_js_analyze/src/analyzers/nursery/no_confusing_void_type.rs b/crates/biome_js_analyze/src/analyzers/suspicious/no_confusing_void_type.rs similarity index 92% rename from crates/biome_js_analyze/src/analyzers/nursery/no_confusing_void_type.rs rename to crates/biome_js_analyze/src/analyzers/suspicious/no_confusing_void_type.rs index c8445ea5d414..0cff3a40b301 100644 --- a/crates/biome_js_analyze/src/analyzers/nursery/no_confusing_void_type.rs +++ b/crates/biome_js_analyze/src/analyzers/suspicious/no_confusing_void_type.rs @@ -49,7 +49,7 @@ declare_rule! { pub(crate) NoConfusingVoidType { version: "1.2.0", name: "noConfusingVoidType", - recommended: false, + recommended: true, } } @@ -79,11 +79,16 @@ impl Rule for NoConfusingVoidType { } fn diagnostic(ctx: &RuleContext, state: &Self::State) -> Option { let node = ctx.query(); - return Some(RuleDiagnostic::new( - rule_category!(), - node.range(), - markup! {{match_message(state)}}, - )); + return Some( + RuleDiagnostic::new( + rule_category!(), + node.range(), + markup! {{match_message(state)}}, + ) + .note(markup! { + "Remove ""void" + }), + ); } } diff --git a/crates/biome_js_analyze/src/analyzers/nursery/no_fallthrough_switch_clause.rs b/crates/biome_js_analyze/src/analyzers/suspicious/no_fallthrough_switch_clause.rs similarity index 99% rename from crates/biome_js_analyze/src/analyzers/nursery/no_fallthrough_switch_clause.rs rename to crates/biome_js_analyze/src/analyzers/suspicious/no_fallthrough_switch_clause.rs index c6339a4f4748..b17c72ad8ce6 100644 --- a/crates/biome_js_analyze/src/analyzers/nursery/no_fallthrough_switch_clause.rs +++ b/crates/biome_js_analyze/src/analyzers/suspicious/no_fallthrough_switch_clause.rs @@ -57,7 +57,7 @@ declare_rule! { pub(crate) NoFallthroughSwitchClause { version: "1.0.0", name: "noFallthroughSwitchClause", - recommended: false, + recommended: true, } } diff --git a/crates/biome_js_analyze/src/aria_analyzers/a11y/no_aria_unsupported_elements.rs b/crates/biome_js_analyze/src/aria_analyzers/a11y/no_aria_unsupported_elements.rs index 15b3e27f2389..05ef6ef5011d 100644 --- a/crates/biome_js_analyze/src/aria_analyzers/a11y/no_aria_unsupported_elements.rs +++ b/crates/biome_js_analyze/src/aria_analyzers/a11y/no_aria_unsupported_elements.rs @@ -1,5 +1,7 @@ use crate::{aria_services::Aria, JsRuleAction}; -use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Rule, RuleDiagnostic}; +use biome_analyze::{ + context::RuleContext, declare_rule, ActionCategory, FixKind, Rule, RuleDiagnostic, +}; use biome_console::markup; use biome_diagnostics::Applicability; use biome_js_syntax::jsx_ext::AnyJsxElement; @@ -37,6 +39,7 @@ declare_rule! { version: "1.0.0", name: "noAriaUnsupportedElements", recommended: true, + fix_kind: FixKind::Unsafe, } } diff --git a/crates/biome_js_analyze/src/aria_analyzers/a11y/use_valid_aria_props.rs b/crates/biome_js_analyze/src/aria_analyzers/a11y/use_valid_aria_props.rs index 927111654ed3..ffc32e8a6000 100644 --- a/crates/biome_js_analyze/src/aria_analyzers/a11y/use_valid_aria_props.rs +++ b/crates/biome_js_analyze/src/aria_analyzers/a11y/use_valid_aria_props.rs @@ -1,7 +1,7 @@ use crate::aria_services::Aria; use crate::JsRuleAction; use biome_analyze::context::RuleContext; -use biome_analyze::{declare_rule, ActionCategory, Rule, RuleDiagnostic}; +use biome_analyze::{declare_rule, ActionCategory, FixKind, Rule, RuleDiagnostic}; use biome_console::markup; use biome_diagnostics::Applicability; use biome_js_syntax::jsx_ext::AnyJsxElement; @@ -29,6 +29,7 @@ declare_rule! { version: "1.0.0", name: "useValidAriaProps", recommended: true, + fix_kind: FixKind::Unsafe, } } diff --git a/crates/biome_js_analyze/src/aria_analyzers/nursery/no_interactive_element_to_noninteractive_role.rs b/crates/biome_js_analyze/src/aria_analyzers/nursery/no_interactive_element_to_noninteractive_role.rs index 4fef78f54e8c..26a2e38b79fc 100644 --- a/crates/biome_js_analyze/src/aria_analyzers/nursery/no_interactive_element_to_noninteractive_role.rs +++ b/crates/biome_js_analyze/src/aria_analyzers/nursery/no_interactive_element_to_noninteractive_role.rs @@ -31,7 +31,7 @@ declare_rule! { /// ``` /// pub(crate) NoInteractiveElementToNoninteractiveRole { - version: "next", + version: "1.3.0", name: "noInteractiveElementToNoninteractiveRole", recommended: false, } diff --git a/crates/biome_js_analyze/src/aria_analyzers/nursery/use_aria_activedescendant_with_tabindex.rs b/crates/biome_js_analyze/src/aria_analyzers/nursery/use_aria_activedescendant_with_tabindex.rs index 8dcb9cc6b36f..7d88808fa6e1 100644 --- a/crates/biome_js_analyze/src/aria_analyzers/nursery/use_aria_activedescendant_with_tabindex.rs +++ b/crates/biome_js_analyze/src/aria_analyzers/nursery/use_aria_activedescendant_with_tabindex.rs @@ -40,7 +40,7 @@ declare_rule! { /// ``` /// pub(crate) UseAriaActivedescendantWithTabindex { - version: "next", + version: "1.3.0", name: "useAriaActivedescendantWithTabindex", recommended: false, } diff --git a/crates/biome_js_analyze/src/lib.rs b/crates/biome_js_analyze/src/lib.rs index c9903035ba16..5d149c0b8031 100644 --- a/crates/biome_js_analyze/src/lib.rs +++ b/crates/biome_js_analyze/src/lib.rs @@ -226,7 +226,9 @@ mod tests { use biome_js_syntax::{JsFileSource, TextRange, TextSize}; use std::slice; - use crate::semantic_analyzers::nursery::use_exhaustive_dependencies::{Hooks, HooksOptions}; + use crate::semantic_analyzers::correctness::use_exhaustive_dependencies::{ + Hooks, HooksOptions, + }; use crate::{analyze, AnalysisFilter, ControlFlow}; #[ignore] diff --git a/crates/biome_js_analyze/src/options.rs b/crates/biome_js_analyze/src/options.rs index df477f1ab4d7..364c685e90c1 100644 --- a/crates/biome_js_analyze/src/options.rs +++ b/crates/biome_js_analyze/src/options.rs @@ -1,7 +1,9 @@ //! This module contains the rules that have options -use crate::analyzers::nursery::no_excessive_complexity::{complexity_options, ComplexityOptions}; -use crate::semantic_analyzers::nursery::use_exhaustive_dependencies::{ +use crate::analyzers::complexity::no_excessive_complexity::{ + complexity_options, ComplexityOptions, +}; +use crate::semantic_analyzers::correctness::use_exhaustive_dependencies::{ hooks_options, HooksOptions, }; use crate::semantic_analyzers::style::no_restricted_globals::{ diff --git a/crates/biome_js_analyze/src/semantic_analyzers.rs b/crates/biome_js_analyze/src/semantic_analyzers.rs index fa2609231a87..3cdc41e70a58 100644 --- a/crates/biome_js_analyze/src/semantic_analyzers.rs +++ b/crates/biome_js_analyze/src/semantic_analyzers.rs @@ -4,7 +4,8 @@ pub(crate) mod a11y; pub(crate) mod complexity; pub(crate) mod correctness; pub(crate) mod nursery; +pub(crate) mod performance; pub(crate) mod security; pub(crate) mod style; pub(crate) mod suspicious; -::biome_analyze::declare_category! { pub (crate) SemanticAnalyzers { kind : Lint , groups : [self :: a11y :: A11y , self :: complexity :: Complexity , self :: correctness :: Correctness , self :: nursery :: Nursery , self :: security :: Security , self :: style :: Style , self :: suspicious :: Suspicious ,] } } +::biome_analyze::declare_category! { pub (crate) SemanticAnalyzers { kind : Lint , groups : [self :: a11y :: A11y , self :: complexity :: Complexity , self :: correctness :: Correctness , self :: nursery :: Nursery , self :: performance :: Performance , self :: security :: Security , self :: style :: Style , self :: suspicious :: Suspicious ,] } } diff --git a/crates/biome_js_analyze/src/semantic_analyzers/a11y/no_positive_tabindex.rs b/crates/biome_js_analyze/src/semantic_analyzers/a11y/no_positive_tabindex.rs index 501c9fe0778e..42ec92a31869 100644 --- a/crates/biome_js_analyze/src/semantic_analyzers/a11y/no_positive_tabindex.rs +++ b/crates/biome_js_analyze/src/semantic_analyzers/a11y/no_positive_tabindex.rs @@ -2,7 +2,7 @@ use crate::react::{ReactApiCall, ReactCreateElementCall}; use crate::semantic_services::Semantic; use crate::JsRuleAction; use biome_analyze::context::RuleContext; -use biome_analyze::{declare_rule, Rule, RuleDiagnostic}; +use biome_analyze::{declare_rule, FixKind, Rule, RuleDiagnostic}; use biome_console::markup; use biome_diagnostics::Applicability; use biome_js_factory::make; @@ -52,6 +52,7 @@ declare_rule! { version: "1.0.0", name: "noPositiveTabindex", recommended: true, + fix_kind: FixKind::Unsafe, } } diff --git a/crates/biome_js_analyze/src/semantic_analyzers/correctness.rs b/crates/biome_js_analyze/src/semantic_analyzers/correctness.rs index d3fb1456c22b..21f3565536c9 100644 --- a/crates/biome_js_analyze/src/semantic_analyzers/correctness.rs +++ b/crates/biome_js_analyze/src/semantic_analyzers/correctness.rs @@ -11,6 +11,8 @@ pub(crate) mod no_render_return_value; pub(crate) mod no_undeclared_variables; pub(crate) mod no_unused_variables; pub(crate) mod no_void_elements_with_children; +pub(crate) mod use_exhaustive_dependencies; +pub(crate) mod use_hook_at_top_level; pub(crate) mod use_is_nan; declare_group! { @@ -26,6 +28,8 @@ declare_group! { self :: no_undeclared_variables :: NoUndeclaredVariables , self :: no_unused_variables :: NoUnusedVariables , self :: no_void_elements_with_children :: NoVoidElementsWithChildren , + self :: use_exhaustive_dependencies :: UseExhaustiveDependencies , + self :: use_hook_at_top_level :: UseHookAtTopLevel , self :: use_is_nan :: UseIsNan , ] } diff --git a/crates/biome_js_analyze/src/semantic_analyzers/nursery/use_exhaustive_dependencies.rs b/crates/biome_js_analyze/src/semantic_analyzers/correctness/use_exhaustive_dependencies.rs similarity index 100% rename from crates/biome_js_analyze/src/semantic_analyzers/nursery/use_exhaustive_dependencies.rs rename to crates/biome_js_analyze/src/semantic_analyzers/correctness/use_exhaustive_dependencies.rs diff --git a/crates/biome_js_analyze/src/semantic_analyzers/nursery/use_hook_at_top_level.rs b/crates/biome_js_analyze/src/semantic_analyzers/correctness/use_hook_at_top_level.rs similarity index 97% rename from crates/biome_js_analyze/src/semantic_analyzers/nursery/use_hook_at_top_level.rs rename to crates/biome_js_analyze/src/semantic_analyzers/correctness/use_hook_at_top_level.rs index 4aa0dd7bcd4c..c2d8d892fd74 100644 --- a/crates/biome_js_analyze/src/semantic_analyzers/nursery/use_hook_at_top_level.rs +++ b/crates/biome_js_analyze/src/semantic_analyzers/correctness/use_hook_at_top_level.rs @@ -1,5 +1,6 @@ -use super::use_exhaustive_dependencies::ReactExtensiveDependenciesOptions; -use crate::semantic_analyzers::nursery::use_exhaustive_dependencies::HooksOptions; +use crate::semantic_analyzers::correctness::use_exhaustive_dependencies::{ + HooksOptions, ReactExtensiveDependenciesOptions, +}; use crate::{react::hooks::react_hook_configuration, semantic_services::Semantic}; use biome_analyze::{context::RuleContext, declare_rule, Rule, RuleDiagnostic}; use biome_console::markup; diff --git a/crates/biome_js_analyze/src/semantic_analyzers/nursery.rs b/crates/biome_js_analyze/src/semantic_analyzers/nursery.rs index 9bf0f79ba173..66ea2f13a88c 100644 --- a/crates/biome_js_analyze/src/semantic_analyzers/nursery.rs +++ b/crates/biome_js_analyze/src/semantic_analyzers/nursery.rs @@ -2,27 +2,17 @@ use biome_analyze::declare_group; -pub(crate) mod no_accumulating_spread; pub(crate) mod no_global_is_finite; -pub(crate) mod no_global_is_nan; pub(crate) mod no_invalid_new_builtin; pub(crate) mod no_unused_imports; -pub(crate) mod use_exhaustive_dependencies; -pub(crate) mod use_hook_at_top_level; -pub(crate) mod use_is_array; declare_group! { pub (crate) Nursery { name : "nursery" , rules : [ - self :: no_accumulating_spread :: NoAccumulatingSpread , self :: no_global_is_finite :: NoGlobalIsFinite , - self :: no_global_is_nan :: NoGlobalIsNan , self :: no_invalid_new_builtin :: NoInvalidNewBuiltin , self :: no_unused_imports :: NoUnusedImports , - self :: use_exhaustive_dependencies :: UseExhaustiveDependencies , - self :: use_hook_at_top_level :: UseHookAtTopLevel , - self :: use_is_array :: UseIsArray , ] } } diff --git a/crates/biome_js_analyze/src/semantic_analyzers/nursery/no_invalid_new_builtin.rs b/crates/biome_js_analyze/src/semantic_analyzers/nursery/no_invalid_new_builtin.rs index 0a8c66ecf798..7d5ec997d523 100644 --- a/crates/biome_js_analyze/src/semantic_analyzers/nursery/no_invalid_new_builtin.rs +++ b/crates/biome_js_analyze/src/semantic_analyzers/nursery/no_invalid_new_builtin.rs @@ -52,7 +52,7 @@ declare_rule! { /// } /// ``` pub(crate) NoInvalidNewBuiltin { - version: "next", + version: "1.3.0", name: "noInvalidNewBuiltin", recommended: true, fix_kind: FixKind::Unsafe, diff --git a/crates/biome_js_analyze/src/semantic_analyzers/nursery/no_unused_imports.rs b/crates/biome_js_analyze/src/semantic_analyzers/nursery/no_unused_imports.rs index 2e48f4a0507d..2fd4be363a8b 100644 --- a/crates/biome_js_analyze/src/semantic_analyzers/nursery/no_unused_imports.rs +++ b/crates/biome_js_analyze/src/semantic_analyzers/nursery/no_unused_imports.rs @@ -64,7 +64,7 @@ declare_rule! { /// } /// ``` pub(crate) NoUnusedImports { - version: "next", + version: "1.3.0", name: "noUnusedImports", recommended: false, fix_kind: FixKind::Safe, diff --git a/crates/biome_js_analyze/src/semantic_analyzers/performance.rs b/crates/biome_js_analyze/src/semantic_analyzers/performance.rs new file mode 100644 index 000000000000..0de72aca9752 --- /dev/null +++ b/crates/biome_js_analyze/src/semantic_analyzers/performance.rs @@ -0,0 +1,14 @@ +//! Generated file, do not edit by hand, see `xtask/codegen` + +use biome_analyze::declare_group; + +pub(crate) mod no_accumulating_spread; + +declare_group! { + pub (crate) Performance { + name : "performance" , + rules : [ + self :: no_accumulating_spread :: NoAccumulatingSpread , + ] + } +} diff --git a/crates/biome_js_analyze/src/semantic_analyzers/nursery/no_accumulating_spread.rs b/crates/biome_js_analyze/src/semantic_analyzers/performance/no_accumulating_spread.rs similarity index 96% rename from crates/biome_js_analyze/src/semantic_analyzers/nursery/no_accumulating_spread.rs rename to crates/biome_js_analyze/src/semantic_analyzers/performance/no_accumulating_spread.rs index 61f6cc5f406a..3ba228774986 100644 --- a/crates/biome_js_analyze/src/semantic_analyzers/nursery/no_accumulating_spread.rs +++ b/crates/biome_js_analyze/src/semantic_analyzers/performance/no_accumulating_spread.rs @@ -48,7 +48,7 @@ declare_rule! { pub(crate) NoAccumulatingSpread { version: "1.0.0", name: "noAccumulatingSpread", - recommended: false, + recommended: true, } } @@ -77,6 +77,9 @@ impl Rule for NoAccumulatingSpread { ) .note(markup! { "Spread syntax should be avoided on accumulators (like those in `.reduce`) because it causes a time complexity of `O(n^2)`." + }) + .note(markup! { + "Consider methods such as .splice or .push instead." }), ) } diff --git a/crates/biome_js_analyze/src/semantic_analyzers/suspicious.rs b/crates/biome_js_analyze/src/semantic_analyzers/suspicious.rs index f625308ec981..95d1dee74468 100644 --- a/crates/biome_js_analyze/src/semantic_analyzers/suspicious.rs +++ b/crates/biome_js_analyze/src/semantic_analyzers/suspicious.rs @@ -8,10 +8,12 @@ pub(crate) mod no_class_assign; pub(crate) mod no_console_log; pub(crate) mod no_duplicate_parameters; pub(crate) mod no_function_assign; +pub(crate) mod no_global_is_nan; pub(crate) mod no_import_assign; pub(crate) mod no_label_var; pub(crate) mod no_redeclare; pub(crate) mod no_unsafe_declaration_merging; +pub(crate) mod use_is_array; declare_group! { pub (crate) Suspicious { @@ -23,10 +25,12 @@ declare_group! { self :: no_console_log :: NoConsoleLog , self :: no_duplicate_parameters :: NoDuplicateParameters , self :: no_function_assign :: NoFunctionAssign , + self :: no_global_is_nan :: NoGlobalIsNan , self :: no_import_assign :: NoImportAssign , self :: no_label_var :: NoLabelVar , self :: no_redeclare :: NoRedeclare , self :: no_unsafe_declaration_merging :: NoUnsafeDeclarationMerging , + self :: use_is_array :: UseIsArray , ] } } diff --git a/crates/biome_js_analyze/src/semantic_analyzers/nursery/no_global_is_nan.rs b/crates/biome_js_analyze/src/semantic_analyzers/suspicious/no_global_is_nan.rs similarity index 100% rename from crates/biome_js_analyze/src/semantic_analyzers/nursery/no_global_is_nan.rs rename to crates/biome_js_analyze/src/semantic_analyzers/suspicious/no_global_is_nan.rs diff --git a/crates/biome_js_analyze/src/semantic_analyzers/nursery/use_is_array.rs b/crates/biome_js_analyze/src/semantic_analyzers/suspicious/use_is_array.rs similarity index 100% rename from crates/biome_js_analyze/src/semantic_analyzers/nursery/use_is_array.rs rename to crates/biome_js_analyze/src/semantic_analyzers/suspicious/use_is_array.rs diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/booleanOperators.js b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/booleanOperators.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/booleanOperators.js rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/booleanOperators.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/booleanOperators.js.snap b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/booleanOperators.js.snap similarity index 87% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/booleanOperators.js.snap rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/booleanOperators.js.snap index 72d5312c1655..d07ec82ee688 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/booleanOperators.js.snap +++ b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/booleanOperators.js.snap @@ -17,7 +17,7 @@ function booleanOperators() { # Diagnostics ``` -booleanOperators.js:1:10 lint/nursery/noExcessiveComplexity ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +booleanOperators.js:1:10 lint/complexity/noExcessiveComplexity ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Excessive complexity detected. diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/booleanOperators.options.json b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/booleanOperators.options.json similarity index 92% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/booleanOperators.options.json rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/booleanOperators.options.json index 19577c03aaa4..7c5c368e295e 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/booleanOperators.options.json +++ b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/booleanOperators.options.json @@ -2,7 +2,7 @@ "$schema": "../../../../../../packages/@biomejs/biome/configuration_schema.json", "linter": { "rules": { - "nursery": { + "complexity": { "noExcessiveComplexity": { "level": "error", "options": { diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/booleanOperators2.js b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/booleanOperators2.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/booleanOperators2.js rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/booleanOperators2.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/booleanOperators2.js.snap b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/booleanOperators2.js.snap similarity index 87% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/booleanOperators2.js.snap rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/booleanOperators2.js.snap index c8f21b56c135..2d8af2cf9d2c 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/booleanOperators2.js.snap +++ b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/booleanOperators2.js.snap @@ -16,7 +16,7 @@ function booleanOperators2() { # Diagnostics ``` -booleanOperators2.js:1:10 lint/nursery/noExcessiveComplexity ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +booleanOperators2.js:1:10 lint/complexity/noExcessiveComplexity ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Excessive complexity detected. diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/booleanOperators2.options.json b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/booleanOperators2.options.json similarity index 92% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/booleanOperators2.options.json rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/booleanOperators2.options.json index ae49791e30dc..2682357a88d2 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/booleanOperators2.options.json +++ b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/booleanOperators2.options.json @@ -2,7 +2,7 @@ "$schema": "../../../../../../packages/@biomejs/biome/configuration_schema.json", "linter": { "rules": { - "nursery": { + "complexity": { "noExcessiveComplexity": { "level": "error", "options": { diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/complexEventHandler.ts b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/complexEventHandler.ts similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/complexEventHandler.ts rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/complexEventHandler.ts diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/complexEventHandler.ts.snap b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/complexEventHandler.ts.snap similarity index 96% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/complexEventHandler.ts.snap rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/complexEventHandler.ts.snap index e80bb7607c85..70b6f9647f4c 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/complexEventHandler.ts.snap +++ b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/complexEventHandler.ts.snap @@ -104,7 +104,7 @@ function handleArrowDown(event: React.KeyboardEvent) { # Diagnostics ``` -complexEventHandler.ts:1:10 lint/nursery/noExcessiveComplexity ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +complexEventHandler.ts:1:10 lint/complexity/noExcessiveComplexity ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Excessive complexity detected. diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/excessiveNesting.js b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/excessiveNesting.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/excessiveNesting.js rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/excessiveNesting.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/excessiveNesting.js.snap b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/excessiveNesting.js.snap similarity index 94% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/excessiveNesting.js.snap rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/excessiveNesting.js.snap index 81a78e1500aa..b35337648532 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/excessiveNesting.js.snap +++ b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/excessiveNesting.js.snap @@ -36,7 +36,7 @@ function excessiveNesting() { # Diagnostics ``` -excessiveNesting.js:10:46 lint/nursery/noExcessiveComplexity ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +excessiveNesting.js:10:46 lint/complexity/noExcessiveComplexity ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Excessive complexity detected. diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/functionalChain.js b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/functionalChain.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/functionalChain.js rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/functionalChain.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/functionalChain.js.snap b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/functionalChain.js.snap similarity index 89% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/functionalChain.js.snap rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/functionalChain.js.snap index 238cb73409cc..d2fa8fc34f07 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/functionalChain.js.snap +++ b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/functionalChain.js.snap @@ -23,7 +23,7 @@ function functionalChain(array) { # Diagnostics ``` -functionalChain.js:4:24 lint/nursery/noExcessiveComplexity ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +functionalChain.js:4:24 lint/complexity/noExcessiveComplexity ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Excessive complexity detected. diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/functionalChain.options.json b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/functionalChain.options.json similarity index 92% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/functionalChain.options.json rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/functionalChain.options.json index ae49791e30dc..2682357a88d2 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/functionalChain.options.json +++ b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/functionalChain.options.json @@ -2,7 +2,7 @@ "$schema": "../../../../../../packages/@biomejs/biome/configuration_schema.json", "linter": { "rules": { - "nursery": { + "complexity": { "noExcessiveComplexity": { "level": "error", "options": { diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/getWords.js b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/getWords.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/getWords.js rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/getWords.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/getWords.js.snap b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/getWords.js.snap similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/getWords.js.snap rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/getWords.js.snap diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/getWords.options.json b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/getWords.options.json similarity index 92% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/getWords.options.json rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/getWords.options.json index 0e547d0774ce..40032c386ed0 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/getWords.options.json +++ b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/getWords.options.json @@ -2,7 +2,7 @@ "$schema": "../../../../../../packages/@biomejs/biome/configuration_schema.json", "linter": { "rules": { - "nursery": { + "complexity": { "noExcessiveComplexity": { "level": "error", "options": { diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/invalidConfig.js b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/invalidConfig.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/invalidConfig.js rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/invalidConfig.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/invalidConfig.js.snap b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/invalidConfig.js.snap similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/invalidConfig.js.snap rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/invalidConfig.js.snap diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/invalidConfig.options.json b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/invalidConfig.options.json similarity index 92% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/invalidConfig.options.json rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/invalidConfig.options.json index 95c3bc1c7953..795e24ee1769 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/invalidConfig.options.json +++ b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/invalidConfig.options.json @@ -2,7 +2,7 @@ "$schema": "../../../../../../packages/@biomejs/biome/configuration_schema.json", "linter": { "rules": { - "nursery": { + "complexity": { "noExcessiveComplexity": { "level": "error", "options": { diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/lambdas.js b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/lambdas.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/lambdas.js rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/lambdas.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/lambdas.js.snap b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/lambdas.js.snap similarity index 86% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/lambdas.js.snap rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/lambdas.js.snap index 1c69a620369c..1db6ff204c64 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/lambdas.js.snap +++ b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/lambdas.js.snap @@ -38,7 +38,7 @@ function lambdas(array) { # Diagnostics ``` -lambdas.js:4:26 lint/nursery/noExcessiveComplexity ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +lambdas.js:4:26 lint/complexity/noExcessiveComplexity ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Excessive complexity detected. @@ -55,7 +55,7 @@ lambdas.js:4:26 lint/nursery/noExcessiveComplexity ━━━━━━━━━ ``` ``` -lambdas.js:10:22 lint/nursery/noExcessiveComplexity ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +lambdas.js:10:22 lint/complexity/noExcessiveComplexity ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Excessive complexity detected. @@ -72,7 +72,7 @@ lambdas.js:10:22 lint/nursery/noExcessiveComplexity ━━━━━━━━━ ``` ``` -lambdas.js:16:23 lint/nursery/noExcessiveComplexity ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +lambdas.js:16:23 lint/complexity/noExcessiveComplexity ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Excessive complexity detected. @@ -89,7 +89,7 @@ lambdas.js:16:23 lint/nursery/noExcessiveComplexity ━━━━━━━━━ ``` ``` -lambdas.js:22:32 lint/nursery/noExcessiveComplexity ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +lambdas.js:22:32 lint/complexity/noExcessiveComplexity ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Excessive complexity detected. diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/lambdas.options.json b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/lambdas.options.json similarity index 92% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/lambdas.options.json rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/lambdas.options.json index 19577c03aaa4..7c5c368e295e 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/lambdas.options.json +++ b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/lambdas.options.json @@ -2,7 +2,7 @@ "$schema": "../../../../../../packages/@biomejs/biome/configuration_schema.json", "linter": { "rules": { - "nursery": { + "complexity": { "noExcessiveComplexity": { "level": "error", "options": { diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/nestedControlFlowStructures.js b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/nestedControlFlowStructures.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/nestedControlFlowStructures.js rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/nestedControlFlowStructures.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/nestedControlFlowStructures.js.snap b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/nestedControlFlowStructures.js.snap similarity index 84% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/nestedControlFlowStructures.js.snap rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/nestedControlFlowStructures.js.snap index 1bea0844b061..83bc64f142e4 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/nestedControlFlowStructures.js.snap +++ b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/nestedControlFlowStructures.js.snap @@ -20,7 +20,7 @@ function nestedControlFlowStructures(num) { # Diagnostics ``` -nestedControlFlowStructures.js:1:10 lint/nursery/noExcessiveComplexity ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +nestedControlFlowStructures.js:1:10 lint/complexity/noExcessiveComplexity ━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Excessive complexity detected. diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/nestedControlFlowStructures.options.json b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/nestedControlFlowStructures.options.json similarity index 92% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/nestedControlFlowStructures.options.json rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/nestedControlFlowStructures.options.json index 0ec125f827a5..3daff8bcfd52 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/nestedControlFlowStructures.options.json +++ b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/nestedControlFlowStructures.options.json @@ -2,7 +2,7 @@ "$schema": "../../../../../../packages/@biomejs/biome/configuration_schema.json", "linter": { "rules": { - "nursery": { + "complexity": { "noExcessiveComplexity": { "level": "error", "options": { diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/simpleBranches.js b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/simpleBranches.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/simpleBranches.js rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/simpleBranches.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/simpleBranches.js.snap b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/simpleBranches.js.snap similarity index 85% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/simpleBranches.js.snap rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/simpleBranches.js.snap index 14b0ca7ad537..6fb6b5c9b217 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/simpleBranches.js.snap +++ b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/simpleBranches.js.snap @@ -18,7 +18,7 @@ function simpleBranches() { # Diagnostics ``` -simpleBranches.js:1:10 lint/nursery/noExcessiveComplexity ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +simpleBranches.js:1:10 lint/complexity/noExcessiveComplexity ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Excessive complexity detected. diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/simpleBranches.options.json b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/simpleBranches.options.json similarity index 92% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/simpleBranches.options.json rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/simpleBranches.options.json index ae49791e30dc..2682357a88d2 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/simpleBranches.options.json +++ b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/simpleBranches.options.json @@ -2,7 +2,7 @@ "$schema": "../../../../../../packages/@biomejs/biome/configuration_schema.json", "linter": { "rules": { - "nursery": { + "complexity": { "noExcessiveComplexity": { "level": "error", "options": { diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/simpleBranches2.js b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/simpleBranches2.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/simpleBranches2.js rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/simpleBranches2.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/simpleBranches2.js.snap b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/simpleBranches2.js.snap similarity index 85% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/simpleBranches2.js.snap rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/simpleBranches2.js.snap index 38039b921201..2f4ea05e32f8 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/simpleBranches2.js.snap +++ b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/simpleBranches2.js.snap @@ -16,7 +16,7 @@ function simpleBranches2() { # Diagnostics ``` -simpleBranches2.js:1:10 lint/nursery/noExcessiveComplexity ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +simpleBranches2.js:1:10 lint/complexity/noExcessiveComplexity ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Excessive complexity detected. diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/simpleBranches2.options.json b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/simpleBranches2.options.json similarity index 92% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/simpleBranches2.options.json rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/simpleBranches2.options.json index 0e547d0774ce..40032c386ed0 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/simpleBranches2.options.json +++ b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/simpleBranches2.options.json @@ -2,7 +2,7 @@ "$schema": "../../../../../../packages/@biomejs/biome/configuration_schema.json", "linter": { "rules": { - "nursery": { + "complexity": { "noExcessiveComplexity": { "level": "error", "options": { diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/sumOfPrimes.js b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/sumOfPrimes.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/sumOfPrimes.js rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/sumOfPrimes.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/sumOfPrimes.js.snap b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/sumOfPrimes.js.snap similarity index 86% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/sumOfPrimes.js.snap rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/sumOfPrimes.js.snap index d3b795cdcb77..5f779e62dcee 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/sumOfPrimes.js.snap +++ b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/sumOfPrimes.js.snap @@ -21,7 +21,7 @@ function sumOfPrimes(max) { # Diagnostics ``` -sumOfPrimes.js:1:10 lint/nursery/noExcessiveComplexity ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +sumOfPrimes.js:1:10 lint/complexity/noExcessiveComplexity ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Excessive complexity detected. diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/sumOfPrimes.options.json b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/sumOfPrimes.options.json similarity index 92% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/sumOfPrimes.options.json rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/sumOfPrimes.options.json index 8a4e850bcf57..c3e41f83d224 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/sumOfPrimes.options.json +++ b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/sumOfPrimes.options.json @@ -2,7 +2,7 @@ "$schema": "../../../../../../packages/@biomejs/biome/configuration_schema.json", "linter": { "rules": { - "nursery": { + "complexity": { "noExcessiveComplexity": { "level": "error", "options": { diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/valid.js b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/valid.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/valid.js rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/valid.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/valid.js.snap b/crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/valid.js.snap similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noExcessiveComplexity/valid.js.snap rename to crates/biome_js_analyze/tests/specs/complexity/noExcessiveComplexity/valid.js.snap diff --git a/crates/biome_js_analyze/tests/specs/complexity/noForEach/invalid.js.snap b/crates/biome_js_analyze/tests/specs/complexity/noForEach/invalid.js.snap index 5c2ce3ec29e3..d76391259e25 100644 --- a/crates/biome_js_analyze/tests/specs/complexity/noForEach/invalid.js.snap +++ b/crates/biome_js_analyze/tests/specs/complexity/noForEach/invalid.js.snap @@ -36,6 +36,8 @@ invalid.js:1:1 lint/complexity/noForEach ━━━━━━━━━━━━━ 4 │ 5 │ (els.forEach)((el) => { + i forEach could lead to performance issue when working with large arrays. When combined with functions like .filter or .map, this causes multiple iterations over the same type. + ``` @@ -54,6 +56,8 @@ invalid.js:5:1 lint/complexity/noForEach ━━━━━━━━━━━━━ 8 │ 9 │ els['forEach']((el) => { + i forEach could lead to performance issue when working with large arrays. When combined with functions like .filter or .map, this causes multiple iterations over the same type. + ``` @@ -72,6 +76,8 @@ invalid.js:9:1 lint/complexity/noForEach ━━━━━━━━━━━━━ 12 │ 13 │ (els['forEach'])((el) => { + i forEach could lead to performance issue when working with large arrays. When combined with functions like .filter or .map, this causes multiple iterations over the same type. + ``` @@ -89,6 +95,8 @@ invalid.js:13:1 lint/complexity/noForEach ━━━━━━━━━━━━ │ ^^ 16 │ + i forEach could lead to performance issue when working with large arrays. When combined with functions like .filter or .map, this causes multiple iterations over the same type. + ``` diff --git a/crates/biome_js_analyze/tests/specs/nursery/noVoid/invalid.js b/crates/biome_js_analyze/tests/specs/complexity/noVoid/invalid.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noVoid/invalid.js rename to crates/biome_js_analyze/tests/specs/complexity/noVoid/invalid.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/noVoid/invalid.js.snap b/crates/biome_js_analyze/tests/specs/complexity/noVoid/invalid.js.snap similarity index 81% rename from crates/biome_js_analyze/tests/specs/nursery/noVoid/invalid.js.snap rename to crates/biome_js_analyze/tests/specs/complexity/noVoid/invalid.js.snap index 2030f7c0287e..9a4f67188e0c 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/noVoid/invalid.js.snap +++ b/crates/biome_js_analyze/tests/specs/complexity/noVoid/invalid.js.snap @@ -16,7 +16,7 @@ void(0); # Diagnostics ``` -invalid.js:1:1 lint/nursery/noVoid ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:1:1 lint/complexity/noVoid ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The use of void is not allowed. @@ -31,7 +31,7 @@ invalid.js:1:1 lint/nursery/noVoid ━━━━━━━━━━━━━━━ ``` ``` -invalid.js:3:9 lint/nursery/noVoid ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:3:9 lint/complexity/noVoid ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The use of void is not allowed. @@ -48,7 +48,7 @@ invalid.js:3:9 lint/nursery/noVoid ━━━━━━━━━━━━━━━ ``` ``` -invalid.js:5:11 lint/nursery/noVoid ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:5:11 lint/complexity/noVoid ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The use of void is not allowed. @@ -65,7 +65,7 @@ invalid.js:5:11 lint/nursery/noVoid ━━━━━━━━━━━━━━ ``` ``` -invalid.js:6:1 lint/nursery/noVoid ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:6:1 lint/complexity/noVoid ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The use of void is not allowed. diff --git a/crates/biome_js_analyze/tests/specs/nursery/noVoid/valid.js b/crates/biome_js_analyze/tests/specs/complexity/noVoid/valid.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noVoid/valid.js rename to crates/biome_js_analyze/tests/specs/complexity/noVoid/valid.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/noVoid/valid.js.snap b/crates/biome_js_analyze/tests/specs/complexity/noVoid/valid.js.snap similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noVoid/valid.js.snap rename to crates/biome_js_analyze/tests/specs/complexity/noVoid/valid.js.snap diff --git a/crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/checkHooksImportedFromReact.js b/crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/checkHooksImportedFromReact.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/checkHooksImportedFromReact.js rename to crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/checkHooksImportedFromReact.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/checkHooksImportedFromReact.js.snap b/crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/checkHooksImportedFromReact.js.snap similarity index 87% rename from crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/checkHooksImportedFromReact.js.snap rename to crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/checkHooksImportedFromReact.js.snap index 5da9b8d635c6..3d0a97a5dff4 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/checkHooksImportedFromReact.js.snap +++ b/crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/checkHooksImportedFromReact.js.snap @@ -29,7 +29,7 @@ function MyComponent2() { # Diagnostics ``` -checkHooksImportedFromReact.js:3:9 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━ +checkHooksImportedFromReact.js:3:9 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━ ! This hook do not specify all of its dependencies. diff --git a/crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/customHook.js b/crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/customHook.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/customHook.js rename to crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/customHook.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/customHook.js.snap b/crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/customHook.js.snap similarity index 77% rename from crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/customHook.js.snap rename to crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/customHook.js.snap index 889b054d3f5e..1f082f589d57 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/customHook.js.snap +++ b/crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/customHook.js.snap @@ -20,7 +20,7 @@ function MyComponent() { # Diagnostics ``` -customHook.js:5:5 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +customHook.js:5:5 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This hook do not specify all of its dependencies. @@ -44,7 +44,7 @@ customHook.js:5:5 lint/nursery/useExhaustiveDependencies ━━━━━━━ ``` ``` -customHook.js:8:5 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +customHook.js:8:5 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This hook do not specify all of its dependencies. diff --git a/crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/customHook.options.json b/crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/customHook.options.json similarity index 94% rename from crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/customHook.options.json rename to crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/customHook.options.json index 3ded4e4abe33..41d344ef6976 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/customHook.options.json +++ b/crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/customHook.options.json @@ -2,7 +2,7 @@ "$schema": "../../../../../../packages/@biomejs/biome/configuration_schema.json", "linter": { "rules": { - "nursery": { + "correctness": { "useExhaustiveDependencies": { "level": "error", "options": { diff --git a/crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/extraDependenciesInvalid.js b/crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/extraDependenciesInvalid.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/extraDependenciesInvalid.js rename to crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/extraDependenciesInvalid.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/extraDependenciesInvalid.js.snap b/crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/extraDependenciesInvalid.js.snap similarity index 81% rename from crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/extraDependenciesInvalid.js.snap rename to crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/extraDependenciesInvalid.js.snap index 9823a4da1610..336719c8002e 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/extraDependenciesInvalid.js.snap +++ b/crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/extraDependenciesInvalid.js.snap @@ -40,7 +40,7 @@ function MyComponent1() { # Diagnostics ``` -extraDependenciesInvalid.js:5:3 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +extraDependenciesInvalid.js:5:3 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━ ! This hook specifies more dependencies than necessary. @@ -64,7 +64,7 @@ extraDependenciesInvalid.js:5:3 lint/nursery/useExhaustiveDependencies ━━━ ``` ``` -extraDependenciesInvalid.js:12:3 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +extraDependenciesInvalid.js:12:3 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━ ! This hook specifies more dependencies than necessary. @@ -97,7 +97,7 @@ extraDependenciesInvalid.js:12:3 lint/nursery/useExhaustiveDependencies ━━ ``` ``` -extraDependenciesInvalid.js:19:3 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +extraDependenciesInvalid.js:19:3 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━ ! This hook specifies more dependencies than necessary. @@ -121,7 +121,7 @@ extraDependenciesInvalid.js:19:3 lint/nursery/useExhaustiveDependencies ━━ ``` ``` -extraDependenciesInvalid.js:28:3 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +extraDependenciesInvalid.js:28:3 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━ ! This hook specifies a dependency more specific that its captures @@ -154,7 +154,7 @@ extraDependenciesInvalid.js:28:3 lint/nursery/useExhaustiveDependencies ━━ ``` ``` -extraDependenciesInvalid.js:28:3 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +extraDependenciesInvalid.js:28:3 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━ ! This hook do not specify all of its dependencies. diff --git a/crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/malformedOptions.js b/crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/malformedOptions.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/malformedOptions.js rename to crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/malformedOptions.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/malformedOptions.js.snap b/crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/malformedOptions.js.snap similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/malformedOptions.js.snap rename to crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/malformedOptions.js.snap diff --git a/crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/malformedOptions.options.json b/crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/malformedOptions.options.json similarity index 94% rename from crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/malformedOptions.options.json rename to crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/malformedOptions.options.json index 39864a3fff44..9ab294c717a8 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/malformedOptions.options.json +++ b/crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/malformedOptions.options.json @@ -2,7 +2,7 @@ "$schema": "../../../../../../packages/@biomejs/biome/configuration_schema.json", "linter": { "rules": { - "nursery": { + "correctness": { "useExhaustiveDependencies": { "level": "error", "options": { diff --git a/crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/missingDependenciesInvalid.js b/crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/missingDependenciesInvalid.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/missingDependenciesInvalid.js rename to crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/missingDependenciesInvalid.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/missingDependenciesInvalid.js.snap b/crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/missingDependenciesInvalid.js.snap similarity index 81% rename from crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/missingDependenciesInvalid.js.snap rename to crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/missingDependenciesInvalid.js.snap index 8216d1906de8..1bdd71a041b0 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/missingDependenciesInvalid.js.snap +++ b/crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/missingDependenciesInvalid.js.snap @@ -134,7 +134,7 @@ function MyComponent13() { # Diagnostics ``` -missingDependenciesInvalid.js:7:5 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━━ +missingDependenciesInvalid.js:7:5 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━ ! This hook do not specify all of its dependencies. @@ -158,7 +158,7 @@ missingDependenciesInvalid.js:7:5 lint/nursery/useExhaustiveDependencies ━━ ``` ``` -missingDependenciesInvalid.js:7:5 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━━ +missingDependenciesInvalid.js:7:5 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━ ! This hook do not specify all of its dependencies. @@ -182,7 +182,7 @@ missingDependenciesInvalid.js:7:5 lint/nursery/useExhaustiveDependencies ━━ ``` ``` -missingDependenciesInvalid.js:21:3 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━ +missingDependenciesInvalid.js:21:3 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━ ! This hook do not specify all of its dependencies. @@ -206,7 +206,7 @@ missingDependenciesInvalid.js:21:3 lint/nursery/useExhaustiveDependencies ━━ ``` ``` -missingDependenciesInvalid.js:21:3 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━ +missingDependenciesInvalid.js:21:3 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━ ! This hook do not specify all of its dependencies. @@ -230,7 +230,7 @@ missingDependenciesInvalid.js:21:3 lint/nursery/useExhaustiveDependencies ━━ ``` ``` -missingDependenciesInvalid.js:21:3 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━ +missingDependenciesInvalid.js:21:3 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━ ! This hook do not specify all of its dependencies. @@ -254,7 +254,7 @@ missingDependenciesInvalid.js:21:3 lint/nursery/useExhaustiveDependencies ━━ ``` ``` -missingDependenciesInvalid.js:21:3 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━ +missingDependenciesInvalid.js:21:3 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━ ! This hook do not specify all of its dependencies. @@ -278,7 +278,7 @@ missingDependenciesInvalid.js:21:3 lint/nursery/useExhaustiveDependencies ━━ ``` ``` -missingDependenciesInvalid.js:21:3 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━ +missingDependenciesInvalid.js:21:3 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━ ! This hook do not specify all of its dependencies. @@ -302,7 +302,7 @@ missingDependenciesInvalid.js:21:3 lint/nursery/useExhaustiveDependencies ━━ ``` ``` -missingDependenciesInvalid.js:21:3 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━ +missingDependenciesInvalid.js:21:3 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━ ! This hook do not specify all of its dependencies. @@ -325,7 +325,7 @@ missingDependenciesInvalid.js:21:3 lint/nursery/useExhaustiveDependencies ━━ ``` ``` -missingDependenciesInvalid.js:41:3 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━ +missingDependenciesInvalid.js:41:3 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━ ! This hook do not specify all of its dependencies. @@ -349,7 +349,7 @@ missingDependenciesInvalid.js:41:3 lint/nursery/useExhaustiveDependencies ━━ ``` ``` -missingDependenciesInvalid.js:42:3 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━ +missingDependenciesInvalid.js:42:3 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━ ! This hook do not specify all of its dependencies. @@ -373,7 +373,7 @@ missingDependenciesInvalid.js:42:3 lint/nursery/useExhaustiveDependencies ━━ ``` ``` -missingDependenciesInvalid.js:43:3 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━ +missingDependenciesInvalid.js:43:3 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━ ! This hook do not specify all of its dependencies. @@ -397,7 +397,7 @@ missingDependenciesInvalid.js:43:3 lint/nursery/useExhaustiveDependencies ━━ ``` ``` -missingDependenciesInvalid.js:44:3 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━ +missingDependenciesInvalid.js:44:3 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━ ! This hook do not specify all of its dependencies. @@ -421,7 +421,7 @@ missingDependenciesInvalid.js:44:3 lint/nursery/useExhaustiveDependencies ━━ ``` ``` -missingDependenciesInvalid.js:45:3 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━ +missingDependenciesInvalid.js:45:3 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━ ! This hook do not specify all of its dependencies. @@ -445,7 +445,7 @@ missingDependenciesInvalid.js:45:3 lint/nursery/useExhaustiveDependencies ━━ ``` ``` -missingDependenciesInvalid.js:46:3 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━ +missingDependenciesInvalid.js:46:3 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━ ! This hook do not specify all of its dependencies. @@ -469,7 +469,7 @@ missingDependenciesInvalid.js:46:3 lint/nursery/useExhaustiveDependencies ━━ ``` ``` -missingDependenciesInvalid.js:53:3 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━ +missingDependenciesInvalid.js:53:3 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━ ! This hook do not specify all of its dependencies. @@ -493,7 +493,7 @@ missingDependenciesInvalid.js:53:3 lint/nursery/useExhaustiveDependencies ━━ ``` ``` -missingDependenciesInvalid.js:62:3 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━ +missingDependenciesInvalid.js:62:3 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━ ! This hook do not specify all of its dependencies. @@ -526,7 +526,7 @@ missingDependenciesInvalid.js:62:3 lint/nursery/useExhaustiveDependencies ━━ ``` ``` -missingDependenciesInvalid.js:72:3 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━ +missingDependenciesInvalid.js:72:3 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━ ! This hook do not specify all of its dependencies. @@ -550,7 +550,7 @@ missingDependenciesInvalid.js:72:3 lint/nursery/useExhaustiveDependencies ━━ ``` ``` -missingDependenciesInvalid.js:78:3 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━ +missingDependenciesInvalid.js:78:3 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━ ! This hook do not specify all of its dependencies. @@ -573,7 +573,7 @@ missingDependenciesInvalid.js:78:3 lint/nursery/useExhaustiveDependencies ━━ ``` ``` -missingDependenciesInvalid.js:84:3 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━ +missingDependenciesInvalid.js:84:3 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━ ! This hook do not specify all of its dependencies. @@ -596,7 +596,7 @@ missingDependenciesInvalid.js:84:3 lint/nursery/useExhaustiveDependencies ━━ ``` ``` -missingDependenciesInvalid.js:92:3 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━ +missingDependenciesInvalid.js:92:3 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━ ! This hook do not specify all of its dependencies. @@ -620,7 +620,7 @@ missingDependenciesInvalid.js:92:3 lint/nursery/useExhaustiveDependencies ━━ ``` ``` -missingDependenciesInvalid.js:99:3 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━ +missingDependenciesInvalid.js:99:3 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━ ! This hook do not specify all of its dependencies. @@ -644,7 +644,7 @@ missingDependenciesInvalid.js:99:3 lint/nursery/useExhaustiveDependencies ━━ ``` ``` -missingDependenciesInvalid.js:107:3 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━ +missingDependenciesInvalid.js:107:3 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━ ! This hook do not specify all of its dependencies. @@ -668,7 +668,7 @@ missingDependenciesInvalid.js:107:3 lint/nursery/useExhaustiveDependencies ━ ``` ``` -missingDependenciesInvalid.js:114:3 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━ +missingDependenciesInvalid.js:114:3 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━ ! This hook do not specify all of its dependencies. @@ -692,7 +692,7 @@ missingDependenciesInvalid.js:114:3 lint/nursery/useExhaustiveDependencies ━ ``` ``` -missingDependenciesInvalid.js:122:9 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━ +missingDependenciesInvalid.js:122:9 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━━ ! This hook do not specify all of its dependencies. diff --git a/crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/newline.js b/crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/newline.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/newline.js rename to crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/newline.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/newline.js.snap b/crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/newline.js.snap similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/newline.js.snap rename to crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/newline.js.snap diff --git a/crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/valid.js b/crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/valid.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/valid.js rename to crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/valid.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/valid.js.snap b/crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/valid.js.snap similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/valid.js.snap rename to crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/valid.js.snap diff --git a/crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/valid.ts b/crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/valid.ts similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/valid.ts rename to crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/valid.ts diff --git a/crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/valid.ts.snap b/crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/valid.ts.snap similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useExhaustiveDependencies/valid.ts.snap rename to crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/valid.ts.snap diff --git a/crates/biome_js_analyze/tests/specs/nursery/useHookAtTopLevel/customHook.js b/crates/biome_js_analyze/tests/specs/correctness/useHookAtTopLevel/customHook.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useHookAtTopLevel/customHook.js rename to crates/biome_js_analyze/tests/specs/correctness/useHookAtTopLevel/customHook.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/useHookAtTopLevel/customHook.js.snap b/crates/biome_js_analyze/tests/specs/correctness/useHookAtTopLevel/customHook.js.snap similarity index 86% rename from crates/biome_js_analyze/tests/specs/nursery/useHookAtTopLevel/customHook.js.snap rename to crates/biome_js_analyze/tests/specs/correctness/useHookAtTopLevel/customHook.js.snap index 657b7a6a003f..a312fe3efa11 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/useHookAtTopLevel/customHook.js.snap +++ b/crates/biome_js_analyze/tests/specs/correctness/useHookAtTopLevel/customHook.js.snap @@ -17,7 +17,7 @@ function MyComponent() { # Diagnostics ``` -customHook.js:7:23 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +customHook.js:7:23 lint/correctness/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This hook is being called conditionally, but all hooks must be called in the exact same order in every component render. diff --git a/crates/biome_js_analyze/tests/specs/nursery/useHookAtTopLevel/customHook.options.json b/crates/biome_js_analyze/tests/specs/correctness/useHookAtTopLevel/customHook.options.json similarity index 93% rename from crates/biome_js_analyze/tests/specs/nursery/useHookAtTopLevel/customHook.options.json rename to crates/biome_js_analyze/tests/specs/correctness/useHookAtTopLevel/customHook.options.json index 8fd4b312997c..de2df1d3368d 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/useHookAtTopLevel/customHook.options.json +++ b/crates/biome_js_analyze/tests/specs/correctness/useHookAtTopLevel/customHook.options.json @@ -2,7 +2,7 @@ "$schema": "../../../../../../packages/@biomejs/biome/configuration_schema.json", "linter": { "rules": { - "nursery": { + "correctness": { "useHookAtTopLevel": { "level": "error", "options": { diff --git a/crates/biome_js_analyze/tests/specs/nursery/useHookAtTopLevel/invalid.js b/crates/biome_js_analyze/tests/specs/correctness/useHookAtTopLevel/invalid.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useHookAtTopLevel/invalid.js rename to crates/biome_js_analyze/tests/specs/correctness/useHookAtTopLevel/invalid.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/useHookAtTopLevel/invalid.js.snap b/crates/biome_js_analyze/tests/specs/correctness/useHookAtTopLevel/invalid.js.snap similarity index 85% rename from crates/biome_js_analyze/tests/specs/nursery/useHookAtTopLevel/invalid.js.snap rename to crates/biome_js_analyze/tests/specs/correctness/useHookAtTopLevel/invalid.js.snap index 0614a9b62c5d..d0c4a735b24a 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/useHookAtTopLevel/invalid.js.snap +++ b/crates/biome_js_analyze/tests/specs/correctness/useHookAtTopLevel/invalid.js.snap @@ -101,7 +101,7 @@ const Component9 = () => { # Diagnostics ``` -invalid.js:4:9 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:4:9 lint/correctness/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This hook is being called conditionally, but all hooks must be called in the exact same order in every component render. @@ -120,7 +120,7 @@ invalid.js:4:9 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━ ``` ``` -invalid.js:9:13 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:9:13 lint/correctness/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This hook is being called conditionally, but all hooks must be called in the exact same order in every component render. @@ -139,7 +139,7 @@ invalid.js:9:13 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━ ``` ``` -invalid.js:14:9 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:14:9 lint/correctness/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This hook is being called conditionally, but all hooks must be called in the exact same order in every component render. @@ -157,7 +157,7 @@ invalid.js:14:9 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━ ``` ``` -invalid.js:18:9 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:18:9 lint/correctness/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This hook is being called conditionally, but all hooks must be called in the exact same order in every component render. @@ -175,7 +175,7 @@ invalid.js:18:9 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━ ``` ``` -invalid.js:22:9 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:22:9 lint/correctness/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This hook is being called conditionally, but all hooks must be called in the exact same order in every component render. @@ -193,7 +193,7 @@ invalid.js:22:9 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━ ``` ``` -invalid.js:26:9 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:26:9 lint/correctness/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This hook is being called conditionally, but all hooks must be called in the exact same order in every component render. @@ -211,7 +211,7 @@ invalid.js:26:9 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━ ``` ``` -invalid.js:30:9 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:30:9 lint/correctness/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This hook is being called conditionally, but all hooks must be called in the exact same order in every component render. @@ -229,7 +229,7 @@ invalid.js:30:9 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━ ``` ``` -invalid.js:33:10 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:33:10 lint/correctness/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This hook is being called conditionally, but all hooks must be called in the exact same order in every component render. @@ -248,7 +248,7 @@ invalid.js:33:10 lint/nursery/useHookAtTopLevel ━━━━━━━━━━ ``` ``` -invalid.js:35:17 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:35:17 lint/correctness/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This hook is being called conditionally, but all hooks must be called in the exact same order in every component render. @@ -267,7 +267,7 @@ invalid.js:35:17 lint/nursery/useHookAtTopLevel ━━━━━━━━━━ ``` ``` -invalid.js:40:5 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:40:5 lint/correctness/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This hook is being called indirectly and conditionally, but all hooks must be called in the exact same order in every component render. @@ -307,7 +307,7 @@ invalid.js:40:5 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━ ``` ``` -invalid.js:55:9 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:55:9 lint/correctness/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This hook is being called conditionally, but all hooks must be called in the exact same order in every component render. @@ -326,7 +326,7 @@ invalid.js:55:9 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━ ``` ``` -invalid.js:61:9 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:61:9 lint/correctness/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This hook is being called conditionally, but all hooks must be called in the exact same order in every component render. @@ -345,7 +345,7 @@ invalid.js:61:9 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━ ``` ``` -invalid.js:67:9 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:67:9 lint/correctness/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This hook is being called conditionally, but all hooks must be called in the exact same order in every component render. @@ -364,7 +364,7 @@ invalid.js:67:9 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━ ``` ``` -invalid.js:72:5 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:72:5 lint/correctness/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This hook is being called indirectly and conditionally, but all hooks must be called in the exact same order in every component render. @@ -392,7 +392,7 @@ invalid.js:72:5 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━ ``` ``` -invalid.js:83:9 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:83:9 lint/correctness/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This hook is being called conditionally, but all hooks must be called in the exact same order in every component render. @@ -411,7 +411,7 @@ invalid.js:83:9 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━ ``` ``` -invalid.js:86:42 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:86:42 lint/correctness/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This hook is being called conditionally, but all hooks must be called in the exact same order in every component render. @@ -430,7 +430,7 @@ invalid.js:86:42 lint/nursery/useHookAtTopLevel ━━━━━━━━━━ ``` ``` -invalid.js:90:9 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:90:9 lint/correctness/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This hook is being called conditionally, but all hooks must be called in the exact same order in every component render. @@ -448,7 +448,7 @@ invalid.js:90:9 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━ ``` ``` -invalid.js:91:10 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:91:10 lint/correctness/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This hook is being called conditionally, but all hooks must be called in the exact same order in every component render. diff --git a/crates/biome_js_analyze/tests/specs/nursery/useHookAtTopLevel/invalid.ts b/crates/biome_js_analyze/tests/specs/correctness/useHookAtTopLevel/invalid.ts similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useHookAtTopLevel/invalid.ts rename to crates/biome_js_analyze/tests/specs/correctness/useHookAtTopLevel/invalid.ts diff --git a/crates/biome_js_analyze/tests/specs/nursery/useHookAtTopLevel/invalid.ts.snap b/crates/biome_js_analyze/tests/specs/correctness/useHookAtTopLevel/invalid.ts.snap similarity index 87% rename from crates/biome_js_analyze/tests/specs/nursery/useHookAtTopLevel/invalid.ts.snap rename to crates/biome_js_analyze/tests/specs/correctness/useHookAtTopLevel/invalid.ts.snap index 4f62d9e9ee78..41a58cc7b84b 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/useHookAtTopLevel/invalid.ts.snap +++ b/crates/biome_js_analyze/tests/specs/correctness/useHookAtTopLevel/invalid.ts.snap @@ -18,7 +18,7 @@ const Component2 = () => { # Diagnostics ``` -invalid.ts:2:3 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:2:3 lint/correctness/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This hook is being called indirectly and conditionally, but all hooks must be called in the exact same order in every component render. diff --git a/crates/biome_js_analyze/tests/specs/nursery/useHookAtTopLevel/valid.js b/crates/biome_js_analyze/tests/specs/correctness/useHookAtTopLevel/valid.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useHookAtTopLevel/valid.js rename to crates/biome_js_analyze/tests/specs/correctness/useHookAtTopLevel/valid.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/useHookAtTopLevel/valid.js.snap b/crates/biome_js_analyze/tests/specs/correctness/useHookAtTopLevel/valid.js.snap similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useHookAtTopLevel/valid.js.snap rename to crates/biome_js_analyze/tests/specs/correctness/useHookAtTopLevel/valid.js.snap diff --git a/crates/biome_js_analyze/tests/specs/nursery/useHookAtTopLevel/valid.ts b/crates/biome_js_analyze/tests/specs/correctness/useHookAtTopLevel/valid.ts similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useHookAtTopLevel/valid.ts rename to crates/biome_js_analyze/tests/specs/correctness/useHookAtTopLevel/valid.ts diff --git a/crates/biome_js_analyze/tests/specs/nursery/useHookAtTopLevel/valid.ts.snap b/crates/biome_js_analyze/tests/specs/correctness/useHookAtTopLevel/valid.ts.snap similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useHookAtTopLevel/valid.ts.snap rename to crates/biome_js_analyze/tests/specs/correctness/useHookAtTopLevel/valid.ts.snap diff --git a/crates/biome_js_analyze/tests/specs/nursery/noAccumulatingSpread/invalid.jsonc b/crates/biome_js_analyze/tests/specs/performance/noAccumulatingSpread/invalid.jsonc similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noAccumulatingSpread/invalid.jsonc rename to crates/biome_js_analyze/tests/specs/performance/noAccumulatingSpread/invalid.jsonc diff --git a/crates/biome_js_analyze/tests/specs/nursery/noAccumulatingSpread/invalid.jsonc.snap b/crates/biome_js_analyze/tests/specs/performance/noAccumulatingSpread/invalid.jsonc.snap similarity index 63% rename from crates/biome_js_analyze/tests/specs/nursery/noAccumulatingSpread/invalid.jsonc.snap rename to crates/biome_js_analyze/tests/specs/performance/noAccumulatingSpread/invalid.jsonc.snap index be2632eedeee..3446652256a5 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/noAccumulatingSpread/invalid.jsonc.snap +++ b/crates/biome_js_analyze/tests/specs/performance/noAccumulatingSpread/invalid.jsonc.snap @@ -9,7 +9,7 @@ foo.reduce((acc, bar) => [...acc, bar], []) # Diagnostics ``` -invalid.jsonc:1:27 lint/nursery/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:27 lint/performance/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the use of spread (`...`) syntax on accumulators. @@ -18,6 +18,8 @@ invalid.jsonc:1:27 lint/nursery/noAccumulatingSpread ━━━━━━━━━ i Spread syntax should be avoided on accumulators (like those in `.reduce`) because it causes a time complexity of `O(n^2)`. + i Consider methods such as .splice or .push instead. + ``` @@ -28,7 +30,7 @@ foo.reduceRight((acc, bar) => [...acc, bar], []) # Diagnostics ``` -invalid.jsonc:1:32 lint/nursery/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:32 lint/performance/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the use of spread (`...`) syntax on accumulators. @@ -37,6 +39,8 @@ invalid.jsonc:1:32 lint/nursery/noAccumulatingSpread ━━━━━━━━━ i Spread syntax should be avoided on accumulators (like those in `.reduce`) because it causes a time complexity of `O(n^2)`. + i Consider methods such as .splice or .push instead. + ``` @@ -47,7 +51,7 @@ foo.reduce((acc, bar) => {return [...acc, bar];}, []) # Diagnostics ``` -invalid.jsonc:1:35 lint/nursery/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:35 lint/performance/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the use of spread (`...`) syntax on accumulators. @@ -56,6 +60,8 @@ invalid.jsonc:1:35 lint/nursery/noAccumulatingSpread ━━━━━━━━━ i Spread syntax should be avoided on accumulators (like those in `.reduce`) because it causes a time complexity of `O(n^2)`. + i Consider methods such as .splice or .push instead. + ``` @@ -66,7 +72,7 @@ foo.reduceRight((acc, bar) => {return [...acc, bar];}, []) # Diagnostics ``` -invalid.jsonc:1:40 lint/nursery/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:40 lint/performance/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the use of spread (`...`) syntax on accumulators. @@ -75,6 +81,8 @@ invalid.jsonc:1:40 lint/nursery/noAccumulatingSpread ━━━━━━━━━ i Spread syntax should be avoided on accumulators (like those in `.reduce`) because it causes a time complexity of `O(n^2)`. + i Consider methods such as .splice or .push instead. + ``` @@ -85,7 +93,7 @@ foo.reduce((acc, bar) => [...acc, ...bar], []) # Diagnostics ``` -invalid.jsonc:1:27 lint/nursery/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:27 lint/performance/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the use of spread (`...`) syntax on accumulators. @@ -94,6 +102,8 @@ invalid.jsonc:1:27 lint/nursery/noAccumulatingSpread ━━━━━━━━━ i Spread syntax should be avoided on accumulators (like those in `.reduce`) because it causes a time complexity of `O(n^2)`. + i Consider methods such as .splice or .push instead. + ``` @@ -104,7 +114,7 @@ foo.reduceRight((acc, bar) => [...acc, ...bar], []) # Diagnostics ``` -invalid.jsonc:1:32 lint/nursery/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:32 lint/performance/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the use of spread (`...`) syntax on accumulators. @@ -113,6 +123,8 @@ invalid.jsonc:1:32 lint/nursery/noAccumulatingSpread ━━━━━━━━━ i Spread syntax should be avoided on accumulators (like those in `.reduce`) because it causes a time complexity of `O(n^2)`. + i Consider methods such as .splice or .push instead. + ``` @@ -123,7 +135,7 @@ foo.reduce((acc, bar) => {return [...acc, ...bar];}, []) # Diagnostics ``` -invalid.jsonc:1:35 lint/nursery/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:35 lint/performance/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the use of spread (`...`) syntax on accumulators. @@ -132,6 +144,8 @@ invalid.jsonc:1:35 lint/nursery/noAccumulatingSpread ━━━━━━━━━ i Spread syntax should be avoided on accumulators (like those in `.reduce`) because it causes a time complexity of `O(n^2)`. + i Consider methods such as .splice or .push instead. + ``` @@ -142,7 +156,7 @@ foo.reduceRight((acc, bar) => {return [...acc, ...bar];}, []) # Diagnostics ``` -invalid.jsonc:1:40 lint/nursery/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:40 lint/performance/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the use of spread (`...`) syntax on accumulators. @@ -151,6 +165,8 @@ invalid.jsonc:1:40 lint/nursery/noAccumulatingSpread ━━━━━━━━━ i Spread syntax should be avoided on accumulators (like those in `.reduce`) because it causes a time complexity of `O(n^2)`. + i Consider methods such as .splice or .push instead. + ``` @@ -161,7 +177,7 @@ foo.reduce((acc, bar) => ({...acc, [bar.key]: bar.value}), {}) # Diagnostics ``` -invalid.jsonc:1:28 lint/nursery/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:28 lint/performance/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the use of spread (`...`) syntax on accumulators. @@ -170,6 +186,8 @@ invalid.jsonc:1:28 lint/nursery/noAccumulatingSpread ━━━━━━━━━ i Spread syntax should be avoided on accumulators (like those in `.reduce`) because it causes a time complexity of `O(n^2)`. + i Consider methods such as .splice or .push instead. + ``` @@ -180,7 +198,7 @@ foo.reduceRight((acc, bar) => ({...acc, [bar.key]: bar.value}), {}) # Diagnostics ``` -invalid.jsonc:1:33 lint/nursery/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:33 lint/performance/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the use of spread (`...`) syntax on accumulators. @@ -189,6 +207,8 @@ invalid.jsonc:1:33 lint/nursery/noAccumulatingSpread ━━━━━━━━━ i Spread syntax should be avoided on accumulators (like those in `.reduce`) because it causes a time complexity of `O(n^2)`. + i Consider methods such as .splice or .push instead. + ``` @@ -199,7 +219,7 @@ foo.reduce((acc, bar) => {return {...acc, [bar.key]: bar.value};}, {}) # Diagnostics ``` -invalid.jsonc:1:35 lint/nursery/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:35 lint/performance/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the use of spread (`...`) syntax on accumulators. @@ -208,6 +228,8 @@ invalid.jsonc:1:35 lint/nursery/noAccumulatingSpread ━━━━━━━━━ i Spread syntax should be avoided on accumulators (like those in `.reduce`) because it causes a time complexity of `O(n^2)`. + i Consider methods such as .splice or .push instead. + ``` @@ -218,7 +240,7 @@ foo.reduceRight((acc, bar) => {return {...acc, [bar.key]: bar.value};}, {}) # Diagnostics ``` -invalid.jsonc:1:40 lint/nursery/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:40 lint/performance/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the use of spread (`...`) syntax on accumulators. @@ -227,6 +249,8 @@ invalid.jsonc:1:40 lint/nursery/noAccumulatingSpread ━━━━━━━━━ i Spread syntax should be avoided on accumulators (like those in `.reduce`) because it causes a time complexity of `O(n^2)`. + i Consider methods such as .splice or .push instead. + ``` @@ -237,7 +261,7 @@ foo.reduce((acc, bar) => ({...acc, ...bar}), {}) # Diagnostics ``` -invalid.jsonc:1:28 lint/nursery/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:28 lint/performance/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the use of spread (`...`) syntax on accumulators. @@ -246,6 +270,8 @@ invalid.jsonc:1:28 lint/nursery/noAccumulatingSpread ━━━━━━━━━ i Spread syntax should be avoided on accumulators (like those in `.reduce`) because it causes a time complexity of `O(n^2)`. + i Consider methods such as .splice or .push instead. + ``` @@ -256,7 +282,7 @@ foo.reduceRight((acc, bar) => ({...acc, ...bar}), {}) # Diagnostics ``` -invalid.jsonc:1:33 lint/nursery/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:33 lint/performance/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the use of spread (`...`) syntax on accumulators. @@ -265,6 +291,8 @@ invalid.jsonc:1:33 lint/nursery/noAccumulatingSpread ━━━━━━━━━ i Spread syntax should be avoided on accumulators (like those in `.reduce`) because it causes a time complexity of `O(n^2)`. + i Consider methods such as .splice or .push instead. + ``` @@ -275,7 +303,7 @@ foo.reduce((acc, bar) => {return {...acc, ...bar};}, {}) # Diagnostics ``` -invalid.jsonc:1:35 lint/nursery/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:35 lint/performance/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the use of spread (`...`) syntax on accumulators. @@ -284,6 +312,8 @@ invalid.jsonc:1:35 lint/nursery/noAccumulatingSpread ━━━━━━━━━ i Spread syntax should be avoided on accumulators (like those in `.reduce`) because it causes a time complexity of `O(n^2)`. + i Consider methods such as .splice or .push instead. + ``` @@ -294,7 +324,7 @@ foo.reduceRight((acc, bar) => {return {...acc, ...bar};}, {}) # Diagnostics ``` -invalid.jsonc:1:40 lint/nursery/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:40 lint/performance/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the use of spread (`...`) syntax on accumulators. @@ -303,6 +333,8 @@ invalid.jsonc:1:40 lint/nursery/noAccumulatingSpread ━━━━━━━━━ i Spread syntax should be avoided on accumulators (like those in `.reduce`) because it causes a time complexity of `O(n^2)`. + i Consider methods such as .splice or .push instead. + ``` diff --git a/crates/biome_js_analyze/tests/specs/nursery/noAccumulatingSpread/valid.jsonc b/crates/biome_js_analyze/tests/specs/performance/noAccumulatingSpread/valid.jsonc similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noAccumulatingSpread/valid.jsonc rename to crates/biome_js_analyze/tests/specs/performance/noAccumulatingSpread/valid.jsonc diff --git a/crates/biome_js_analyze/tests/specs/nursery/noAccumulatingSpread/valid.jsonc.snap b/crates/biome_js_analyze/tests/specs/performance/noAccumulatingSpread/valid.jsonc.snap similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noAccumulatingSpread/valid.jsonc.snap rename to crates/biome_js_analyze/tests/specs/performance/noAccumulatingSpread/valid.jsonc.snap diff --git a/crates/biome_js_analyze/tests/specs/nursery/useCollapsedElseIf/invalid.js b/crates/biome_js_analyze/tests/specs/style/useCollapsedElseIf/invalid.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useCollapsedElseIf/invalid.js rename to crates/biome_js_analyze/tests/specs/style/useCollapsedElseIf/invalid.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/useCollapsedElseIf/invalid.js.snap b/crates/biome_js_analyze/tests/specs/style/useCollapsedElseIf/invalid.js.snap similarity index 81% rename from crates/biome_js_analyze/tests/specs/nursery/useCollapsedElseIf/invalid.js.snap rename to crates/biome_js_analyze/tests/specs/style/useCollapsedElseIf/invalid.js.snap index 0c51fe790697..223ed3be317e 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/useCollapsedElseIf/invalid.js.snap +++ b/crates/biome_js_analyze/tests/specs/style/useCollapsedElseIf/invalid.js.snap @@ -110,7 +110,7 @@ if (condition) { # Diagnostics ``` -invalid.js:7:9 lint/nursery/useCollapsedElseIf FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:7:9 lint/style/useCollapsedElseIf FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This if statement can be collapsed into an else if statement. @@ -143,7 +143,7 @@ invalid.js:7:9 lint/nursery/useCollapsedElseIf FIXABLE ━━━━━━━ ``` ``` -invalid.js:15:9 lint/nursery/useCollapsedElseIf FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:15:9 lint/style/useCollapsedElseIf FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This if statement can be collapsed into an else if statement. @@ -180,7 +180,7 @@ invalid.js:15:9 lint/nursery/useCollapsedElseIf FIXABLE ━━━━━━━ ``` ``` -invalid.js:29:20 lint/nursery/useCollapsedElseIf ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:29:20 lint/style/useCollapsedElseIf ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This if statement can be collapsed into an else if statement. @@ -199,7 +199,7 @@ invalid.js:29:20 lint/nursery/useCollapsedElseIf ━━━━━━━━━━ ``` ``` -invalid.js:37:9 lint/nursery/useCollapsedElseIf ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:37:9 lint/style/useCollapsedElseIf ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This if statement can be collapsed into an else if statement. @@ -219,7 +219,7 @@ invalid.js:37:9 lint/nursery/useCollapsedElseIf ━━━━━━━━━━ ``` ``` -invalid.js:46:9 lint/nursery/useCollapsedElseIf ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:46:9 lint/style/useCollapsedElseIf ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This if statement can be collapsed into an else if statement. @@ -238,7 +238,7 @@ invalid.js:46:9 lint/nursery/useCollapsedElseIf ━━━━━━━━━━ ``` ``` -invalid.js:54:9 lint/nursery/useCollapsedElseIf ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:54:9 lint/style/useCollapsedElseIf ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This if statement can be collapsed into an else if statement. @@ -257,7 +257,7 @@ invalid.js:54:9 lint/nursery/useCollapsedElseIf ━━━━━━━━━━ ``` ``` -invalid.js:63:20 lint/nursery/useCollapsedElseIf ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:63:20 lint/style/useCollapsedElseIf ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This if statement can be collapsed into an else if statement. @@ -278,7 +278,7 @@ invalid.js:63:20 lint/nursery/useCollapsedElseIf ━━━━━━━━━━ ``` ``` -invalid.js:73:9 lint/nursery/useCollapsedElseIf ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:73:9 lint/style/useCollapsedElseIf ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This if statement can be collapsed into an else if statement. @@ -298,7 +298,7 @@ invalid.js:73:9 lint/nursery/useCollapsedElseIf ━━━━━━━━━━ ``` ``` -invalid.js:84:9 lint/nursery/useCollapsedElseIf ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:84:9 lint/style/useCollapsedElseIf ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This if statement can be collapsed into an else if statement. @@ -319,7 +319,7 @@ invalid.js:84:9 lint/nursery/useCollapsedElseIf ━━━━━━━━━━ ``` ``` -invalid.js:94:9 lint/nursery/useCollapsedElseIf ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:94:9 lint/style/useCollapsedElseIf ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This if statement can be collapsed into an else if statement. diff --git a/crates/biome_js_analyze/tests/specs/nursery/useCollapsedElseIf/valid.js b/crates/biome_js_analyze/tests/specs/style/useCollapsedElseIf/valid.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useCollapsedElseIf/valid.js rename to crates/biome_js_analyze/tests/specs/style/useCollapsedElseIf/valid.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/useCollapsedElseIf/valid.js.snap b/crates/biome_js_analyze/tests/specs/style/useCollapsedElseIf/valid.js.snap similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useCollapsedElseIf/valid.js.snap rename to crates/biome_js_analyze/tests/specs/style/useCollapsedElseIf/valid.js.snap diff --git a/crates/biome_js_analyze/tests/specs/nursery/noConfusingVoidType/invalid.ts b/crates/biome_js_analyze/tests/specs/suspicious/noConfusingVoidType/invalid.ts similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noConfusingVoidType/invalid.ts rename to crates/biome_js_analyze/tests/specs/suspicious/noConfusingVoidType/invalid.ts diff --git a/crates/biome_js_analyze/tests/specs/nursery/noConfusingVoidType/invalid.ts.snap b/crates/biome_js_analyze/tests/specs/suspicious/noConfusingVoidType/invalid.ts.snap similarity index 84% rename from crates/biome_js_analyze/tests/specs/nursery/noConfusingVoidType/invalid.ts.snap rename to crates/biome_js_analyze/tests/specs/suspicious/noConfusingVoidType/invalid.ts.snap index 853202a4d21b..dd6e5d9be696 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/noConfusingVoidType/invalid.ts.snap +++ b/crates/biome_js_analyze/tests/specs/suspicious/noConfusingVoidType/invalid.ts.snap @@ -1,6 +1,5 @@ --- source: crates/biome_js_analyze/tests/spec_tests.rs -assertion_line: 80 expression: invalid.ts --- # Input @@ -31,7 +30,7 @@ let baz = 1 as unknown as void | string; # Diagnostics ``` -invalid.ts:1:41 lint/nursery/noConfusingVoidType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:1:41 lint/suspicious/noConfusingVoidType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! void is not valid as a constituent in a union type @@ -40,11 +39,13 @@ invalid.ts:1:41 lint/nursery/noConfusingVoidType ━━━━━━━━━━ 2 │ type MorePossibleValues = string | ((number & any) | (string | void)); 3 │ + i Remove void + ``` ``` -invalid.ts:2:64 lint/nursery/noConfusingVoidType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:2:64 lint/suspicious/noConfusingVoidType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! void is not valid as a constituent in a union type @@ -54,11 +55,13 @@ invalid.ts:2:64 lint/nursery/noConfusingVoidType ━━━━━━━━━━ 3 │ 4 │ function logSomething(thing: void) {} + i Remove void + ``` ``` -invalid.ts:4:30 lint/nursery/noConfusingVoidType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:4:30 lint/suspicious/noConfusingVoidType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! void is only valid as a return type or a type argument in generic type @@ -69,11 +72,13 @@ invalid.ts:4:30 lint/nursery/noConfusingVoidType ━━━━━━━━━━ 5 │ function printArg(arg: T) {} 6 │ logAndReturn(undefined); + i Remove void + ``` ``` -invalid.ts:12:8 lint/nursery/noConfusingVoidType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:12:8 lint/suspicious/noConfusingVoidType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! void is only valid as a return type or a type argument in generic type @@ -83,11 +88,13 @@ invalid.ts:12:8 lint/nursery/noConfusingVoidType ━━━━━━━━━━ 13 │ } 14 │ + i Remove void + ``` ``` -invalid.ts:16:29 lint/nursery/noConfusingVoidType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:16:29 lint/suspicious/noConfusingVoidType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! void is only valid as a return type or a type argument in generic type @@ -97,11 +104,13 @@ invalid.ts:16:29 lint/nursery/noConfusingVoidType ━━━━━━━━━━ 17 │ } 18 │ + i Remove void + ``` ``` -invalid.ts:19:10 lint/nursery/noConfusingVoidType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:19:10 lint/suspicious/noConfusingVoidType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! void is only valid as a return type or a type argument in generic type @@ -112,11 +121,13 @@ invalid.ts:19:10 lint/nursery/noConfusingVoidType ━━━━━━━━━━ 20 │ let bar = 1 as unknown as void; 21 │ let baz = 1 as unknown as void | string; + i Remove void + ``` ``` -invalid.ts:20:27 lint/nursery/noConfusingVoidType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:20:27 lint/suspicious/noConfusingVoidType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! void is only valid as a return type or a type argument in generic type @@ -126,11 +137,13 @@ invalid.ts:20:27 lint/nursery/noConfusingVoidType ━━━━━━━━━━ 21 │ let baz = 1 as unknown as void | string; 22 │ + i Remove void + ``` ``` -invalid.ts:21:27 lint/nursery/noConfusingVoidType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:21:27 lint/suspicious/noConfusingVoidType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! void is not valid as a constituent in a union type @@ -140,6 +153,8 @@ invalid.ts:21:27 lint/nursery/noConfusingVoidType ━━━━━━━━━━ │ ^^^^ 22 │ + i Remove void + ``` diff --git a/crates/biome_js_analyze/tests/specs/nursery/noConfusingVoidType/valid.ts b/crates/biome_js_analyze/tests/specs/suspicious/noConfusingVoidType/valid.ts similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noConfusingVoidType/valid.ts rename to crates/biome_js_analyze/tests/specs/suspicious/noConfusingVoidType/valid.ts diff --git a/crates/biome_js_analyze/tests/specs/nursery/noConfusingVoidType/valid.ts.snap b/crates/biome_js_analyze/tests/specs/suspicious/noConfusingVoidType/valid.ts.snap similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noConfusingVoidType/valid.ts.snap rename to crates/biome_js_analyze/tests/specs/suspicious/noConfusingVoidType/valid.ts.snap diff --git a/crates/biome_js_analyze/tests/specs/nursery/noFallthroughSwitchClause/invalid.js b/crates/biome_js_analyze/tests/specs/suspicious/noFallthroughSwitchClause/invalid.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noFallthroughSwitchClause/invalid.js rename to crates/biome_js_analyze/tests/specs/suspicious/noFallthroughSwitchClause/invalid.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/noFallthroughSwitchClause/invalid.js.snap b/crates/biome_js_analyze/tests/specs/suspicious/noFallthroughSwitchClause/invalid.js.snap similarity index 81% rename from crates/biome_js_analyze/tests/specs/nursery/noFallthroughSwitchClause/invalid.js.snap rename to crates/biome_js_analyze/tests/specs/suspicious/noFallthroughSwitchClause/invalid.js.snap index aef27b10a672..9415e220381b 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/noFallthroughSwitchClause/invalid.js.snap +++ b/crates/biome_js_analyze/tests/specs/suspicious/noFallthroughSwitchClause/invalid.js.snap @@ -55,7 +55,7 @@ switch (foo) { case 0: {} case 1: case 2: f(); } # Diagnostics ``` -invalid.js:39:9 lint/nursery/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:39:9 lint/suspicious/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This case is falling through to the next case. @@ -74,7 +74,7 @@ invalid.js:39:9 lint/nursery/noFallthroughSwitchClause ━━━━━━━━ ``` ``` -invalid.js:1:15 lint/nursery/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:1:15 lint/suspicious/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This case is falling through to the next case. @@ -89,7 +89,7 @@ invalid.js:1:15 lint/nursery/noFallthroughSwitchClause ━━━━━━━━ ``` ``` -invalid.js:3:15 lint/nursery/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:3:15 lint/suspicious/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This case is falling through to the next case. @@ -106,7 +106,7 @@ invalid.js:3:15 lint/nursery/noFallthroughSwitchClause ━━━━━━━━ ``` ``` -invalid.js:5:16 lint/nursery/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:5:16 lint/suspicious/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This case is falling through to the next case. @@ -123,7 +123,7 @@ invalid.js:5:16 lint/nursery/noFallthroughSwitchClause ━━━━━━━━ ``` ``` -invalid.js:5:29 lint/nursery/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:5:29 lint/suspicious/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This case is falling through to the next case. @@ -140,7 +140,7 @@ invalid.js:5:29 lint/nursery/noFallthroughSwitchClause ━━━━━━━━ ``` ``` -invalid.js:7:15 lint/nursery/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:7:15 lint/suspicious/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This case is falling through to the next case. @@ -157,7 +157,7 @@ invalid.js:7:15 lint/nursery/noFallthroughSwitchClause ━━━━━━━━ ``` ``` -invalid.js:9:15 lint/nursery/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:9:15 lint/suspicious/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This case is falling through to the next case. @@ -174,7 +174,7 @@ invalid.js:9:15 lint/nursery/noFallthroughSwitchClause ━━━━━━━━ ``` ``` -invalid.js:11:15 lint/nursery/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:11:15 lint/suspicious/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This case is falling through to the next case. @@ -191,7 +191,7 @@ invalid.js:11:15 lint/nursery/noFallthroughSwitchClause ━━━━━━━━ ``` ``` -invalid.js:13:15 lint/nursery/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:13:15 lint/suspicious/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This case is falling through to the next case. @@ -208,7 +208,7 @@ invalid.js:13:15 lint/nursery/noFallthroughSwitchClause ━━━━━━━━ ``` ``` -invalid.js:15:15 lint/nursery/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:15:15 lint/suspicious/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This case is falling through to the next case. @@ -225,7 +225,7 @@ invalid.js:15:15 lint/nursery/noFallthroughSwitchClause ━━━━━━━━ ``` ``` -invalid.js:17:15 lint/nursery/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:17:15 lint/suspicious/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This case is falling through to the next case. @@ -242,7 +242,7 @@ invalid.js:17:15 lint/nursery/noFallthroughSwitchClause ━━━━━━━━ ``` ``` -invalid.js:19:15 lint/nursery/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:19:15 lint/suspicious/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This case is falling through to the next case. @@ -259,7 +259,7 @@ invalid.js:19:15 lint/nursery/noFallthroughSwitchClause ━━━━━━━━ ``` ``` -invalid.js:21:15 lint/nursery/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:21:15 lint/suspicious/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This case is falling through to the next case. @@ -276,7 +276,7 @@ invalid.js:21:15 lint/nursery/noFallthroughSwitchClause ━━━━━━━━ ``` ``` -invalid.js:23:15 lint/nursery/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:23:15 lint/suspicious/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This case is falling through to the next case. @@ -293,7 +293,7 @@ invalid.js:23:15 lint/nursery/noFallthroughSwitchClause ━━━━━━━━ ``` ``` -invalid.js:25:15 lint/nursery/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:25:15 lint/suspicious/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This case is falling through to the next case. @@ -310,7 +310,7 @@ invalid.js:25:15 lint/nursery/noFallthroughSwitchClause ━━━━━━━━ ``` ``` -invalid.js:27:15 lint/nursery/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:27:15 lint/suspicious/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This case is falling through to the next case. @@ -327,7 +327,7 @@ invalid.js:27:15 lint/nursery/noFallthroughSwitchClause ━━━━━━━━ ``` ``` -invalid.js:29:15 lint/nursery/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:29:15 lint/suspicious/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This case is falling through to the next case. @@ -344,7 +344,7 @@ invalid.js:29:15 lint/nursery/noFallthroughSwitchClause ━━━━━━━━ ``` ``` -invalid.js:31:15 lint/nursery/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:31:15 lint/suspicious/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This case is falling through to the next case. @@ -361,7 +361,7 @@ invalid.js:31:15 lint/nursery/noFallthroughSwitchClause ━━━━━━━━ ``` ``` -invalid.js:33:15 lint/nursery/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:33:15 lint/suspicious/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This case is falling through to the next case. @@ -378,7 +378,7 @@ invalid.js:33:15 lint/nursery/noFallthroughSwitchClause ━━━━━━━━ ``` ``` -invalid.js:35:14 lint/nursery/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:35:14 lint/suspicious/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This case is falling through to the next case. @@ -395,7 +395,7 @@ invalid.js:35:14 lint/nursery/noFallthroughSwitchClause ━━━━━━━━ ``` ``` -invalid.js:35:24 lint/nursery/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:35:24 lint/suspicious/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This case is falling through to the next case. @@ -412,7 +412,7 @@ invalid.js:35:24 lint/nursery/noFallthroughSwitchClause ━━━━━━━━ ``` ``` -invalid.js:46:16 lint/nursery/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:46:16 lint/suspicious/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This case is falling through to the next case. diff --git a/crates/biome_js_analyze/tests/specs/nursery/noFallthroughSwitchClause/valid.js b/crates/biome_js_analyze/tests/specs/suspicious/noFallthroughSwitchClause/valid.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noFallthroughSwitchClause/valid.js rename to crates/biome_js_analyze/tests/specs/suspicious/noFallthroughSwitchClause/valid.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/noFallthroughSwitchClause/valid.js.snap b/crates/biome_js_analyze/tests/specs/suspicious/noFallthroughSwitchClause/valid.js.snap similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noFallthroughSwitchClause/valid.js.snap rename to crates/biome_js_analyze/tests/specs/suspicious/noFallthroughSwitchClause/valid.js.snap diff --git a/crates/biome_js_analyze/tests/specs/nursery/noGlobalIsNan/invalid.js b/crates/biome_js_analyze/tests/specs/suspicious/noGlobalIsNan/invalid.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noGlobalIsNan/invalid.js rename to crates/biome_js_analyze/tests/specs/suspicious/noGlobalIsNan/invalid.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/noGlobalIsNan/invalid.js.snap b/crates/biome_js_analyze/tests/specs/suspicious/noGlobalIsNan/invalid.js.snap similarity index 82% rename from crates/biome_js_analyze/tests/specs/nursery/noGlobalIsNan/invalid.js.snap rename to crates/biome_js_analyze/tests/specs/suspicious/noGlobalIsNan/invalid.js.snap index 366373a47706..0edc3562e029 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/noGlobalIsNan/invalid.js.snap +++ b/crates/biome_js_analyze/tests/specs/suspicious/noGlobalIsNan/invalid.js.snap @@ -28,7 +28,7 @@ localIsNaN(isNaN); # Diagnostics ``` -invalid.js:1:1 lint/nursery/noGlobalIsNan FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:1:1 lint/suspicious/noGlobalIsNan FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! isNaN is unsafe. It attempts a type coercion. Use Number.isNaN instead. @@ -50,7 +50,7 @@ invalid.js:1:1 lint/nursery/noGlobalIsNan FIXABLE ━━━━━━━━━ ``` ``` -invalid.js:3:2 lint/nursery/noGlobalIsNan FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:3:2 lint/suspicious/noGlobalIsNan FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! isNaN is unsafe. It attempts a type coercion. Use Number.isNaN instead. @@ -76,7 +76,7 @@ invalid.js:3:2 lint/nursery/noGlobalIsNan FIXABLE ━━━━━━━━━ ``` ``` -invalid.js:5:1 lint/nursery/noGlobalIsNan FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:5:1 lint/suspicious/noGlobalIsNan FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! isNaN is unsafe. It attempts a type coercion. Use Number.isNaN instead. @@ -102,7 +102,7 @@ invalid.js:5:1 lint/nursery/noGlobalIsNan FIXABLE ━━━━━━━━━ ``` ``` -invalid.js:7:1 lint/nursery/noGlobalIsNan FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:7:1 lint/suspicious/noGlobalIsNan FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! isNaN is unsafe. It attempts a type coercion. Use Number.isNaN instead. @@ -128,7 +128,7 @@ invalid.js:7:1 lint/nursery/noGlobalIsNan FIXABLE ━━━━━━━━━ ``` ``` -invalid.js:9:1 lint/nursery/noGlobalIsNan FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:9:1 lint/suspicious/noGlobalIsNan FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! isNaN is unsafe. It attempts a type coercion. Use Number.isNaN instead. @@ -154,7 +154,7 @@ invalid.js:9:1 lint/nursery/noGlobalIsNan FIXABLE ━━━━━━━━━ ``` ``` -invalid.js:11:1 lint/nursery/noGlobalIsNan FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:11:1 lint/suspicious/noGlobalIsNan FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! isNaN is unsafe. It attempts a type coercion. Use Number.isNaN instead. @@ -180,7 +180,7 @@ invalid.js:11:1 lint/nursery/noGlobalIsNan FIXABLE ━━━━━━━━━ ``` ``` -invalid.js:13:1 lint/nursery/noGlobalIsNan FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:13:1 lint/suspicious/noGlobalIsNan FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! isNaN is unsafe. It attempts a type coercion. Use Number.isNaN instead. @@ -201,7 +201,7 @@ invalid.js:13:1 lint/nursery/noGlobalIsNan FIXABLE ━━━━━━━━━ ``` ``` -invalid.js:16:5 lint/nursery/noGlobalIsNan FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:16:5 lint/suspicious/noGlobalIsNan FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! isNaN is unsafe. It attempts a type coercion. Use Number.isNaN instead. @@ -226,7 +226,7 @@ invalid.js:16:5 lint/nursery/noGlobalIsNan FIXABLE ━━━━━━━━━ ``` ``` -invalid.js:19:12 lint/nursery/noGlobalIsNan FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:19:12 lint/suspicious/noGlobalIsNan FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! isNaN is unsafe. It attempts a type coercion. Use Number.isNaN instead. diff --git a/crates/biome_js_analyze/tests/specs/nursery/noGlobalIsNan/valid.js b/crates/biome_js_analyze/tests/specs/suspicious/noGlobalIsNan/valid.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noGlobalIsNan/valid.js rename to crates/biome_js_analyze/tests/specs/suspicious/noGlobalIsNan/valid.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/noGlobalIsNan/valid.js.snap b/crates/biome_js_analyze/tests/specs/suspicious/noGlobalIsNan/valid.js.snap similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/noGlobalIsNan/valid.js.snap rename to crates/biome_js_analyze/tests/specs/suspicious/noGlobalIsNan/valid.js.snap diff --git a/crates/biome_js_analyze/tests/specs/nursery/useIsArray/invalid.js b/crates/biome_js_analyze/tests/specs/suspicious/useIsArray/invalid.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useIsArray/invalid.js rename to crates/biome_js_analyze/tests/specs/suspicious/useIsArray/invalid.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/useIsArray/invalid.js.snap b/crates/biome_js_analyze/tests/specs/suspicious/useIsArray/invalid.js.snap similarity index 92% rename from crates/biome_js_analyze/tests/specs/nursery/useIsArray/invalid.js.snap rename to crates/biome_js_analyze/tests/specs/suspicious/useIsArray/invalid.js.snap index 511271dfc222..f9e635db34c4 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/useIsArray/invalid.js.snap +++ b/crates/biome_js_analyze/tests/specs/suspicious/useIsArray/invalid.js.snap @@ -15,7 +15,7 @@ const d = foo.bar[2] instanceof window.Array # Diagnostics ``` -invalid.js:2:11 lint/nursery/useIsArray FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:2:11 lint/suspicious/useIsArray FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Array.isArray() instead of instanceof Array. @@ -38,7 +38,7 @@ invalid.js:2:11 lint/nursery/useIsArray FIXABLE ━━━━━━━━━━ ``` ``` -invalid.js:4:11 lint/nursery/useIsArray FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:4:11 lint/suspicious/useIsArray FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Array.isArray() instead of instanceof Array. @@ -64,7 +64,7 @@ invalid.js:4:11 lint/nursery/useIsArray FIXABLE ━━━━━━━━━━ ``` ``` -invalid.js:6:11 lint/nursery/useIsArray FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:6:11 lint/suspicious/useIsArray FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Array.isArray() instead of instanceof Array. diff --git a/crates/biome_js_analyze/tests/specs/nursery/useIsArray/valid-shadowing.js b/crates/biome_js_analyze/tests/specs/suspicious/useIsArray/valid-shadowing.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useIsArray/valid-shadowing.js rename to crates/biome_js_analyze/tests/specs/suspicious/useIsArray/valid-shadowing.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/useIsArray/valid-shadowing.js.snap b/crates/biome_js_analyze/tests/specs/suspicious/useIsArray/valid-shadowing.js.snap similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useIsArray/valid-shadowing.js.snap rename to crates/biome_js_analyze/tests/specs/suspicious/useIsArray/valid-shadowing.js.snap diff --git a/crates/biome_js_analyze/tests/specs/nursery/useIsArray/valid.js b/crates/biome_js_analyze/tests/specs/suspicious/useIsArray/valid.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useIsArray/valid.js rename to crates/biome_js_analyze/tests/specs/suspicious/useIsArray/valid.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/useIsArray/valid.js.snap b/crates/biome_js_analyze/tests/specs/suspicious/useIsArray/valid.js.snap similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useIsArray/valid.js.snap rename to crates/biome_js_analyze/tests/specs/suspicious/useIsArray/valid.js.snap diff --git a/crates/biome_js_transform/src/transformers/ts_enum.rs b/crates/biome_js_transform/src/transformers/ts_enum.rs index f6cb22c1526e..a50755fd6272 100644 --- a/crates/biome_js_transform/src/transformers/ts_enum.rs +++ b/crates/biome_js_transform/src/transformers/ts_enum.rs @@ -23,7 +23,7 @@ use biome_rowan::{AstNode, BatchMutationExt, TriviaPieceKind}; declare_transformation! { /// Transform a TypeScript [TsEnumDeclaration] pub(crate) TsEnum { - version: "next", + version: "1.3.0", name: "transformEnum", } } diff --git a/crates/biome_service/src/configuration/parse/json/rules.rs b/crates/biome_service/src/configuration/parse/json/rules.rs index aa34a6dc57e4..6e26aa5784c7 100644 --- a/crates/biome_service/src/configuration/parse/json/rules.rs +++ b/crates/biome_service/src/configuration/parse/json/rules.rs @@ -777,6 +777,7 @@ impl VisitNode for Complexity { "recommended", "all", "noBannedTypes", + "noExcessiveComplexity", "noExtraBooleanCast", "noForEach", "noMultipleSpacesInRegularExpressionLiterals", @@ -790,6 +791,7 @@ impl VisitNode for Complexity { "noUselessSwitchCase", "noUselessThisAlias", "noUselessTypeConstraint", + "noVoid", "noWith", "useFlatMap", "useLiteralKeys", @@ -838,6 +840,29 @@ impl VisitNode for Complexity { )); } }, + "noExcessiveComplexity" => match value { + AnyJsonValue::JsonStringValue(_) => { + let mut configuration = RuleConfiguration::default(); + self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; + self.no_excessive_complexity = Some(configuration); + } + AnyJsonValue::JsonObjectValue(_) => { + let mut rule_configuration = RuleConfiguration::default(); + rule_configuration.map_rule_configuration( + &value, + name_text, + "noExcessiveComplexity", + diagnostics, + )?; + self.no_excessive_complexity = Some(rule_configuration); + } + _ => { + diagnostics.push(DeserializationDiagnostic::new_incorrect_type( + "object or string", + value.range(), + )); + } + }, "noExtraBooleanCast" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); @@ -1138,6 +1163,29 @@ impl VisitNode for Complexity { )); } }, + "noVoid" => match value { + AnyJsonValue::JsonStringValue(_) => { + let mut configuration = RuleConfiguration::default(); + self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; + self.no_void = Some(configuration); + } + AnyJsonValue::JsonObjectValue(_) => { + let mut rule_configuration = RuleConfiguration::default(); + rule_configuration.map_rule_configuration( + &value, + name_text, + "noVoid", + diagnostics, + )?; + self.no_void = Some(rule_configuration); + } + _ => { + diagnostics.push(DeserializationDiagnostic::new_incorrect_type( + "object or string", + value.range(), + )); + } + }, "noWith" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); @@ -1318,6 +1366,8 @@ impl VisitNode for Correctness { "noUnusedVariables", "noVoidElementsWithChildren", "noVoidTypeReturn", + "useExhaustiveDependencies", + "useHookAtTopLevel", "useIsNan", "useValidForDirection", "useYield", @@ -1938,6 +1988,52 @@ impl VisitNode for Correctness { )); } }, + "useExhaustiveDependencies" => match value { + AnyJsonValue::JsonStringValue(_) => { + let mut configuration = RuleConfiguration::default(); + self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; + self.use_exhaustive_dependencies = Some(configuration); + } + AnyJsonValue::JsonObjectValue(_) => { + let mut rule_configuration = RuleConfiguration::default(); + rule_configuration.map_rule_configuration( + &value, + name_text, + "useExhaustiveDependencies", + diagnostics, + )?; + self.use_exhaustive_dependencies = Some(rule_configuration); + } + _ => { + diagnostics.push(DeserializationDiagnostic::new_incorrect_type( + "object or string", + value.range(), + )); + } + }, + "useHookAtTopLevel" => match value { + AnyJsonValue::JsonStringValue(_) => { + let mut configuration = RuleConfiguration::default(); + self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; + self.use_hook_at_top_level = Some(configuration); + } + AnyJsonValue::JsonObjectValue(_) => { + let mut rule_configuration = RuleConfiguration::default(); + rule_configuration.map_rule_configuration( + &value, + name_text, + "useHookAtTopLevel", + diagnostics, + )?; + self.use_hook_at_top_level = Some(rule_configuration); + } + _ => { + diagnostics.push(DeserializationDiagnostic::new_incorrect_type( + "object or string", + value.range(), + )); + } + }, "useIsNan" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); @@ -2023,16 +2119,11 @@ impl VisitNode for Nursery { &[ "recommended", "all", - "noAccumulatingSpread", "noApproximativeNumericConstant", - "noConfusingVoidType", "noDuplicateJsonKeys", "noEmptyBlockStatements", "noEmptyCharacterClassInRegex", - "noExcessiveComplexity", - "noFallthroughSwitchClause", "noGlobalIsFinite", - "noGlobalIsNan", "noInteractiveElementToNoninteractiveRole", "noInvalidNewBuiltin", "noMisleadingInstantiator", @@ -2040,16 +2131,11 @@ impl VisitNode for Nursery { "noUnusedImports", "noUselessElse", "noUselessLoneBlockStatements", - "noVoid", "useAriaActivedescendantWithTabindex", "useArrowFunction", "useAsConstAssertion", - "useCollapsedElseIf", - "useExhaustiveDependencies", "useGroupedTypeImport", - "useHookAtTopLevel", "useImportRestrictions", - "useIsArray", "useShorthandAssign", ], diagnostics, @@ -2070,29 +2156,6 @@ impl VisitNode for Nursery { "all" => { self.all = Some(self.map_to_boolean(&value, name_text, diagnostics)?); } - "noAccumulatingSpread" => match value { - AnyJsonValue::JsonStringValue(_) => { - let mut configuration = RuleConfiguration::default(); - self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_accumulating_spread = Some(configuration); - } - AnyJsonValue::JsonObjectValue(_) => { - let mut rule_configuration = RuleConfiguration::default(); - rule_configuration.map_rule_configuration( - &value, - name_text, - "noAccumulatingSpread", - diagnostics, - )?; - self.no_accumulating_spread = Some(rule_configuration); - } - _ => { - diagnostics.push(DeserializationDiagnostic::new_incorrect_type( - "object or string", - value.range(), - )); - } - }, "noApproximativeNumericConstant" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); @@ -2116,29 +2179,6 @@ impl VisitNode for Nursery { )); } }, - "noConfusingVoidType" => match value { - AnyJsonValue::JsonStringValue(_) => { - let mut configuration = RuleConfiguration::default(); - self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_confusing_void_type = Some(configuration); - } - AnyJsonValue::JsonObjectValue(_) => { - let mut rule_configuration = RuleConfiguration::default(); - rule_configuration.map_rule_configuration( - &value, - name_text, - "noConfusingVoidType", - diagnostics, - )?; - self.no_confusing_void_type = Some(rule_configuration); - } - _ => { - diagnostics.push(DeserializationDiagnostic::new_incorrect_type( - "object or string", - value.range(), - )); - } - }, "noDuplicateJsonKeys" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); @@ -2208,52 +2248,6 @@ impl VisitNode for Nursery { )); } }, - "noExcessiveComplexity" => match value { - AnyJsonValue::JsonStringValue(_) => { - let mut configuration = RuleConfiguration::default(); - self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_excessive_complexity = Some(configuration); - } - AnyJsonValue::JsonObjectValue(_) => { - let mut rule_configuration = RuleConfiguration::default(); - rule_configuration.map_rule_configuration( - &value, - name_text, - "noExcessiveComplexity", - diagnostics, - )?; - self.no_excessive_complexity = Some(rule_configuration); - } - _ => { - diagnostics.push(DeserializationDiagnostic::new_incorrect_type( - "object or string", - value.range(), - )); - } - }, - "noFallthroughSwitchClause" => match value { - AnyJsonValue::JsonStringValue(_) => { - let mut configuration = RuleConfiguration::default(); - self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_fallthrough_switch_clause = Some(configuration); - } - AnyJsonValue::JsonObjectValue(_) => { - let mut rule_configuration = RuleConfiguration::default(); - rule_configuration.map_rule_configuration( - &value, - name_text, - "noFallthroughSwitchClause", - diagnostics, - )?; - self.no_fallthrough_switch_clause = Some(rule_configuration); - } - _ => { - diagnostics.push(DeserializationDiagnostic::new_incorrect_type( - "object or string", - value.range(), - )); - } - }, "noGlobalIsFinite" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); @@ -2277,29 +2271,6 @@ impl VisitNode for Nursery { )); } }, - "noGlobalIsNan" => match value { - AnyJsonValue::JsonStringValue(_) => { - let mut configuration = RuleConfiguration::default(); - self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_global_is_nan = Some(configuration); - } - AnyJsonValue::JsonObjectValue(_) => { - let mut rule_configuration = RuleConfiguration::default(); - rule_configuration.map_rule_configuration( - &value, - name_text, - "noGlobalIsNan", - diagnostics, - )?; - self.no_global_is_nan = Some(rule_configuration); - } - _ => { - diagnostics.push(DeserializationDiagnostic::new_incorrect_type( - "object or string", - value.range(), - )); - } - }, "noInteractiveElementToNoninteractiveRole" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); @@ -2461,29 +2432,6 @@ impl VisitNode for Nursery { )); } }, - "noVoid" => match value { - AnyJsonValue::JsonStringValue(_) => { - let mut configuration = RuleConfiguration::default(); - self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_void = Some(configuration); - } - AnyJsonValue::JsonObjectValue(_) => { - let mut rule_configuration = RuleConfiguration::default(); - rule_configuration.map_rule_configuration( - &value, - name_text, - "noVoid", - diagnostics, - )?; - self.no_void = Some(rule_configuration); - } - _ => { - diagnostics.push(DeserializationDiagnostic::new_incorrect_type( - "object or string", - value.range(), - )); - } - }, "useAriaActivedescendantWithTabindex" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); @@ -2553,52 +2501,6 @@ impl VisitNode for Nursery { )); } }, - "useCollapsedElseIf" => match value { - AnyJsonValue::JsonStringValue(_) => { - let mut configuration = RuleConfiguration::default(); - self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.use_collapsed_else_if = Some(configuration); - } - AnyJsonValue::JsonObjectValue(_) => { - let mut rule_configuration = RuleConfiguration::default(); - rule_configuration.map_rule_configuration( - &value, - name_text, - "useCollapsedElseIf", - diagnostics, - )?; - self.use_collapsed_else_if = Some(rule_configuration); - } - _ => { - diagnostics.push(DeserializationDiagnostic::new_incorrect_type( - "object or string", - value.range(), - )); - } - }, - "useExhaustiveDependencies" => match value { - AnyJsonValue::JsonStringValue(_) => { - let mut configuration = RuleConfiguration::default(); - self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.use_exhaustive_dependencies = Some(configuration); - } - AnyJsonValue::JsonObjectValue(_) => { - let mut rule_configuration = RuleConfiguration::default(); - rule_configuration.map_rule_configuration( - &value, - name_text, - "useExhaustiveDependencies", - diagnostics, - )?; - self.use_exhaustive_dependencies = Some(rule_configuration); - } - _ => { - diagnostics.push(DeserializationDiagnostic::new_incorrect_type( - "object or string", - value.range(), - )); - } - }, "useGroupedTypeImport" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); @@ -2622,29 +2524,6 @@ impl VisitNode for Nursery { )); } }, - "useHookAtTopLevel" => match value { - AnyJsonValue::JsonStringValue(_) => { - let mut configuration = RuleConfiguration::default(); - self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.use_hook_at_top_level = Some(configuration); - } - AnyJsonValue::JsonObjectValue(_) => { - let mut rule_configuration = RuleConfiguration::default(); - rule_configuration.map_rule_configuration( - &value, - name_text, - "useHookAtTopLevel", - diagnostics, - )?; - self.use_hook_at_top_level = Some(rule_configuration); - } - _ => { - diagnostics.push(DeserializationDiagnostic::new_incorrect_type( - "object or string", - value.range(), - )); - } - }, "useImportRestrictions" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); @@ -2668,29 +2547,6 @@ impl VisitNode for Nursery { )); } }, - "useIsArray" => match value { - AnyJsonValue::JsonStringValue(_) => { - let mut configuration = RuleConfiguration::default(); - self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.use_is_array = Some(configuration); - } - AnyJsonValue::JsonObjectValue(_) => { - let mut rule_configuration = RuleConfiguration::default(); - rule_configuration.map_rule_configuration( - &value, - name_text, - "useIsArray", - diagnostics, - )?; - self.use_is_array = Some(rule_configuration); - } - _ => { - diagnostics.push(DeserializationDiagnostic::new_incorrect_type( - "object or string", - value.range(), - )); - } - }, "useShorthandAssign" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); @@ -2725,7 +2581,11 @@ impl VisitNode for Performance { node: &SyntaxNode, diagnostics: &mut Vec, ) -> Option<()> { - has_only_known_keys(node, &["recommended", "all", "noDelete"], diagnostics) + has_only_known_keys( + node, + &["recommended", "all", "noAccumulatingSpread", "noDelete"], + diagnostics, + ) } fn visit_map( &mut self, @@ -2742,6 +2602,29 @@ impl VisitNode for Performance { "all" => { self.all = Some(self.map_to_boolean(&value, name_text, diagnostics)?); } + "noAccumulatingSpread" => match value { + AnyJsonValue::JsonStringValue(_) => { + let mut configuration = RuleConfiguration::default(); + self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; + self.no_accumulating_spread = Some(configuration); + } + AnyJsonValue::JsonObjectValue(_) => { + let mut rule_configuration = RuleConfiguration::default(); + rule_configuration.map_rule_configuration( + &value, + name_text, + "noAccumulatingSpread", + diagnostics, + )?; + self.no_accumulating_spread = Some(rule_configuration); + } + _ => { + diagnostics.push(DeserializationDiagnostic::new_incorrect_type( + "object or string", + value.range(), + )); + } + }, "noDelete" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); @@ -2878,6 +2761,7 @@ impl VisitNode for Style { "noUnusedTemplateLiteral", "noVar", "useBlockStatements", + "useCollapsedElseIf", "useConst", "useDefaultParameterLast", "useEnumInitializers", @@ -3233,6 +3117,29 @@ impl VisitNode for Style { )); } }, + "useCollapsedElseIf" => match value { + AnyJsonValue::JsonStringValue(_) => { + let mut configuration = RuleConfiguration::default(); + self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; + self.use_collapsed_else_if = Some(configuration); + } + AnyJsonValue::JsonObjectValue(_) => { + let mut rule_configuration = RuleConfiguration::default(); + rule_configuration.map_rule_configuration( + &value, + name_text, + "useCollapsedElseIf", + diagnostics, + )?; + self.use_collapsed_else_if = Some(rule_configuration); + } + _ => { + diagnostics.push(DeserializationDiagnostic::new_incorrect_type( + "object or string", + value.range(), + )); + } + }, "useConst" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); @@ -3579,6 +3486,7 @@ impl VisitNode for Suspicious { "noCommentText", "noCompareNegZero", "noConfusingLabels", + "noConfusingVoidType", "noConsoleLog", "noConstEnum", "noControlCharactersInRegex", @@ -3592,7 +3500,9 @@ impl VisitNode for Suspicious { "noEmptyInterface", "noExplicitAny", "noExtraNonNullAssertion", + "noFallthroughSwitchClause", "noFunctionAssign", + "noGlobalIsNan", "noImportAssign", "noLabelVar", "noPrototypeBuiltins", @@ -3605,6 +3515,7 @@ impl VisitNode for Suspicious { "noUnsafeNegation", "useDefaultSwitchClauseLast", "useGetterReturn", + "useIsArray", "useNamespaceKeyword", "useValidTypeof", ], @@ -3810,6 +3721,29 @@ impl VisitNode for Suspicious { )); } }, + "noConfusingVoidType" => match value { + AnyJsonValue::JsonStringValue(_) => { + let mut configuration = RuleConfiguration::default(); + self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; + self.no_confusing_void_type = Some(configuration); + } + AnyJsonValue::JsonObjectValue(_) => { + let mut rule_configuration = RuleConfiguration::default(); + rule_configuration.map_rule_configuration( + &value, + name_text, + "noConfusingVoidType", + diagnostics, + )?; + self.no_confusing_void_type = Some(rule_configuration); + } + _ => { + diagnostics.push(DeserializationDiagnostic::new_incorrect_type( + "object or string", + value.range(), + )); + } + }, "noConsoleLog" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); @@ -4109,6 +4043,29 @@ impl VisitNode for Suspicious { )); } }, + "noFallthroughSwitchClause" => match value { + AnyJsonValue::JsonStringValue(_) => { + let mut configuration = RuleConfiguration::default(); + self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; + self.no_fallthrough_switch_clause = Some(configuration); + } + AnyJsonValue::JsonObjectValue(_) => { + let mut rule_configuration = RuleConfiguration::default(); + rule_configuration.map_rule_configuration( + &value, + name_text, + "noFallthroughSwitchClause", + diagnostics, + )?; + self.no_fallthrough_switch_clause = Some(rule_configuration); + } + _ => { + diagnostics.push(DeserializationDiagnostic::new_incorrect_type( + "object or string", + value.range(), + )); + } + }, "noFunctionAssign" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); @@ -4132,6 +4089,29 @@ impl VisitNode for Suspicious { )); } }, + "noGlobalIsNan" => match value { + AnyJsonValue::JsonStringValue(_) => { + let mut configuration = RuleConfiguration::default(); + self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; + self.no_global_is_nan = Some(configuration); + } + AnyJsonValue::JsonObjectValue(_) => { + let mut rule_configuration = RuleConfiguration::default(); + rule_configuration.map_rule_configuration( + &value, + name_text, + "noGlobalIsNan", + diagnostics, + )?; + self.no_global_is_nan = Some(rule_configuration); + } + _ => { + diagnostics.push(DeserializationDiagnostic::new_incorrect_type( + "object or string", + value.range(), + )); + } + }, "noImportAssign" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); @@ -4408,6 +4388,29 @@ impl VisitNode for Suspicious { )); } }, + "useIsArray" => match value { + AnyJsonValue::JsonStringValue(_) => { + let mut configuration = RuleConfiguration::default(); + self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; + self.use_is_array = Some(configuration); + } + AnyJsonValue::JsonObjectValue(_) => { + let mut rule_configuration = RuleConfiguration::default(); + rule_configuration.map_rule_configuration( + &value, + name_text, + "useIsArray", + diagnostics, + )?; + self.use_is_array = Some(rule_configuration); + } + _ => { + diagnostics.push(DeserializationDiagnostic::new_incorrect_type( + "object or string", + value.range(), + )); + } + }, "useNamespaceKeyword" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); diff --git a/editors/vscode/configuration_schema.json b/editors/vscode/configuration_schema.json index 4f20250e6e8a..5a1568264997 100644 --- a/editors/vscode/configuration_schema.json +++ b/editors/vscode/configuration_schema.json @@ -273,6 +273,13 @@ { "type": "null" } ] }, + "noExcessiveComplexity": { + "description": "Disallow functions that exceed a given Cognitive Complexity score.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noExtraBooleanCast": { "description": "Disallow unnecessary boolean casts", "anyOf": [ @@ -364,6 +371,13 @@ { "type": "null" } ] }, + "noVoid": { + "description": "Disallow the use of void operators, which is not a familiar operator.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noWith": { "description": "Disallow with statements in non-strict contexts.", "anyOf": [ @@ -620,6 +634,20 @@ "description": "It enables the recommended rules for this group", "type": ["boolean", "null"] }, + "useExhaustiveDependencies": { + "description": "Enforce all dependencies are correctly specified in a React hook.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, + "useHookAtTopLevel": { + "description": "Enforce that all React hooks are being called from the Top Level component functions.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "useIsNan": { "description": "Require calls to isNaN() when checking for NaN.", "anyOf": [ @@ -998,13 +1026,6 @@ "description": "It enables ALL rules for this group.", "type": ["boolean", "null"] }, - "noAccumulatingSpread": { - "description": "Disallow the use of spread (...) syntax on accumulators.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, "noApproximativeNumericConstant": { "description": "Usually, the definition in the standard library is more precise than what people come up with or the used constant exceeds the maximum precision of the number type.", "anyOf": [ @@ -1012,13 +1033,6 @@ { "type": "null" } ] }, - "noConfusingVoidType": { - "description": "Disallow void type outside of generic or return types.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, "noDuplicateJsonKeys": { "description": "Disallow two keys with the same name inside a JSON object.", "anyOf": [ @@ -1040,20 +1054,6 @@ { "type": "null" } ] }, - "noExcessiveComplexity": { - "description": "Disallow functions that exceed a given Cognitive Complexity score.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noFallthroughSwitchClause": { - "description": "Disallow fallthrough of switch clauses.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, "noGlobalIsFinite": { "description": "Use Number.isFinite instead of global isFinite.", "anyOf": [ @@ -1061,13 +1061,6 @@ { "type": "null" } ] }, - "noGlobalIsNan": { - "description": "Use Number.isNaN instead of global isNaN.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, "noInteractiveElementToNoninteractiveRole": { "description": "Enforce that non-interactive ARIA roles are not assigned to interactive HTML elements.", "anyOf": [ @@ -1117,13 +1110,6 @@ { "type": "null" } ] }, - "noVoid": { - "description": "Disallow the use of void operators, which is not a familiar operator.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, "recommended": { "description": "It enables the recommended rules for this group", "type": ["boolean", "null"] @@ -1149,20 +1135,6 @@ { "type": "null" } ] }, - "useCollapsedElseIf": { - "description": "Enforce using else if instead of nested if in else clauses.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "useExhaustiveDependencies": { - "description": "Enforce all dependencies are correctly specified in a React hook.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, "useGroupedTypeImport": { "description": "Enforce the use of import type when an import only has specifiers with type qualifier.", "anyOf": [ @@ -1170,13 +1142,6 @@ { "type": "null" } ] }, - "useHookAtTopLevel": { - "description": "Enforce that all React hooks are being called from the Top Level component functions.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, "useImportRestrictions": { "description": "Disallows package private imports.", "anyOf": [ @@ -1184,13 +1149,6 @@ { "type": "null" } ] }, - "useIsArray": { - "description": "Use Array.isArray() instead of instanceof Array.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, "useShorthandAssign": { "description": "Require assignment operator shorthand where possible.", "anyOf": [ @@ -1227,6 +1185,13 @@ "description": "It enables ALL rules for this group.", "type": ["boolean", "null"] }, + "noAccumulatingSpread": { + "description": "Disallow the use of spread (...) syntax on accumulators.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noDelete": { "description": "Disallow the use of the delete operator.", "anyOf": [ @@ -1487,6 +1452,13 @@ { "type": "null" } ] }, + "useCollapsedElseIf": { + "description": "Enforce using else if instead of nested if in else clauses.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "useConst": { "description": "Require const declarations for variables that are never reassigned after declared.", "anyOf": [ @@ -1651,6 +1623,13 @@ { "type": "null" } ] }, + "noConfusingVoidType": { + "description": "Disallow void type outside of generic or return types.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noConsoleLog": { "description": "Disallow the use of console.log", "anyOf": [ @@ -1742,6 +1721,13 @@ { "type": "null" } ] }, + "noFallthroughSwitchClause": { + "description": "Disallow fallthrough of switch clauses.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noFunctionAssign": { "description": "Disallow reassigning function declarations.", "anyOf": [ @@ -1749,6 +1735,13 @@ { "type": "null" } ] }, + "noGlobalIsNan": { + "description": "Use Number.isNaN instead of global isNaN.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noImportAssign": { "description": "Disallow assigning to imported bindings", "anyOf": [ @@ -1837,6 +1830,13 @@ { "type": "null" } ] }, + "useIsArray": { + "description": "Use Array.isArray() instead of instanceof Array.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "useNamespaceKeyword": { "description": "Require using the namespace keyword over the module keyword to declare TypeScript namespaces.", "anyOf": [ diff --git a/packages/@biomejs/backend-jsonrpc/src/workspace.ts b/packages/@biomejs/backend-jsonrpc/src/workspace.ts index d9c8b0a9f8c0..d6e309df37f4 100644 --- a/packages/@biomejs/backend-jsonrpc/src/workspace.ts +++ b/packages/@biomejs/backend-jsonrpc/src/workspace.ts @@ -463,6 +463,10 @@ export interface Complexity { * Disallow primitive type aliases and misleading types. */ noBannedTypes?: RuleConfiguration; + /** + * Disallow functions that exceed a given Cognitive Complexity score. + */ + noExcessiveComplexity?: RuleConfiguration; /** * Disallow unnecessary boolean casts */ @@ -515,6 +519,10 @@ export interface Complexity { * Disallow using any or unknown as type constraint. */ noUselessTypeConstraint?: RuleConfiguration; + /** + * Disallow the use of void operators, which is not a familiar operator. + */ + noVoid?: RuleConfiguration; /** * Disallow with statements in non-strict contexts. */ @@ -660,6 +668,14 @@ export interface Correctness { * It enables the recommended rules for this group */ recommended?: boolean; + /** + * Enforce all dependencies are correctly specified in a React hook. + */ + useExhaustiveDependencies?: RuleConfiguration; + /** + * Enforce that all React hooks are being called from the Top Level component functions. + */ + useHookAtTopLevel?: RuleConfiguration; /** * Require calls to isNaN() when checking for NaN. */ @@ -681,18 +697,10 @@ export interface Nursery { * It enables ALL rules for this group. */ all?: boolean; - /** - * Disallow the use of spread (...) syntax on accumulators. - */ - noAccumulatingSpread?: RuleConfiguration; /** * Usually, the definition in the standard library is more precise than what people come up with or the used constant exceeds the maximum precision of the number type. */ noApproximativeNumericConstant?: RuleConfiguration; - /** - * Disallow void type outside of generic or return types. - */ - noConfusingVoidType?: RuleConfiguration; /** * Disallow two keys with the same name inside a JSON object. */ @@ -705,22 +713,10 @@ export interface Nursery { * Disallow empty character classes in regular expression literals. */ noEmptyCharacterClassInRegex?: RuleConfiguration; - /** - * Disallow functions that exceed a given Cognitive Complexity score. - */ - noExcessiveComplexity?: RuleConfiguration; - /** - * Disallow fallthrough of switch clauses. - */ - noFallthroughSwitchClause?: RuleConfiguration; /** * Use Number.isFinite instead of global isFinite. */ noGlobalIsFinite?: RuleConfiguration; - /** - * Use Number.isNaN instead of global isNaN. - */ - noGlobalIsNan?: RuleConfiguration; /** * Enforce that non-interactive ARIA roles are not assigned to interactive HTML elements. */ @@ -749,10 +745,6 @@ export interface Nursery { * Disallow unnecessary nested block statements. */ noUselessLoneBlockStatements?: RuleConfiguration; - /** - * Disallow the use of void operators, which is not a familiar operator. - */ - noVoid?: RuleConfiguration; /** * It enables the recommended rules for this group */ @@ -769,30 +761,14 @@ export interface Nursery { * Enforce the use of as const over literal type and type annotation. */ useAsConstAssertion?: RuleConfiguration; - /** - * Enforce using else if instead of nested if in else clauses. - */ - useCollapsedElseIf?: RuleConfiguration; - /** - * Enforce all dependencies are correctly specified in a React hook. - */ - useExhaustiveDependencies?: RuleConfiguration; /** * Enforce the use of import type when an import only has specifiers with type qualifier. */ useGroupedTypeImport?: RuleConfiguration; - /** - * Enforce that all React hooks are being called from the Top Level component functions. - */ - useHookAtTopLevel?: RuleConfiguration; /** * Disallows package private imports. */ useImportRestrictions?: RuleConfiguration; - /** - * Use Array.isArray() instead of instanceof Array. - */ - useIsArray?: RuleConfiguration; /** * Require assignment operator shorthand where possible. */ @@ -806,6 +782,10 @@ export interface Performance { * It enables ALL rules for this group. */ all?: boolean; + /** + * Disallow the use of spread (...) syntax on accumulators. + */ + noAccumulatingSpread?: RuleConfiguration; /** * Disallow the use of the delete operator. */ @@ -904,6 +884,10 @@ export interface Style { * Requires following curly brace conventions. */ useBlockStatements?: RuleConfiguration; + /** + * Enforce using else if instead of nested if in else clauses. + */ + useCollapsedElseIf?: RuleConfiguration; /** * Require const declarations for variables that are never reassigned after declared. */ @@ -1001,6 +985,10 @@ export interface Suspicious { * Disallow labeled statements that are not loops. */ noConfusingLabels?: RuleConfiguration; + /** + * Disallow void type outside of generic or return types. + */ + noConfusingVoidType?: RuleConfiguration; /** * Disallow the use of console.log */ @@ -1053,10 +1041,18 @@ export interface Suspicious { * Prevents the wrong usage of the non-null assertion operator (!) in TypeScript files. */ noExtraNonNullAssertion?: RuleConfiguration; + /** + * Disallow fallthrough of switch clauses. + */ + noFallthroughSwitchClause?: RuleConfiguration; /** * Disallow reassigning function declarations. */ noFunctionAssign?: RuleConfiguration; + /** + * Use Number.isNaN instead of global isNaN. + */ + noGlobalIsNan?: RuleConfiguration; /** * Disallow assigning to imported bindings */ @@ -1109,6 +1105,10 @@ export interface Suspicious { * Enforce get methods to always return a value. */ useGetterReturn?: RuleConfiguration; + /** + * Use Array.isArray() instead of instanceof Array. + */ + useIsArray?: RuleConfiguration; /** * Require using the namespace keyword over the module keyword to declare TypeScript namespaces. */ @@ -1299,6 +1299,7 @@ export type Category = | "lint/a11y/useValidAriaValues" | "lint/a11y/useValidLang" | "lint/complexity/noBannedTypes" + | "lint/complexity/noExcessiveComplexity" | "lint/complexity/noExtraBooleanCast" | "lint/complexity/noForEach" | "lint/complexity/noMultipleSpacesInRegularExpressionLiterals" @@ -1312,6 +1313,7 @@ export type Category = | "lint/complexity/noUselessSwitchCase" | "lint/complexity/noUselessThisAlias" | "lint/complexity/noUselessTypeConstraint" + | "lint/complexity/noVoid" | "lint/complexity/noWith" | "lint/complexity/useFlatMap" | "lint/complexity/useLiteralKeys" @@ -1344,19 +1346,16 @@ export type Category = | "lint/correctness/noUnusedVariables" | "lint/correctness/noVoidElementsWithChildren" | "lint/correctness/noVoidTypeReturn" + | "lint/correctness/useExhaustiveDependencies" + | "lint/correctness/useHookAtTopLevel" | "lint/correctness/useIsNan" | "lint/correctness/useValidForDirection" | "lint/correctness/useYield" - | "lint/nursery/noAccumulatingSpread" | "lint/nursery/noApproximativeNumericConstant" - | "lint/nursery/noConfusingVoidType" | "lint/nursery/noDuplicateJsonKeys" | "lint/nursery/noEmptyBlockStatements" | "lint/nursery/noEmptyCharacterClassInRegex" - | "lint/nursery/noExcessiveComplexity" - | "lint/nursery/noFallthroughSwitchClause" | "lint/nursery/noGlobalIsFinite" - | "lint/nursery/noGlobalIsNan" | "lint/nursery/noInteractiveElementToNoninteractiveRole" | "lint/nursery/noInvalidNewBuiltin" | "lint/nursery/noMisleadingInstantiator" @@ -1364,18 +1363,14 @@ export type Category = | "lint/nursery/noUnusedImports" | "lint/nursery/noUselessElse" | "lint/nursery/noUselessLoneBlockStatements" - | "lint/nursery/noVoid" | "lint/nursery/useAriaActivedescendantWithTabindex" | "lint/nursery/useArrowFunction" | "lint/nursery/useAsConstAssertion" | "lint/nursery/useBiomeSuppressionComment" - | "lint/nursery/useCollapsedElseIf" - | "lint/nursery/useExhaustiveDependencies" | "lint/nursery/useGroupedTypeImport" - | "lint/nursery/useHookAtTopLevel" | "lint/nursery/useImportRestrictions" - | "lint/nursery/useIsArray" | "lint/nursery/useShorthandAssign" + | "lint/performance/noAccumulatingSpread" | "lint/performance/noDelete" | "lint/security/noDangerouslySetInnerHtml" | "lint/security/noDangerouslySetInnerHtmlWithChildren" @@ -1393,6 +1388,7 @@ export type Category = | "lint/style/noUnusedTemplateLiteral" | "lint/style/noVar" | "lint/style/useBlockStatements" + | "lint/style/useCollapsedElseIf" | "lint/style/useConst" | "lint/style/useDefaultParameterLast" | "lint/style/useEnumInitializers" @@ -1415,6 +1411,7 @@ export type Category = | "lint/suspicious/noCommentText" | "lint/suspicious/noCompareNegZero" | "lint/suspicious/noConfusingLabels" + | "lint/suspicious/noConfusingVoidType" | "lint/suspicious/noConsoleLog" | "lint/suspicious/noConstEnum" | "lint/suspicious/noControlCharactersInRegex" @@ -1428,7 +1425,9 @@ export type Category = | "lint/suspicious/noEmptyInterface" | "lint/suspicious/noExplicitAny" | "lint/suspicious/noExtraNonNullAssertion" + | "lint/suspicious/noFallthroughSwitchClause" | "lint/suspicious/noFunctionAssign" + | "lint/suspicious/noGlobalIsNan" | "lint/suspicious/noImportAssign" | "lint/suspicious/noLabelVar" | "lint/suspicious/noPrototypeBuiltins" @@ -1441,6 +1440,7 @@ export type Category = | "lint/suspicious/noUnsafeNegation" | "lint/suspicious/useDefaultSwitchClauseLast" | "lint/suspicious/useGetterReturn" + | "lint/suspicious/useIsArray" | "lint/suspicious/useNamespaceKeyword" | "lint/suspicious/useValidTypeof" | "files/missingHandler" diff --git a/packages/@biomejs/biome/configuration_schema.json b/packages/@biomejs/biome/configuration_schema.json index 4f20250e6e8a..5a1568264997 100644 --- a/packages/@biomejs/biome/configuration_schema.json +++ b/packages/@biomejs/biome/configuration_schema.json @@ -273,6 +273,13 @@ { "type": "null" } ] }, + "noExcessiveComplexity": { + "description": "Disallow functions that exceed a given Cognitive Complexity score.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noExtraBooleanCast": { "description": "Disallow unnecessary boolean casts", "anyOf": [ @@ -364,6 +371,13 @@ { "type": "null" } ] }, + "noVoid": { + "description": "Disallow the use of void operators, which is not a familiar operator.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noWith": { "description": "Disallow with statements in non-strict contexts.", "anyOf": [ @@ -620,6 +634,20 @@ "description": "It enables the recommended rules for this group", "type": ["boolean", "null"] }, + "useExhaustiveDependencies": { + "description": "Enforce all dependencies are correctly specified in a React hook.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, + "useHookAtTopLevel": { + "description": "Enforce that all React hooks are being called from the Top Level component functions.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "useIsNan": { "description": "Require calls to isNaN() when checking for NaN.", "anyOf": [ @@ -998,13 +1026,6 @@ "description": "It enables ALL rules for this group.", "type": ["boolean", "null"] }, - "noAccumulatingSpread": { - "description": "Disallow the use of spread (...) syntax on accumulators.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, "noApproximativeNumericConstant": { "description": "Usually, the definition in the standard library is more precise than what people come up with or the used constant exceeds the maximum precision of the number type.", "anyOf": [ @@ -1012,13 +1033,6 @@ { "type": "null" } ] }, - "noConfusingVoidType": { - "description": "Disallow void type outside of generic or return types.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, "noDuplicateJsonKeys": { "description": "Disallow two keys with the same name inside a JSON object.", "anyOf": [ @@ -1040,20 +1054,6 @@ { "type": "null" } ] }, - "noExcessiveComplexity": { - "description": "Disallow functions that exceed a given Cognitive Complexity score.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noFallthroughSwitchClause": { - "description": "Disallow fallthrough of switch clauses.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, "noGlobalIsFinite": { "description": "Use Number.isFinite instead of global isFinite.", "anyOf": [ @@ -1061,13 +1061,6 @@ { "type": "null" } ] }, - "noGlobalIsNan": { - "description": "Use Number.isNaN instead of global isNaN.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, "noInteractiveElementToNoninteractiveRole": { "description": "Enforce that non-interactive ARIA roles are not assigned to interactive HTML elements.", "anyOf": [ @@ -1117,13 +1110,6 @@ { "type": "null" } ] }, - "noVoid": { - "description": "Disallow the use of void operators, which is not a familiar operator.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, "recommended": { "description": "It enables the recommended rules for this group", "type": ["boolean", "null"] @@ -1149,20 +1135,6 @@ { "type": "null" } ] }, - "useCollapsedElseIf": { - "description": "Enforce using else if instead of nested if in else clauses.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "useExhaustiveDependencies": { - "description": "Enforce all dependencies are correctly specified in a React hook.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, "useGroupedTypeImport": { "description": "Enforce the use of import type when an import only has specifiers with type qualifier.", "anyOf": [ @@ -1170,13 +1142,6 @@ { "type": "null" } ] }, - "useHookAtTopLevel": { - "description": "Enforce that all React hooks are being called from the Top Level component functions.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, "useImportRestrictions": { "description": "Disallows package private imports.", "anyOf": [ @@ -1184,13 +1149,6 @@ { "type": "null" } ] }, - "useIsArray": { - "description": "Use Array.isArray() instead of instanceof Array.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, "useShorthandAssign": { "description": "Require assignment operator shorthand where possible.", "anyOf": [ @@ -1227,6 +1185,13 @@ "description": "It enables ALL rules for this group.", "type": ["boolean", "null"] }, + "noAccumulatingSpread": { + "description": "Disallow the use of spread (...) syntax on accumulators.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noDelete": { "description": "Disallow the use of the delete operator.", "anyOf": [ @@ -1487,6 +1452,13 @@ { "type": "null" } ] }, + "useCollapsedElseIf": { + "description": "Enforce using else if instead of nested if in else clauses.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "useConst": { "description": "Require const declarations for variables that are never reassigned after declared.", "anyOf": [ @@ -1651,6 +1623,13 @@ { "type": "null" } ] }, + "noConfusingVoidType": { + "description": "Disallow void type outside of generic or return types.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noConsoleLog": { "description": "Disallow the use of console.log", "anyOf": [ @@ -1742,6 +1721,13 @@ { "type": "null" } ] }, + "noFallthroughSwitchClause": { + "description": "Disallow fallthrough of switch clauses.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noFunctionAssign": { "description": "Disallow reassigning function declarations.", "anyOf": [ @@ -1749,6 +1735,13 @@ { "type": "null" } ] }, + "noGlobalIsNan": { + "description": "Use Number.isNaN instead of global isNaN.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noImportAssign": { "description": "Disallow assigning to imported bindings", "anyOf": [ @@ -1837,6 +1830,13 @@ { "type": "null" } ] }, + "useIsArray": { + "description": "Use Array.isArray() instead of instanceof Array.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "useNamespaceKeyword": { "description": "Require using the namespace keyword over the module keyword to declare TypeScript namespaces.", "anyOf": [ diff --git a/website/src/components/generated/RecommendedRules.astro b/website/src/components/generated/RecommendedRules.astro index 67ecfe54743a..052cb002994a 100644 --- a/website/src/components/generated/RecommendedRules.astro +++ b/website/src/components/generated/RecommendedRules.astro @@ -26,6 +26,7 @@
  • useValidLang
  • noBannedTypes
  • noExtraBooleanCast
  • +
  • noForEach
  • noMultipleSpacesInRegularExpressionLiterals
  • noStaticOnlyClass
  • noUselessCatch
  • @@ -65,9 +66,11 @@
  • noUnusedLabels
  • noVoidElementsWithChildren
  • noVoidTypeReturn
  • +
  • useExhaustiveDependencies
  • useIsNan
  • useValidForDirection
  • useYield
  • +
  • noAccumulatingSpread
  • noDelete
  • noDangerouslySetInnerHtml
  • noDangerouslySetInnerHtmlWithChildren
  • @@ -96,6 +99,7 @@
  • noCommentText
  • noCompareNegZero
  • noConfusingLabels
  • +
  • noConfusingVoidType
  • noConstEnum
  • noControlCharactersInRegex
  • noDebugger
  • @@ -108,7 +112,9 @@
  • noEmptyInterface
  • noExplicitAny
  • noExtraNonNullAssertion
  • +
  • noFallthroughSwitchClause
  • noFunctionAssign
  • +
  • noGlobalIsNan
  • noImportAssign
  • noLabelVar
  • noPrototypeBuiltins
  • @@ -121,6 +127,7 @@
  • noUnsafeNegation
  • useDefaultSwitchClauseLast
  • useGetterReturn
  • +
  • useIsArray
  • useNamespaceKeyword
  • useValidTypeof
  • diff --git a/website/src/content/docs/linter/rules/no-accumulating-spread.md b/website/src/content/docs/linter/rules/no-accumulating-spread.md index c8f657aebcc8..69f85c1da5b4 100644 --- a/website/src/content/docs/linter/rules/no-accumulating-spread.md +++ b/website/src/content/docs/linter/rules/no-accumulating-spread.md @@ -2,10 +2,10 @@ title: noAccumulatingSpread (since v1.0.0) --- -**Diagnostic Category: `lint/nursery/noAccumulatingSpread`** +**Diagnostic Category: `lint/performance/noAccumulatingSpread`** -:::caution -This rule is part of the [nursery](/linter/rules/#nursery) group. +:::note +This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: Disallow the use of spread (`...`) syntax on accumulators. @@ -26,9 +26,9 @@ var a = ['a', 'b', 'c']; a.reduce((acc, val) => [...acc, val], []); ``` -
    nursery/noAccumulatingSpread.js:2:25 lint/nursery/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    +
    performance/noAccumulatingSpread.js:2:25 lint/performance/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━
     
    -   Avoid the use of spread (`...`) syntax on accumulators.
    +   Avoid the use of spread (`...`) syntax on accumulators.
       
         1 │ var a = ['a', 'b', 'c'];
       > 2 │ a.reduce((acc, val) => [...acc, val], []);
    @@ -37,6 +37,8 @@ a.reduce((acc, val) => [...acc, val], []);
       
        Spread syntax should be avoided on accumulators (like those in `.reduce`) because it causes a time complexity of `O(n^2)`.
       
    +   Consider methods such as .splice or .push instead.
    +  
     
    ```jsx @@ -44,9 +46,9 @@ var a = ['a', 'b', 'c']; a.reduce((acc, val) => {return [...acc, val];}, []); ``` -
    nursery/noAccumulatingSpread.js:2:33 lint/nursery/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    +
    performance/noAccumulatingSpread.js:2:33 lint/performance/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━
     
    -   Avoid the use of spread (`...`) syntax on accumulators.
    +   Avoid the use of spread (`...`) syntax on accumulators.
       
         1 │ var a = ['a', 'b', 'c'];
       > 2 │ a.reduce((acc, val) => {return [...acc, val];}, []);
    @@ -55,6 +57,8 @@ a.reduce((acc, val) => {return [...acc, val];}, []);
       
        Spread syntax should be avoided on accumulators (like those in `.reduce`) because it causes a time complexity of `O(n^2)`.
       
    +   Consider methods such as .splice or .push instead.
    +  
     
    ```jsx @@ -62,9 +66,9 @@ var a = ['a', 'b', 'c']; a.reduce((acc, val) => ({...acc, [val]: val}), {}); ``` -
    nursery/noAccumulatingSpread.js:2:26 lint/nursery/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    +
    performance/noAccumulatingSpread.js:2:26 lint/performance/noAccumulatingSpread ━━━━━━━━━━━━━━━━━━━━━
     
    -   Avoid the use of spread (`...`) syntax on accumulators.
    +   Avoid the use of spread (`...`) syntax on accumulators.
       
         1 │ var a = ['a', 'b', 'c'];
       > 2 │ a.reduce((acc, val) => ({...acc, [val]: val}), {});
    @@ -73,6 +77,8 @@ a.reduce((acc, val) => ({...acc, [val]: val}), {});
       
        Spread syntax should be avoided on accumulators (like those in `.reduce`) because it causes a time complexity of `O(n^2)`.
       
    +   Consider methods such as .splice or .push instead.
    +  
     
    ## Valid diff --git a/website/src/content/docs/linter/rules/no-approximative-numeric-constant.md b/website/src/content/docs/linter/rules/no-approximative-numeric-constant.md index 6bceabe5b05a..c501def132e7 100644 --- a/website/src/content/docs/linter/rules/no-approximative-numeric-constant.md +++ b/website/src/content/docs/linter/rules/no-approximative-numeric-constant.md @@ -1,5 +1,5 @@ --- -title: noApproximativeNumericConstant (since vnext) +title: noApproximativeNumericConstant (since v1.3.0) --- **Diagnostic Category: `lint/nursery/noApproximativeNumericConstant`** diff --git a/website/src/content/docs/linter/rules/no-confusing-void-type.md b/website/src/content/docs/linter/rules/no-confusing-void-type.md index 4344cb6db069..f3a9e8d9d8f2 100644 --- a/website/src/content/docs/linter/rules/no-confusing-void-type.md +++ b/website/src/content/docs/linter/rules/no-confusing-void-type.md @@ -2,10 +2,10 @@ title: noConfusingVoidType (since v1.2.0) --- -**Diagnostic Category: `lint/nursery/noConfusingVoidType`** +**Diagnostic Category: `lint/suspicious/noConfusingVoidType`** -:::caution -This rule is part of the [nursery](/linter/rules/#nursery) group. +:::note +This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: Disallow `void` type outside of generic or return types. @@ -24,28 +24,32 @@ If you think you need this then you probably want the undefined type instead. let foo: void; ``` -
    nursery/noConfusingVoidType.js:1:10 lint/nursery/noConfusingVoidType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    +
    suspicious/noConfusingVoidType.js:1:10 lint/suspicious/noConfusingVoidType ━━━━━━━━━━━━━━━━━━━━━━━━━
     
    -   void is only valid as a return type or a type argument in generic type
    +   void is only valid as a return type or a type argument in generic type
       
       > 1 │ let foo: void;
                 ^^^^
         2 │ 
       
    +   Remove void
    +  
     
    ```ts function logSomething(thing: void) {} ``` -
    nursery/noConfusingVoidType.js:1:30 lint/nursery/noConfusingVoidType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    +
    suspicious/noConfusingVoidType.js:1:30 lint/suspicious/noConfusingVoidType ━━━━━━━━━━━━━━━━━━━━━━━━━
     
    -   void is only valid as a return type or a type argument in generic type
    +   void is only valid as a return type or a type argument in generic type
       
       > 1 │ function logSomething(thing: void) {}
                                     ^^^^
         2 │ 
       
    +   Remove void
    +  
     
    ```ts @@ -54,9 +58,9 @@ interface Interface { } ``` -
    nursery/noConfusingVoidType.js:2:11 lint/nursery/noConfusingVoidType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    +
    suspicious/noConfusingVoidType.js:2:11 lint/suspicious/noConfusingVoidType ━━━━━━━━━━━━━━━━━━━━━━━━━
     
    -   void is only valid as a return type or a type argument in generic type
    +   void is only valid as a return type or a type argument in generic type
       
         1 │ interface Interface {
       > 2 │     prop: void;
    @@ -64,20 +68,24 @@ interface Interface {
         3 │ }
         4 │ 
       
    +   Remove void
    +  
     
    ```ts type PossibleValues = number | void; ``` -
    nursery/noConfusingVoidType.js:1:32 lint/nursery/noConfusingVoidType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    +
    suspicious/noConfusingVoidType.js:1:32 lint/suspicious/noConfusingVoidType ━━━━━━━━━━━━━━━━━━━━━━━━━
     
    -   void is not valid as a constituent in a union type
    +   void is not valid as a constituent in a union type
       
       > 1 │ type PossibleValues = number | void;
                                       ^^^^
         2 │ 
       
    +   Remove void
    +  
     
    ### Valid diff --git a/website/src/content/docs/linter/rules/no-empty-character-class-in-regex.md b/website/src/content/docs/linter/rules/no-empty-character-class-in-regex.md index f657f7deba15..edb698082039 100644 --- a/website/src/content/docs/linter/rules/no-empty-character-class-in-regex.md +++ b/website/src/content/docs/linter/rules/no-empty-character-class-in-regex.md @@ -1,5 +1,5 @@ --- -title: noEmptyCharacterClassInRegex (since vnext) +title: noEmptyCharacterClassInRegex (since v1.3.0) --- **Diagnostic Category: `lint/nursery/noEmptyCharacterClassInRegex`** diff --git a/website/src/content/docs/linter/rules/no-excessive-complexity.md b/website/src/content/docs/linter/rules/no-excessive-complexity.md index acdb796872bb..e1c43a8d0ae0 100644 --- a/website/src/content/docs/linter/rules/no-excessive-complexity.md +++ b/website/src/content/docs/linter/rules/no-excessive-complexity.md @@ -2,11 +2,7 @@ title: noExcessiveComplexity (since v1.0.0) --- -**Diagnostic Category: `lint/nursery/noExcessiveComplexity`** - -:::caution -This rule is part of the [nursery](/linter/rules/#nursery) group. -::: +**Diagnostic Category: `lint/complexity/noExcessiveComplexity`** Disallow functions that exceed a given Cognitive Complexity score. @@ -47,7 +43,7 @@ function tooComplex() { } ``` -
    nursery/noExcessiveComplexity.js:1:10 lint/nursery/noExcessiveComplexity ━━━━━━━━━━━━━━━━━━━━━━━━━━━
    +
    complexity/noExcessiveComplexity.js:1:10 lint/complexity/noExcessiveComplexity ━━━━━━━━━━━━━━━━━━━━━
     
        Excessive complexity detected.
       
    diff --git a/website/src/content/docs/linter/rules/no-fallthrough-switch-clause.md b/website/src/content/docs/linter/rules/no-fallthrough-switch-clause.md
    index edd473f9fea6..51e1a7bf4573 100644
    --- a/website/src/content/docs/linter/rules/no-fallthrough-switch-clause.md
    +++ b/website/src/content/docs/linter/rules/no-fallthrough-switch-clause.md
    @@ -2,10 +2,10 @@
     title: noFallthroughSwitchClause (since v1.0.0)
     ---
     
    -**Diagnostic Category: `lint/nursery/noFallthroughSwitchClause`**
    +**Diagnostic Category: `lint/suspicious/noFallthroughSwitchClause`**
     
    -:::caution
    -This rule is part of the [nursery](/linter/rules/#nursery) group.
    +:::note
    +This rule is recommended by Biome. A diagnostic error will appear when linting your code.
     :::
     
     Disallow fallthrough of `switch` clauses.
    @@ -28,9 +28,9 @@ switch (bar) {
     }
     ```
     
    -
    nursery/noFallthroughSwitchClause.js:2:2 lint/nursery/noFallthroughSwitchClause ━━━━━━━━━━━━━━━━━━━━
    +
    suspicious/noFallthroughSwitchClause.js:2:2 lint/suspicious/noFallthroughSwitchClause ━━━━━━━━━━━━━━
     
    -   This case is falling through to the next case.
    +   This case is falling through to the next case.
       
         1 │ switch (bar) {
       > 2 │ 	case 0:
    diff --git a/website/src/content/docs/linter/rules/no-for-each.md b/website/src/content/docs/linter/rules/no-for-each.md
    index ec69a0e05c54..6dcc15bc8182 100644
    --- a/website/src/content/docs/linter/rules/no-for-each.md
    +++ b/website/src/content/docs/linter/rules/no-for-each.md
    @@ -4,6 +4,10 @@ title: noForEach (since v1.0.0)
     
     **Diagnostic Category: `lint/complexity/noForEach`**
     
    +:::note
    +This rule is recommended by Biome. A diagnostic error will appear when linting your code.
    +:::
    +
     Prefer `for...of` statement instead of `Array.forEach`.
     
     Here's a summary of why `forEach` may be disallowed, and why `for...of` is preferred for almost any use-case of `forEach`:
    @@ -33,7 +37,7 @@ els.forEach(el => {
     
     
    complexity/noForEach.js:1:1 lint/complexity/noForEach ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
     
    -   Prefer for...of instead of Array.forEach
    +   Prefer for...of instead of Array.forEach
       
       > 1 │ els.forEach(el => {
        ^^^^^^^^^^^^^^^^^^^
    @@ -42,6 +46,8 @@ els.forEach(el => {
        ^^
         4 │ 
       
    +   forEach could lead to performance issue when working with large arrays. When combined with functions like .filter or .map, this causes multiple iterations over the same type.
    +  
     
    ```jsx @@ -52,7 +58,7 @@ els['forEach'](el => {
    complexity/noForEach.js:1:1 lint/complexity/noForEach ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
     
    -   Prefer for...of instead of Array.forEach
    +   Prefer for...of instead of Array.forEach
       
       > 1 │ els['forEach'](el => {
        ^^^^^^^^^^^^^^^^^^^^^^
    @@ -61,6 +67,8 @@ els['forEach'](el => {
        ^^
         4 │ 
       
    +   forEach could lead to performance issue when working with large arrays. When combined with functions like .filter or .map, this causes multiple iterations over the same type.
    +  
     
    ## Valid diff --git a/website/src/content/docs/linter/rules/no-global-is-nan.md b/website/src/content/docs/linter/rules/no-global-is-nan.md index 0eb5b59b54fa..2caaa4cecdf8 100644 --- a/website/src/content/docs/linter/rules/no-global-is-nan.md +++ b/website/src/content/docs/linter/rules/no-global-is-nan.md @@ -2,10 +2,10 @@ title: noGlobalIsNan (since v1.0.0) --- -**Diagnostic Category: `lint/nursery/noGlobalIsNan`** +**Diagnostic Category: `lint/suspicious/noGlobalIsNan`** -:::caution -This rule is part of the [nursery](/linter/rules/#nursery) group. +:::note +This rule is recommended by Biome. A diagnostic error will appear when linting your code. ::: Use `Number.isNaN` instead of global `isNaN`. @@ -23,7 +23,7 @@ Therefore, it is a more reliable way to test whether a value is `NaN`. isNaN({}); // true ``` -
    nursery/noGlobalIsNan.js:1:1 lint/nursery/noGlobalIsNan  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    +
    suspicious/noGlobalIsNan.js:1:1 lint/suspicious/noGlobalIsNan  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
     
        isNaN is unsafe. It attempts a type coercion. Use Number.isNaN instead.
       
    diff --git a/website/src/content/docs/linter/rules/no-interactive-element-to-noninteractive-role.md b/website/src/content/docs/linter/rules/no-interactive-element-to-noninteractive-role.md
    index 8a988aa73c88..6b3d0a606727 100644
    --- a/website/src/content/docs/linter/rules/no-interactive-element-to-noninteractive-role.md
    +++ b/website/src/content/docs/linter/rules/no-interactive-element-to-noninteractive-role.md
    @@ -1,5 +1,5 @@
     ---
    -title: noInteractiveElementToNoninteractiveRole (since vnext)
    +title: noInteractiveElementToNoninteractiveRole (since v1.3.0)
     ---
     
     **Diagnostic Category: `lint/nursery/noInteractiveElementToNoninteractiveRole`**
    diff --git a/website/src/content/docs/linter/rules/no-invalid-new-builtin.md b/website/src/content/docs/linter/rules/no-invalid-new-builtin.md
    index 11e1cea79085..d084c42715c6 100644
    --- a/website/src/content/docs/linter/rules/no-invalid-new-builtin.md
    +++ b/website/src/content/docs/linter/rules/no-invalid-new-builtin.md
    @@ -1,5 +1,5 @@
     ---
    -title: noInvalidNewBuiltin (since vnext)
    +title: noInvalidNewBuiltin (since v1.3.0)
     ---
     
     **Diagnostic Category: `lint/nursery/noInvalidNewBuiltin`**
    diff --git a/website/src/content/docs/linter/rules/no-misleading-instantiator.md b/website/src/content/docs/linter/rules/no-misleading-instantiator.md
    index 70b273b95f19..1e5f5142c7d0 100644
    --- a/website/src/content/docs/linter/rules/no-misleading-instantiator.md
    +++ b/website/src/content/docs/linter/rules/no-misleading-instantiator.md
    @@ -1,5 +1,5 @@
     ---
    -title: noMisleadingInstantiator (since vnext)
    +title: noMisleadingInstantiator (since v1.3.0)
     ---
     
     **Diagnostic Category: `lint/nursery/noMisleadingInstantiator`**
    diff --git a/website/src/content/docs/linter/rules/no-misrefactored-shorthand-assign.md b/website/src/content/docs/linter/rules/no-misrefactored-shorthand-assign.md
    index dcec94565956..6a3ce97d6210 100644
    --- a/website/src/content/docs/linter/rules/no-misrefactored-shorthand-assign.md
    +++ b/website/src/content/docs/linter/rules/no-misrefactored-shorthand-assign.md
    @@ -1,5 +1,5 @@
     ---
    -title: noMisrefactoredShorthandAssign (since vnext)
    +title: noMisrefactoredShorthandAssign (since v1.3.0)
     ---
     
     **Diagnostic Category: `lint/nursery/noMisrefactoredShorthandAssign`**
    diff --git a/website/src/content/docs/linter/rules/no-unused-imports.md b/website/src/content/docs/linter/rules/no-unused-imports.md
    index add78b446286..642d26e4e6c7 100644
    --- a/website/src/content/docs/linter/rules/no-unused-imports.md
    +++ b/website/src/content/docs/linter/rules/no-unused-imports.md
    @@ -1,5 +1,5 @@
     ---
    -title: noUnusedImports (since vnext)
    +title: noUnusedImports (since v1.3.0)
     ---
     
     **Diagnostic Category: `lint/nursery/noUnusedImports`**
    diff --git a/website/src/content/docs/linter/rules/no-useless-else.md b/website/src/content/docs/linter/rules/no-useless-else.md
    index 1f99bb5d9d71..eb46b5b9167e 100644
    --- a/website/src/content/docs/linter/rules/no-useless-else.md
    +++ b/website/src/content/docs/linter/rules/no-useless-else.md
    @@ -1,5 +1,5 @@
     ---
    -title: noUselessElse (since vnext)
    +title: noUselessElse (since v1.3.0)
     ---
     
     **Diagnostic Category: `lint/nursery/noUselessElse`**
    diff --git a/website/src/content/docs/linter/rules/no-useless-lone-block-statements.md b/website/src/content/docs/linter/rules/no-useless-lone-block-statements.md
    index 77295a7b5922..82b9b18ce20b 100644
    --- a/website/src/content/docs/linter/rules/no-useless-lone-block-statements.md
    +++ b/website/src/content/docs/linter/rules/no-useless-lone-block-statements.md
    @@ -1,5 +1,5 @@
     ---
    -title: noUselessLoneBlockStatements (since vnext)
    +title: noUselessLoneBlockStatements (since v1.3.0)
     ---
     
     **Diagnostic Category: `lint/nursery/noUselessLoneBlockStatements`**
    diff --git a/website/src/content/docs/linter/rules/no-void.md b/website/src/content/docs/linter/rules/no-void.md
    index c2779cf39ff7..5d11fd45720d 100644
    --- a/website/src/content/docs/linter/rules/no-void.md
    +++ b/website/src/content/docs/linter/rules/no-void.md
    @@ -2,11 +2,7 @@
     title: noVoid (since v1.0.0)
     ---
     
    -**Diagnostic Category: `lint/nursery/noVoid`**
    -
    -:::caution
    -This rule is part of the [nursery](/linter/rules/#nursery) group.
    -:::
    +**Diagnostic Category: `lint/complexity/noVoid`**
     
     Disallow the use of `void` operators, which is not a familiar operator.
     
    @@ -24,7 +20,7 @@ Source: https://eslint.org/docs/latest/rules/no-void
     void 0;
     ```
     
    -
    nursery/noVoid.js:1:1 lint/nursery/noVoid ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    +
    complexity/noVoid.js:1:1 lint/complexity/noVoid ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
     
        The use of void is not allowed.
       
    diff --git a/website/src/content/docs/linter/rules/use-aria-activedescendant-with-tabindex.md b/website/src/content/docs/linter/rules/use-aria-activedescendant-with-tabindex.md
    index be1315b4a693..63495be596be 100644
    --- a/website/src/content/docs/linter/rules/use-aria-activedescendant-with-tabindex.md
    +++ b/website/src/content/docs/linter/rules/use-aria-activedescendant-with-tabindex.md
    @@ -1,5 +1,5 @@
     ---
    -title: useAriaActivedescendantWithTabindex (since vnext)
    +title: useAriaActivedescendantWithTabindex (since v1.3.0)
     ---
     
     **Diagnostic Category: `lint/nursery/useAriaActivedescendantWithTabindex`**
    diff --git a/website/src/content/docs/linter/rules/use-as-const-assertion.md b/website/src/content/docs/linter/rules/use-as-const-assertion.md
    index 20ac1be9ce8f..350f7a40be29 100644
    --- a/website/src/content/docs/linter/rules/use-as-const-assertion.md
    +++ b/website/src/content/docs/linter/rules/use-as-const-assertion.md
    @@ -1,5 +1,5 @@
     ---
    -title: useAsConstAssertion (since vnext)
    +title: useAsConstAssertion (since v1.3.0)
     ---
     
     **Diagnostic Category: `lint/nursery/useAsConstAssertion`**
    diff --git a/website/src/content/docs/linter/rules/use-collapsed-else-if.md b/website/src/content/docs/linter/rules/use-collapsed-else-if.md
    index 2e7502eddea5..888214b92e4b 100644
    --- a/website/src/content/docs/linter/rules/use-collapsed-else-if.md
    +++ b/website/src/content/docs/linter/rules/use-collapsed-else-if.md
    @@ -2,11 +2,7 @@
     title: useCollapsedElseIf (since v1.1.0)
     ---
     
    -**Diagnostic Category: `lint/nursery/useCollapsedElseIf`**
    -
    -:::caution
    -This rule is part of the [nursery](/linter/rules/#nursery) group.
    -:::
    +**Diagnostic Category: `lint/style/useCollapsedElseIf`**
     
     Enforce using `else if` instead of nested `if` in `else` clauses.
     
    @@ -28,7 +24,7 @@ if (condition) {
     }
     ```
     
    -
    nursery/useCollapsedElseIf.js:3:9 lint/nursery/useCollapsedElseIf  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━
    +
    style/useCollapsedElseIf.js:3:9 lint/style/useCollapsedElseIf  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
     
        This if statement can be collapsed into an else if statement.
       
    @@ -70,7 +66,7 @@ if (condition) {
     }
     ```
     
    -
    nursery/useCollapsedElseIf.js:3:9 lint/nursery/useCollapsedElseIf  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━
    +
    style/useCollapsedElseIf.js:3:9 lint/style/useCollapsedElseIf  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
     
        This if statement can be collapsed into an else if statement.
       
    @@ -115,7 +111,7 @@ if (condition) {
     }
     ```
     
    -
    nursery/useCollapsedElseIf.js:3:9 lint/nursery/useCollapsedElseIf ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    +
    style/useCollapsedElseIf.js:3:9 lint/style/useCollapsedElseIf ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
     
        This if statement can be collapsed into an else if statement.
       
    diff --git a/website/src/content/docs/linter/rules/use-exhaustive-dependencies.md b/website/src/content/docs/linter/rules/use-exhaustive-dependencies.md
    index 211115c94bd2..2f856ea3c14a 100644
    --- a/website/src/content/docs/linter/rules/use-exhaustive-dependencies.md
    +++ b/website/src/content/docs/linter/rules/use-exhaustive-dependencies.md
    @@ -2,10 +2,10 @@
     title: useExhaustiveDependencies (since v1.0.0)
     ---
     
    -**Diagnostic Category: `lint/nursery/useExhaustiveDependencies`**
    +**Diagnostic Category: `lint/correctness/useExhaustiveDependencies`**
     
    -:::caution
    -This rule is part of the [nursery](/linter/rules/#nursery) group.
    +:::note
    +This rule is recommended by Biome. A diagnostic error will appear when linting your code.
     :::
     
     Enforce all dependencies are correctly specified in a React hook.
    @@ -49,7 +49,7 @@ function component() {
     }
     ```
     
    -
    nursery/useExhaustiveDependencies.js:5:5 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━
    +
    correctness/useExhaustiveDependencies.js:5:5 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━
     
        This hook do not specify all of its dependencies.
       
    @@ -81,7 +81,7 @@ function component() {
     }
     ```
     
    -
    nursery/useExhaustiveDependencies.js:5:5 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━
    +
    correctness/useExhaustiveDependencies.js:5:5 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━
     
        This hook specifies more dependencies than necessary.
       
    @@ -115,7 +115,7 @@ function component() {
     }
     ```
     
    -
    nursery/useExhaustiveDependencies.js:5:5 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━
    +
    correctness/useExhaustiveDependencies.js:5:5 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━
     
        This hook specifies more dependencies than necessary.
       
    @@ -149,7 +149,7 @@ function component() {
     }
     ```
     
    -
    nursery/useExhaustiveDependencies.js:6:5 lint/nursery/useExhaustiveDependencies ━━━━━━━━━━━━━━━━━━━━
    +
    correctness/useExhaustiveDependencies.js:6:5 lint/correctness/useExhaustiveDependencies ━━━━━━━━━━━━
     
        This hook do not specify all of its dependencies.
       
    diff --git a/website/src/content/docs/linter/rules/use-hook-at-top-level.md b/website/src/content/docs/linter/rules/use-hook-at-top-level.md
    index 3fae2252cee8..466628f11098 100644
    --- a/website/src/content/docs/linter/rules/use-hook-at-top-level.md
    +++ b/website/src/content/docs/linter/rules/use-hook-at-top-level.md
    @@ -2,11 +2,7 @@
     title: useHookAtTopLevel (since v1.0.0)
     ---
     
    -**Diagnostic Category: `lint/nursery/useHookAtTopLevel`**
    -
    -:::caution
    -This rule is part of the [nursery](/linter/rules/#nursery) group.
    -:::
    +**Diagnostic Category: `lint/correctness/useHookAtTopLevel`**
     
     Enforce that all React hooks are being called from the Top Level component functions.
     
    @@ -24,7 +20,7 @@ function Component1({ a }) {
     }
     ```
     
    -
    nursery/useHookAtTopLevel.js:3:9 lint/nursery/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    +
    correctness/useHookAtTopLevel.js:3:9 lint/correctness/useHookAtTopLevel ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
     
        This hook is being called conditionally, but all hooks must be called in the exact same order in every component render.
       
    diff --git a/website/src/content/docs/linter/rules/use-is-array.md b/website/src/content/docs/linter/rules/use-is-array.md
    index 6d009ba4febb..923f7fd33730 100644
    --- a/website/src/content/docs/linter/rules/use-is-array.md
    +++ b/website/src/content/docs/linter/rules/use-is-array.md
    @@ -2,10 +2,10 @@
     title: useIsArray (since v1.0.0)
     ---
     
    -**Diagnostic Category: `lint/nursery/useIsArray`**
    +**Diagnostic Category: `lint/suspicious/useIsArray`**
     
    -:::caution
    -This rule is part of the [nursery](/linter/rules/#nursery) group.
    +:::note
    +This rule is recommended by Biome. A diagnostic error will appear when linting your code.
     :::
     
     Use `Array.isArray()` instead of `instanceof Array`.
    @@ -28,7 +28,7 @@ const xs = [];
     if (xs instanceof Array) {}
     ```
     
    -
    nursery/useIsArray.js:2:5 lint/nursery/useIsArray  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    +
    suspicious/useIsArray.js:2:5 lint/suspicious/useIsArray  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
     
        Use Array.isArray() instead of instanceof Array.
       
    diff --git a/website/src/content/docs/linter/rules/use-shorthand-assign.md b/website/src/content/docs/linter/rules/use-shorthand-assign.md
    index 895c2cdfcd95..bf688dda8089 100644
    --- a/website/src/content/docs/linter/rules/use-shorthand-assign.md
    +++ b/website/src/content/docs/linter/rules/use-shorthand-assign.md
    @@ -1,5 +1,5 @@
     ---
    -title: useShorthandAssign (since vnext)
    +title: useShorthandAssign (since v1.3.0)
     ---
     
     **Diagnostic Category: `lint/nursery/useShorthandAssign`**
    diff --git a/xtask/codegen/src/generate_new_lintrule.rs b/xtask/codegen/src/generate_new_lintrule.rs
    index dc252bffdfc6..20722b6eba17 100644
    --- a/xtask/codegen/src/generate_new_lintrule.rs
    +++ b/xtask/codegen/src/generate_new_lintrule.rs
    @@ -54,7 +54,7 @@ declare_rule! {{
         /// ```
         ///
         pub(crate) {rule_name_upper_camel} {{
    -        version: "next",
    +        version: "1.3.0",
             name: "{rule_name_lower_camel}",
             recommended: false,
         }}
    diff --git a/xtask/codegen/src/promote_rule.rs b/xtask/codegen/src/promote_rule.rs
    index 86584e13ceb8..34fe20aa9f31 100644
    --- a/xtask/codegen/src/promote_rule.rs
    +++ b/xtask/codegen/src/promote_rule.rs
    @@ -1,5 +1,5 @@
     use case::CaseExt;
    -use fs_extra::dir::{move_dir, CopyOptions};
    +use fs_extra::dir::{create, move_dir, CopyOptions};
     use fs_extra::file;
     use fs_extra::file::move_file;
     use std::env;
    @@ -74,7 +74,19 @@ pub fn promote_rule(rule_name: &str, new_group: &str) {
             let new_lint_rule_text = lint_rules.join("\n");
             categories.replace_range(lint_start_index..lint_end_index, &new_lint_rule_text);
     
    -        move_file(rule_path, new_rule_path, &file::CopyOptions::default()).unwrap();
    +        if !new_group_path.exists() {
    +            create(new_rule_path.clone(), false).expect("To create the group folder");
    +        }
    +        move_file(
    +            rule_path.clone(),
    +            new_rule_path.clone(),
    +            &file::CopyOptions::default(),
    +        )
    +        .expect(&format!(
    +            "To copy {} to {}",
    +            rule_path.display(),
    +            new_rule_path.display()
    +        ));
             std::fs::write(categories_path, categories).unwrap();
     
             let old_test_path = current_dir
    diff --git a/xtask/lintdoc/src/main.rs b/xtask/lintdoc/src/main.rs
    index a351330b6619..ef1843863a63 100644
    --- a/xtask/lintdoc/src/main.rs
    +++ b/xtask/lintdoc/src/main.rs
    @@ -224,8 +224,17 @@ fn generate_group(
                     "\t
  • {rule}
  • \n" )); } + let has_code_action = meta.fix_kind.is_some(); - match generate_rule(root, group, rule, meta.docs, meta.version, is_recommended) { + match generate_rule( + root, + group, + rule, + meta.docs, + meta.version, + is_recommended, + has_code_action, + ) { Ok(summary) => { let mut properties = String::new(); if is_recommended { @@ -265,6 +274,7 @@ fn generate_rule( docs: &'static str, version: &'static str, is_recommended: bool, + has_fix_kind: bool, ) -> Result>> { let mut content = Vec::new(); @@ -296,7 +306,7 @@ fn generate_rule( writeln!(content)?; } - let summary = parse_documentation(group, rule, docs, &mut content)?; + let summary = parse_documentation(group, rule, docs, &mut content, has_fix_kind)?; writeln!(content, "## Related links")?; writeln!(content)?; @@ -316,6 +326,7 @@ fn parse_documentation( rule: &'static str, docs: &'static str, content: &mut Vec, + has_fix_kind: bool, ) -> Result>> { let parser = Parser::new(docs); @@ -378,7 +389,7 @@ fn parse_documentation( )?; } - assert_lint(group, rule, &test, &block, content) + assert_lint(group, rule, &test, &block, content, has_fix_kind) .context("snapshot test failed")?; if test.expect_diagnostic { @@ -585,6 +596,7 @@ fn assert_lint( test: &CodeBlockTest, code: &str, content: &mut Vec, + has_fix_kind: bool, ) -> Result<()> { let file = format!("{group}/{rule}.js"); @@ -645,6 +657,7 @@ fn assert_lint( if test.ignore { return Ok(()); } + let mut rule_has_code_action = false; match test.block_type { BlockType::Js(source_type) => { let parse = biome_js_parser::parse(code, source_type, JsParserOptions::default()); @@ -682,6 +695,7 @@ fn assert_lint( for action in signal.actions() { if !action.is_suppression() { + rule_has_code_action = true; diag = diag.add_code_suggestion(action.into()); } } @@ -708,6 +722,12 @@ fn assert_lint( } } + if test.expect_diagnostic { + if rule_has_code_action && !has_fix_kind { + bail!("The rule '{}' emitted code actions via `action` function, but you didn't mark rule with `fix_kind`.", rule) + } + } + if test.expect_diagnostic { // Fail the test if the analysis didn't emit any diagnostic ensure!( @@ -752,6 +772,7 @@ fn assert_lint( for action in signal.actions() { if !action.is_suppression() { + rule_has_code_action = true; diag = diag.add_code_suggestion(action.into()); } } @@ -776,6 +797,12 @@ fn assert_lint( for diagnostic in diagnostics { write_diagnostic(code, diagnostic)?; } + + if test.expect_diagnostic { + if rule_has_code_action && !has_fix_kind { + bail!("The rule '{}' emitted code actions via `action` function, but you didn't mark rule with `fix_kind`.", rule) + } + } } } } From 6c3f6257953d52846bf1543e83eaf8b41be20317 Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Mon, 16 Oct 2023 11:37:50 +0100 Subject: [PATCH 2/7] chore: update jsx files --- website/src/playground/PlaygroundLoader.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/src/playground/PlaygroundLoader.tsx b/website/src/playground/PlaygroundLoader.tsx index 46f51ae39936..a2428ba69c6f 100644 --- a/website/src/playground/PlaygroundLoader.tsx +++ b/website/src/playground/PlaygroundLoader.tsx @@ -50,7 +50,7 @@ function PlaygroundLoader() { const workerRef = useRef(null); const prettierWorkerRef = useRef(null); - // biome-ignore lint/nursery/useExhaustiveDependencies: dependencies mismatch + // biome-ignore lint/correctness/useExhaustiveDependencies: dependencies mismatch useEffect(() => { workerRef.current = new Worker( new URL("./workers/biomeWorker", import.meta.url), @@ -122,7 +122,7 @@ function PlaygroundLoader() { }, []); // Dispatch updated settings - // biome-ignore lint/nursery/useExhaustiveDependencies: dependencies mismatch + // biome-ignore lint/correctness/useExhaustiveDependencies: dependencies mismatch useEffect(() => { if (loadingState !== LoadingState.Success) { return; @@ -155,7 +155,7 @@ function PlaygroundLoader() { }, [loadingState, state.settings]); // Dispatch updated code to Prettier - // biome-ignore lint/nursery/useExhaustiveDependencies: dependencies mismatch + // biome-ignore lint/correctness/useExhaustiveDependencies: dependencies mismatch useEffect(() => { if (loadingState !== LoadingState.Success) { return; From ed2d797c121cbdac60a8c4160e89c858cf270005 Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Mon, 16 Oct 2023 11:52:47 +0100 Subject: [PATCH 3/7] chore: remove tests and address clippy --- crates/biome_cli/tests/commands/check.rs | 43 ------------ crates/biome_cli/tests/commands/lint.rs | 43 ------------ .../should_not_enable_nursery_rules.snap | 67 ------------------- .../should_not_enable_nursery_rules.snap | 36 ---------- .../incorrect_rule_name.snap | 2 + .../invalid/hooks_incorrect_options.json.snap | 36 +++++++--- .../invalid/hooks_missing_name.json.snap | 42 ++++++++---- xtask/codegen/src/promote_rule.rs | 12 ++-- xtask/lintdoc/src/main.rs | 12 ++-- 9 files changed, 70 insertions(+), 223 deletions(-) delete mode 100644 crates/biome_cli/tests/snapshots/main_commands_check/should_not_enable_nursery_rules.snap delete mode 100644 crates/biome_cli/tests/snapshots/main_commands_lint/should_not_enable_nursery_rules.snap diff --git a/crates/biome_cli/tests/commands/check.rs b/crates/biome_cli/tests/commands/check.rs index 0a093b01bf26..807f67cabb38 100644 --- a/crates/biome_cli/tests/commands/check.rs +++ b/crates/biome_cli/tests/commands/check.rs @@ -2491,49 +2491,6 @@ array.map((sentence) => sentence.split(" ")).flat(); )); } -#[test] -fn should_not_enable_nursery_rules() { - let mut fs = MemoryFileSystem::default(); - let mut console = BufferConsole::default(); - - let configuration = r#" { - "organizeImports": { - "enabled": false - }, - "linter": { - "enabled": true, - "rules": { - "recommended": true, - "nursery": { - "noAccumulatingSpread": "error" - } - } - } -}"#; - - let configuration_path = Path::new("biome.json"); - fs.insert(configuration_path.into(), configuration.as_bytes()); - - let file_path = Path::new("fix.ts"); - fs.insert(file_path.into(), r#"let confusingVoidType: void;"#); - - let result = run_cli( - DynRef::Borrowed(&mut fs), - &mut console, - Args::from([("check"), file_path.as_os_str().to_str().unwrap()].as_slice()), - ); - - assert!(result.is_err(), "run_cli returned {result:?}"); - - assert_cli_snapshot(SnapshotPayload::new( - module_path!(), - "should_not_enable_nursery_rules", - fs, - console, - result, - )); -} - #[test] fn apply_bogus_argument() { let mut fs = MemoryFileSystem::default(); diff --git a/crates/biome_cli/tests/commands/lint.rs b/crates/biome_cli/tests/commands/lint.rs index 02536abf8913..bfc05eb9b78a 100644 --- a/crates/biome_cli/tests/commands/lint.rs +++ b/crates/biome_cli/tests/commands/lint.rs @@ -2101,49 +2101,6 @@ array.map((sentence) => sentence.split(" ")).flat(); )); } -#[test] -fn should_not_enable_nursery_rules() { - let mut fs = MemoryFileSystem::default(); - let mut console = BufferConsole::default(); - - let configuration = r#" { - "organizeImports": { - "enabled": false - }, - "linter": { - "enabled": true, - "rules": { - "recommended": true, - "nursery": { - "noAccumulatingSpread": "error" - } - } - } -}"#; - - let configuration_path = Path::new("biome.json"); - fs.insert(configuration_path.into(), configuration.as_bytes()); - - let file_path = Path::new("fix.ts"); - fs.insert(file_path.into(), r#"let confusingVoidType: void;"#); - - let result = run_cli( - DynRef::Borrowed(&mut fs), - &mut console, - Args::from([("lint"), file_path.as_os_str().to_str().unwrap()].as_slice()), - ); - - assert!(result.is_ok(), "run_cli returned {result:?}"); - - assert_cli_snapshot(SnapshotPayload::new( - module_path!(), - "should_not_enable_nursery_rules", - fs, - console, - result, - )); -} - #[test] fn apply_bogus_argument() { let mut fs = MemoryFileSystem::default(); diff --git a/crates/biome_cli/tests/snapshots/main_commands_check/should_not_enable_nursery_rules.snap b/crates/biome_cli/tests/snapshots/main_commands_check/should_not_enable_nursery_rules.snap deleted file mode 100644 index 1f47cbf8f66b..000000000000 --- a/crates/biome_cli/tests/snapshots/main_commands_check/should_not_enable_nursery_rules.snap +++ /dev/null @@ -1,67 +0,0 @@ ---- -source: crates/biome_cli/tests/snap_test.rs -expression: content ---- -## `biome.json` - -```json -{ - "organizeImports": { - "enabled": false - }, - "linter": { - "enabled": true, - "rules": { - "recommended": true, - "nursery": { - "noAccumulatingSpread": "error" - } - } - } -} -``` - -## `fix.ts` - -```ts -let confusingVoidType: void; -``` - -# Termination Message - -```block -check ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - - × Some errors were emitted while running checks. - - - -``` - -# Emitted Messages - -```block -fix.ts format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - - i Formatter would have printed the following content: - - 1 │ - let·confusingVoidType:·void; - 1 │ + let·confusingVoidType:·void; - 2 │ + - - -``` - -```block -fix.ts check ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - - × The file contains diagnostics that needs to be addressed. - - -``` - -```block -Checked 1 file(s) in
    instead of global isFinite. | ⚠️ | | [noInteractiveElementToNoninteractiveRole](/linter/rules/no-interactive-element-to-noninteractive-role) | Enforce that non-interactive ARIA roles are not assigned to interactive HTML elements. | | | [noInvalidNewBuiltin](/linter/rules/no-invalid-new-builtin) | Disallow new operators with global non-constructor functions. | ⚠️ | | [noMisleadingInstantiator](/linter/rules/no-misleading-instantiator) | Enforce proper usage of new and constructor. | | diff --git a/website/src/content/docs/linter/rules/no-excessive-complexity.md b/website/src/content/docs/linter/rules/no-excessive-cognitive-complexity.md similarity index 89% rename from website/src/content/docs/linter/rules/no-excessive-complexity.md rename to website/src/content/docs/linter/rules/no-excessive-cognitive-complexity.md index e1c43a8d0ae0..18552e29246d 100644 --- a/website/src/content/docs/linter/rules/no-excessive-complexity.md +++ b/website/src/content/docs/linter/rules/no-excessive-cognitive-complexity.md @@ -1,8 +1,8 @@ --- -title: noExcessiveComplexity (since v1.0.0) +title: noExcessiveCognitiveComplexity (since v1.0.0) --- -**Diagnostic Category: `lint/complexity/noExcessiveComplexity`** +**Diagnostic Category: `lint/complexity/noExcessiveCognitiveComplexity`** Disallow functions that exceed a given Cognitive Complexity score. @@ -43,7 +43,7 @@ function tooComplex() { } ``` -
    complexity/noExcessiveComplexity.js:1:10 lint/complexity/noExcessiveComplexity ━━━━━━━━━━━━━━━━━━━━━
    +
    complexity/noExcessiveCognitiveComplexity.js:1:10 lint/complexity/noExcessiveCognitiveComplexity ━━━━━━━━━━
     
        Excessive complexity detected.
       
    diff --git a/website/src/content/docs/linter/rules/no-global-is-finite.md b/website/src/content/docs/linter/rules/no-global-is-finite.md
    index 7b7094ed32b2..a022767bd3ea 100644
    --- a/website/src/content/docs/linter/rules/no-global-is-finite.md
    +++ b/website/src/content/docs/linter/rules/no-global-is-finite.md
    @@ -2,10 +2,10 @@
     title: noGlobalIsFinite (since v1.0.0)
     ---
     
    -**Diagnostic Category: `lint/nursery/noGlobalIsFinite`**
    +**Diagnostic Category: `lint/suspicious/noGlobalIsFinite`**
     
    -:::caution
    -This rule is part of the [nursery](/linter/rules/#nursery) group.
    +:::note
    +This rule is recommended by Biome. A diagnostic error will appear when linting your code.
     :::
     
     Use `Number.isFinite` instead of global `isFinite`.
    @@ -23,7 +23,7 @@ Therefore, it is a more reliable way to test whether a number is finite.
     isFinite(false); // true
     ```
     
    -
    nursery/noGlobalIsFinite.js:1:1 lint/nursery/noGlobalIsFinite  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    +
    suspicious/noGlobalIsFinite.js:1:1 lint/suspicious/noGlobalIsFinite  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━
     
        isFinite is unsafe. It attempts a type coercion. Use Number.isFinite instead.
       
    
    From 93fd4a7cf3dadcd2d4eb0cf618a22c8dca4a0557 Mon Sep 17 00:00:00 2001
    From: Emanuele Stoppa 
    Date: Mon, 16 Oct 2023 15:58:40 +0100
    Subject: [PATCH 6/7] Update
     crates/biome_js_analyze/src/analyzers/complexity/no_for_each.rs
    
    Co-authored-by: Superchupu <53496941+SuperchupuDev@users.noreply.github.com>
    ---
     crates/biome_js_analyze/src/analyzers/complexity/no_for_each.rs | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/crates/biome_js_analyze/src/analyzers/complexity/no_for_each.rs b/crates/biome_js_analyze/src/analyzers/complexity/no_for_each.rs
    index e83baa4296b6..7244f6e01dd8 100644
    --- a/crates/biome_js_analyze/src/analyzers/complexity/no_for_each.rs
    +++ b/crates/biome_js_analyze/src/analyzers/complexity/no_for_each.rs
    @@ -70,7 +70,7 @@ impl Rule for NoForEach {
                     "Prefer for...of instead of Array.forEach"
                 },
             ).note(markup!{
    -            "forEach"" could lead to performance issue when working with large arrays. When combined with functions like .filter or .map, this causes multiple iterations over the same type."
    +            "forEach"" could lead to performance issues when working with large arrays. When combined with functions like .filter or .map, this causes multiple iterations over the same type."
             }))
         }
     }
    
    From be64ce53ffe9f250d8fc32704134fb0aec9103ae Mon Sep 17 00:00:00 2001
    From: Emanuele Stoppa 
    Date: Mon, 16 Oct 2023 16:26:36 +0100
    Subject: [PATCH 7/7] rebase
    
    ---
     .../biome_js_analyze/src/analyzers/nursery.rs |  10 -
     .../nursery/no_empty_block_statements.rs      |   2 +-
     .../complexity/noForEach/invalid.js.snap      |   8 +-
     .../src/configuration/linter/rules.rs         | 870 +++++++++---------
     .../invalid/hooks_incorrect_options.json.snap |   2 +-
     .../invalid/hooks_missing_name.json.snap      |   2 +-
     editors/vscode/configuration_schema.json      |   4 +-
     .../@biomejs/backend-jsonrpc/src/workspace.ts |   6 +-
     .../@biomejs/biome/configuration_schema.json  |   4 +-
     .../src/content/docs/internals/changelog.mdx  |  28 +-
     .../linter/rules/no-empty-block-statements.md |   2 +-
     .../content/docs/linter/rules/no-for-each.md  |   4 +-
     12 files changed, 482 insertions(+), 460 deletions(-)
    
    diff --git a/crates/biome_js_analyze/src/analyzers/nursery.rs b/crates/biome_js_analyze/src/analyzers/nursery.rs
    index 6a248b7fb40d..4890cc39b436 100644
    --- a/crates/biome_js_analyze/src/analyzers/nursery.rs
    +++ b/crates/biome_js_analyze/src/analyzers/nursery.rs
    @@ -3,19 +3,14 @@
     use biome_analyze::declare_group;
     
     pub(crate) mod no_approximative_numeric_constant;
    -pub(crate) mod no_confusing_void_type;
     pub(crate) mod no_empty_block_statements;
     pub(crate) mod no_empty_character_class_in_regex;
    -pub(crate) mod no_excessive_complexity;
    -pub(crate) mod no_fallthrough_switch_clause;
     pub(crate) mod no_misleading_instantiator;
     pub(crate) mod no_misrefactored_shorthand_assign;
     pub(crate) mod no_useless_else;
     pub(crate) mod no_useless_lone_block_statements;
    -pub(crate) mod no_void;
     pub(crate) mod use_arrow_function;
     pub(crate) mod use_as_const_assertion;
    -pub(crate) mod use_collapsed_else_if;
     pub(crate) mod use_grouped_type_import;
     pub(crate) mod use_import_restrictions;
     pub(crate) mod use_shorthand_assign;
    @@ -25,19 +20,14 @@ declare_group! {
             name : "nursery" ,
             rules : [
                 self :: no_approximative_numeric_constant :: NoApproximativeNumericConstant ,
    -            self :: no_confusing_void_type :: NoConfusingVoidType ,
                 self :: no_empty_block_statements :: NoEmptyBlockStatements ,
                 self :: no_empty_character_class_in_regex :: NoEmptyCharacterClassInRegex ,
    -            self :: no_excessive_complexity :: NoExcessiveComplexity ,
    -            self :: no_fallthrough_switch_clause :: NoFallthroughSwitchClause ,
                 self :: no_misleading_instantiator :: NoMisleadingInstantiator ,
                 self :: no_misrefactored_shorthand_assign :: NoMisrefactoredShorthandAssign ,
                 self :: no_useless_else :: NoUselessElse ,
                 self :: no_useless_lone_block_statements :: NoUselessLoneBlockStatements ,
    -            self :: no_void :: NoVoid ,
                 self :: use_arrow_function :: UseArrowFunction ,
                 self :: use_as_const_assertion :: UseAsConstAssertion ,
    -            self :: use_collapsed_else_if :: UseCollapsedElseIf ,
                 self :: use_grouped_type_import :: UseGroupedTypeImport ,
                 self :: use_import_restrictions :: UseImportRestrictions ,
                 self :: use_shorthand_assign :: UseShorthandAssign ,
    diff --git a/crates/biome_js_analyze/src/analyzers/nursery/no_empty_block_statements.rs b/crates/biome_js_analyze/src/analyzers/nursery/no_empty_block_statements.rs
    index 6c4f10f471df..07952b514d06 100644
    --- a/crates/biome_js_analyze/src/analyzers/nursery/no_empty_block_statements.rs
    +++ b/crates/biome_js_analyze/src/analyzers/nursery/no_empty_block_statements.rs
    @@ -55,7 +55,7 @@ declare_rule! {
         /// ```
         ///
         pub(crate) NoEmptyBlockStatements {
    -        version: "next",
    +        version: "1.3.0",
             name: "noEmptyBlockStatements",
             recommended: false,
         }
    diff --git a/crates/biome_js_analyze/tests/specs/complexity/noForEach/invalid.js.snap b/crates/biome_js_analyze/tests/specs/complexity/noForEach/invalid.js.snap
    index d76391259e25..706d7d5d11bd 100644
    --- a/crates/biome_js_analyze/tests/specs/complexity/noForEach/invalid.js.snap
    +++ b/crates/biome_js_analyze/tests/specs/complexity/noForEach/invalid.js.snap
    @@ -36,7 +36,7 @@ invalid.js:1:1 lint/complexity/noForEach ━━━━━━━━━━━━━
         4 │ 
         5 │ (els.forEach)((el) => {
       
    -  i forEach could lead to performance issue when working with large arrays. When combined with functions like .filter or .map, this causes multiple iterations over the same type.
    +  i forEach could lead to performance issues when working with large arrays. When combined with functions like .filter or .map, this causes multiple iterations over the same type.
       
     
     ```
    @@ -56,7 +56,7 @@ invalid.js:5:1 lint/complexity/noForEach ━━━━━━━━━━━━━
         8 │ 
         9 │ els['forEach']((el) => {
       
    -  i forEach could lead to performance issue when working with large arrays. When combined with functions like .filter or .map, this causes multiple iterations over the same type.
    +  i forEach could lead to performance issues when working with large arrays. When combined with functions like .filter or .map, this causes multiple iterations over the same type.
       
     
     ```
    @@ -76,7 +76,7 @@ invalid.js:9:1 lint/complexity/noForEach ━━━━━━━━━━━━━
         12 │ 
         13 │ (els['forEach'])((el) => {
       
    -  i forEach could lead to performance issue when working with large arrays. When combined with functions like .filter or .map, this causes multiple iterations over the same type.
    +  i forEach could lead to performance issues when working with large arrays. When combined with functions like .filter or .map, this causes multiple iterations over the same type.
       
     
     ```
    @@ -95,7 +95,7 @@ invalid.js:13:1 lint/complexity/noForEach ━━━━━━━━━━━━
            │ ^^
         16 │ 
       
    -  i forEach could lead to performance issue when working with large arrays. When combined with functions like .filter or .map, this causes multiple iterations over the same type.
    +  i forEach could lead to performance issues when working with large arrays. When combined with functions like .filter or .map, this causes multiple iterations over the same type.
       
     
     ```
    diff --git a/crates/biome_service/src/configuration/linter/rules.rs b/crates/biome_service/src/configuration/linter/rules.rs
    index dca7c4c64ca5..8c9d9308e94e 100644
    --- a/crates/biome_service/src/configuration/linter/rules.rs
    +++ b/crates/biome_service/src/configuration/linter/rules.rs
    @@ -967,6 +967,15 @@ pub struct Complexity {
         #[bpaf(long("no-banned-types"), argument("on|off|warn"), optional, hide)]
         #[serde(skip_serializing_if = "Option::is_none")]
         pub no_banned_types: Option,
    +    #[doc = "Disallow functions that exceed a given Cognitive Complexity score."]
    +    #[bpaf(
    +        long("no-excessive-cognitive-complexity"),
    +        argument("on|off|warn"),
    +        optional,
    +        hide
    +    )]
    +    #[serde(skip_serializing_if = "Option::is_none")]
    +    pub no_excessive_cognitive_complexity: Option,
         #[doc = "Disallow unnecessary boolean casts"]
         #[bpaf(long("no-extra-boolean-cast"), argument("on|off|warn"), optional, hide)]
         #[serde(skip_serializing_if = "Option::is_none")]
    @@ -1044,6 +1053,10 @@ pub struct Complexity {
         )]
         #[serde(skip_serializing_if = "Option::is_none")]
         pub no_useless_type_constraint: Option,
    +    #[doc = "Disallow the use of void operators, which is not a familiar operator."]
    +    #[bpaf(long("no-void"), argument("on|off|warn"), optional, hide)]
    +    #[serde(skip_serializing_if = "Option::is_none")]
    +    pub no_void: Option,
         #[doc = "Disallow with statements in non-strict contexts."]
         #[bpaf(long("no-with"), argument("on|off|warn"), optional, hide)]
         #[serde(skip_serializing_if = "Option::is_none")]
    @@ -1081,8 +1094,9 @@ pub struct Complexity {
     }
     impl Complexity {
         const GROUP_NAME: &'static str = "complexity";
    -    pub(crate) const GROUP_RULES: [&'static str; 20] = [
    +    pub(crate) const GROUP_RULES: [&'static str; 22] = [
             "noBannedTypes",
    +        "noExcessiveCognitiveComplexity",
             "noExtraBooleanCast",
             "noForEach",
             "noMultipleSpacesInRegularExpressionLiterals",
    @@ -1096,6 +1110,7 @@ impl Complexity {
             "noUselessSwitchCase",
             "noUselessThisAlias",
             "noUselessTypeConstraint",
    +        "noVoid",
             "noWith",
             "useFlatMap",
             "useLiteralKeys",
    @@ -1103,9 +1118,10 @@ impl Complexity {
             "useSimpleNumberKeys",
             "useSimplifiedLogicExpression",
         ];
    -    const RECOMMENDED_RULES: [&'static str; 17] = [
    +    const RECOMMENDED_RULES: [&'static str; 18] = [
             "noBannedTypes",
             "noExtraBooleanCast",
    +        "noForEach",
             "noMultipleSpacesInRegularExpressionLiterals",
             "noStaticOnlyClass",
             "noUselessCatch",
    @@ -1122,9 +1138,9 @@ impl Complexity {
             "useLiteralKeys",
             "useOptionalChain",
         ];
    -    const RECOMMENDED_RULES_AS_FILTERS: [RuleFilter<'static>; 17] = [
    +    const RECOMMENDED_RULES_AS_FILTERS: [RuleFilter<'static>; 18] = [
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[0]),
    -        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[1]),
    +        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[2]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[3]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[4]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[5]),
    @@ -1137,11 +1153,12 @@ impl Complexity {
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[12]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[13]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[14]),
    -        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[15]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[16]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[17]),
    +        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[18]),
    +        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[19]),
         ];
    -    const ALL_RULES_AS_FILTERS: [RuleFilter<'static>; 20] = [
    +    const ALL_RULES_AS_FILTERS: [RuleFilter<'static>; 22] = [
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[0]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[1]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[2]),
    @@ -1162,6 +1179,8 @@ impl Complexity {
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[17]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[18]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[19]),
    +        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[20]),
    +        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[21]),
         ];
         #[doc = r" Retrieves the recommended rules"]
         pub(crate) fn is_recommended(&self) -> bool {
    @@ -1183,102 +1202,112 @@ impl Complexity {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[0]));
                 }
             }
    -        if let Some(rule) = self.no_extra_boolean_cast.as_ref() {
    +        if let Some(rule) = self.no_excessive_cognitive_complexity.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[1]));
                 }
             }
    -        if let Some(rule) = self.no_for_each.as_ref() {
    +        if let Some(rule) = self.no_extra_boolean_cast.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[2]));
                 }
             }
    +        if let Some(rule) = self.no_for_each.as_ref() {
    +            if rule.is_enabled() {
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[3]));
    +            }
    +        }
             if let Some(rule) = self
                 .no_multiple_spaces_in_regular_expression_literals
                 .as_ref()
             {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[3]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[4]));
                 }
             }
             if let Some(rule) = self.no_static_only_class.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[4]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[5]));
                 }
             }
             if let Some(rule) = self.no_useless_catch.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[5]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[6]));
                 }
             }
             if let Some(rule) = self.no_useless_constructor.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[6]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[7]));
                 }
             }
             if let Some(rule) = self.no_useless_empty_export.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[7]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[8]));
                 }
             }
             if let Some(rule) = self.no_useless_fragments.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[8]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9]));
                 }
             }
             if let Some(rule) = self.no_useless_label.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[10]));
                 }
             }
             if let Some(rule) = self.no_useless_rename.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[10]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[11]));
                 }
             }
             if let Some(rule) = self.no_useless_switch_case.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[11]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[12]));
                 }
             }
             if let Some(rule) = self.no_useless_this_alias.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[12]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[13]));
                 }
             }
             if let Some(rule) = self.no_useless_type_constraint.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[13]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[14]));
    +            }
    +        }
    +        if let Some(rule) = self.no_void.as_ref() {
    +            if rule.is_enabled() {
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[15]));
                 }
             }
             if let Some(rule) = self.no_with.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[14]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[16]));
                 }
             }
             if let Some(rule) = self.use_flat_map.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[15]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[17]));
                 }
             }
             if let Some(rule) = self.use_literal_keys.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[16]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[18]));
                 }
             }
             if let Some(rule) = self.use_optional_chain.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[17]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[19]));
                 }
             }
             if let Some(rule) = self.use_simple_number_keys.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[18]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[20]));
                 }
             }
             if let Some(rule) = self.use_simplified_logic_expression.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[19]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[21]));
                 }
             }
             index_set
    @@ -1290,102 +1319,112 @@ impl Complexity {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[0]));
                 }
             }
    -        if let Some(rule) = self.no_extra_boolean_cast.as_ref() {
    +        if let Some(rule) = self.no_excessive_cognitive_complexity.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[1]));
                 }
             }
    -        if let Some(rule) = self.no_for_each.as_ref() {
    +        if let Some(rule) = self.no_extra_boolean_cast.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[2]));
                 }
             }
    +        if let Some(rule) = self.no_for_each.as_ref() {
    +            if rule.is_disabled() {
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[3]));
    +            }
    +        }
             if let Some(rule) = self
                 .no_multiple_spaces_in_regular_expression_literals
                 .as_ref()
             {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[3]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[4]));
                 }
             }
             if let Some(rule) = self.no_static_only_class.as_ref() {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[4]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[5]));
                 }
             }
             if let Some(rule) = self.no_useless_catch.as_ref() {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[5]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[6]));
                 }
             }
             if let Some(rule) = self.no_useless_constructor.as_ref() {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[6]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[7]));
                 }
             }
             if let Some(rule) = self.no_useless_empty_export.as_ref() {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[7]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[8]));
                 }
             }
             if let Some(rule) = self.no_useless_fragments.as_ref() {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[8]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9]));
                 }
             }
             if let Some(rule) = self.no_useless_label.as_ref() {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[10]));
                 }
             }
             if let Some(rule) = self.no_useless_rename.as_ref() {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[10]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[11]));
                 }
             }
             if let Some(rule) = self.no_useless_switch_case.as_ref() {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[11]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[12]));
                 }
             }
             if let Some(rule) = self.no_useless_this_alias.as_ref() {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[12]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[13]));
                 }
             }
             if let Some(rule) = self.no_useless_type_constraint.as_ref() {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[13]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[14]));
    +            }
    +        }
    +        if let Some(rule) = self.no_void.as_ref() {
    +            if rule.is_disabled() {
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[15]));
                 }
             }
             if let Some(rule) = self.no_with.as_ref() {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[14]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[16]));
                 }
             }
             if let Some(rule) = self.use_flat_map.as_ref() {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[15]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[17]));
                 }
             }
             if let Some(rule) = self.use_literal_keys.as_ref() {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[16]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[18]));
                 }
             }
             if let Some(rule) = self.use_optional_chain.as_ref() {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[17]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[19]));
                 }
             }
             if let Some(rule) = self.use_simple_number_keys.as_ref() {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[18]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[20]));
                 }
             }
             if let Some(rule) = self.use_simplified_logic_expression.as_ref() {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[19]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[21]));
                 }
             }
             index_set
    @@ -1398,10 +1437,10 @@ impl Complexity {
         pub(crate) fn is_recommended_rule(rule_name: &str) -> bool {
             Self::RECOMMENDED_RULES.contains(&rule_name)
         }
    -    pub(crate) fn recommended_rules_as_filters() -> [RuleFilter<'static>; 17] {
    +    pub(crate) fn recommended_rules_as_filters() -> [RuleFilter<'static>; 18] {
             Self::RECOMMENDED_RULES_AS_FILTERS
         }
    -    pub(crate) fn all_rules_as_filters() -> [RuleFilter<'static>; 20] {
    +    pub(crate) fn all_rules_as_filters() -> [RuleFilter<'static>; 22] {
             Self::ALL_RULES_AS_FILTERS
         }
         #[doc = r" Select preset rules"]
    @@ -1425,6 +1464,7 @@ impl Complexity {
         pub(crate) fn get_rule_configuration(&self, rule_name: &str) -> Option<&RuleConfiguration> {
             match rule_name {
                 "noBannedTypes" => self.no_banned_types.as_ref(),
    +            "noExcessiveCognitiveComplexity" => self.no_excessive_cognitive_complexity.as_ref(),
                 "noExtraBooleanCast" => self.no_extra_boolean_cast.as_ref(),
                 "noForEach" => self.no_for_each.as_ref(),
                 "noMultipleSpacesInRegularExpressionLiterals" => self
    @@ -1440,6 +1480,7 @@ impl Complexity {
                 "noUselessSwitchCase" => self.no_useless_switch_case.as_ref(),
                 "noUselessThisAlias" => self.no_useless_this_alias.as_ref(),
                 "noUselessTypeConstraint" => self.no_useless_type_constraint.as_ref(),
    +            "noVoid" => self.no_void.as_ref(),
                 "noWith" => self.no_with.as_ref(),
                 "useFlatMap" => self.use_flat_map.as_ref(),
                 "useLiteralKeys" => self.use_literal_keys.as_ref(),
    @@ -1617,6 +1658,19 @@ pub struct Correctness {
         #[bpaf(long("no-void-type-return"), argument("on|off|warn"), optional, hide)]
         #[serde(skip_serializing_if = "Option::is_none")]
         pub no_void_type_return: Option,
    +    #[doc = "Enforce all dependencies are correctly specified in a React hook."]
    +    #[bpaf(
    +        long("use-exhaustive-dependencies"),
    +        argument("on|off|warn"),
    +        optional,
    +        hide
    +    )]
    +    #[serde(skip_serializing_if = "Option::is_none")]
    +    pub use_exhaustive_dependencies: Option,
    +    #[doc = "Enforce that all React hooks are being called from the Top Level component functions."]
    +    #[bpaf(long("use-hook-at-top-level"), argument("on|off|warn"), optional, hide)]
    +    #[serde(skip_serializing_if = "Option::is_none")]
    +    pub use_hook_at_top_level: Option,
         #[doc = "Require calls to isNaN() when checking for NaN."]
         #[bpaf(long("use-is-nan"), argument("on|off|warn"), optional, hide)]
         #[serde(skip_serializing_if = "Option::is_none")]
    @@ -1637,7 +1691,7 @@ pub struct Correctness {
     }
     impl Correctness {
         const GROUP_NAME: &'static str = "correctness";
    -    pub(crate) const GROUP_RULES: [&'static str; 29] = [
    +    pub(crate) const GROUP_RULES: [&'static str; 31] = [
             "noChildrenProp",
             "noConstAssign",
             "noConstantCondition",
    @@ -1664,11 +1718,13 @@ impl Correctness {
             "noUnusedVariables",
             "noVoidElementsWithChildren",
             "noVoidTypeReturn",
    +        "useExhaustiveDependencies",
    +        "useHookAtTopLevel",
             "useIsNan",
             "useValidForDirection",
             "useYield",
         ];
    -    const RECOMMENDED_RULES: [&'static str; 27] = [
    +    const RECOMMENDED_RULES: [&'static str; 28] = [
             "noChildrenProp",
             "noConstAssign",
             "noConstantCondition",
    @@ -1693,11 +1749,12 @@ impl Correctness {
             "noUnusedLabels",
             "noVoidElementsWithChildren",
             "noVoidTypeReturn",
    +        "useExhaustiveDependencies",
             "useIsNan",
             "useValidForDirection",
             "useYield",
         ];
    -    const RECOMMENDED_RULES_AS_FILTERS: [RuleFilter<'static>; 27] = [
    +    const RECOMMENDED_RULES_AS_FILTERS: [RuleFilter<'static>; 28] = [
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[0]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[1]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[2]),
    @@ -1723,10 +1780,11 @@ impl Correctness {
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[24]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[25]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[26]),
    -        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[27]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[28]),
    +        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[29]),
    +        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[30]),
         ];
    -    const ALL_RULES_AS_FILTERS: [RuleFilter<'static>; 29] = [
    +    const ALL_RULES_AS_FILTERS: [RuleFilter<'static>; 31] = [
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[0]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[1]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[2]),
    @@ -1756,6 +1814,8 @@ impl Correctness {
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[26]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[27]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[28]),
    +        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[29]),
    +        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[30]),
         ];
         #[doc = r" Retrieves the recommended rules"]
         pub(crate) fn is_recommended(&self) -> bool {
    @@ -1902,21 +1962,31 @@ impl Correctness {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[25]));
                 }
             }
    -        if let Some(rule) = self.use_is_nan.as_ref() {
    +        if let Some(rule) = self.use_exhaustive_dependencies.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[26]));
                 }
             }
    -        if let Some(rule) = self.use_valid_for_direction.as_ref() {
    +        if let Some(rule) = self.use_hook_at_top_level.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[27]));
                 }
             }
    -        if let Some(rule) = self.use_yield.as_ref() {
    +        if let Some(rule) = self.use_is_nan.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[28]));
                 }
             }
    +        if let Some(rule) = self.use_valid_for_direction.as_ref() {
    +            if rule.is_enabled() {
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[29]));
    +            }
    +        }
    +        if let Some(rule) = self.use_yield.as_ref() {
    +            if rule.is_enabled() {
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[30]));
    +            }
    +        }
             index_set
         }
         pub(crate) fn get_disabled_rules(&self) -> IndexSet {
    @@ -2051,21 +2121,31 @@ impl Correctness {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[25]));
                 }
             }
    -        if let Some(rule) = self.use_is_nan.as_ref() {
    +        if let Some(rule) = self.use_exhaustive_dependencies.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[26]));
                 }
             }
    -        if let Some(rule) = self.use_valid_for_direction.as_ref() {
    +        if let Some(rule) = self.use_hook_at_top_level.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[27]));
                 }
             }
    -        if let Some(rule) = self.use_yield.as_ref() {
    +        if let Some(rule) = self.use_is_nan.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[28]));
                 }
             }
    +        if let Some(rule) = self.use_valid_for_direction.as_ref() {
    +            if rule.is_disabled() {
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[29]));
    +            }
    +        }
    +        if let Some(rule) = self.use_yield.as_ref() {
    +            if rule.is_disabled() {
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[30]));
    +            }
    +        }
             index_set
         }
         #[doc = r" Checks if, given a rule name, matches one of the rules contained in this category"]
    @@ -2076,10 +2156,10 @@ impl Correctness {
         pub(crate) fn is_recommended_rule(rule_name: &str) -> bool {
             Self::RECOMMENDED_RULES.contains(&rule_name)
         }
    -    pub(crate) fn recommended_rules_as_filters() -> [RuleFilter<'static>; 27] {
    +    pub(crate) fn recommended_rules_as_filters() -> [RuleFilter<'static>; 28] {
             Self::RECOMMENDED_RULES_AS_FILTERS
         }
    -    pub(crate) fn all_rules_as_filters() -> [RuleFilter<'static>; 29] {
    +    pub(crate) fn all_rules_as_filters() -> [RuleFilter<'static>; 31] {
             Self::ALL_RULES_AS_FILTERS
         }
         #[doc = r" Select preset rules"]
    @@ -2128,6 +2208,8 @@ impl Correctness {
                 "noUnusedVariables" => self.no_unused_variables.as_ref(),
                 "noVoidElementsWithChildren" => self.no_void_elements_with_children.as_ref(),
                 "noVoidTypeReturn" => self.no_void_type_return.as_ref(),
    +            "useExhaustiveDependencies" => self.use_exhaustive_dependencies.as_ref(),
    +            "useHookAtTopLevel" => self.use_hook_at_top_level.as_ref(),
                 "useIsNan" => self.use_is_nan.as_ref(),
                 "useValidForDirection" => self.use_valid_for_direction.as_ref(),
                 "useYield" => self.use_yield.as_ref(),
    @@ -2148,15 +2230,6 @@ pub struct Nursery {
         #[serde(skip_serializing_if = "Option::is_none")]
         #[bpaf(hide)]
         pub all: Option,
    -    #[doc = "Disallow the use of spread (...) syntax on accumulators."]
    -    #[bpaf(
    -        long("no-accumulating-spread"),
    -        argument("on|off|warn"),
    -        optional,
    -        hide
    -    )]
    -    #[serde(skip_serializing_if = "Option::is_none")]
    -    pub no_accumulating_spread: Option,
         #[doc = "Usually, the definition in the standard library is more precise than what people come up with or the used constant exceeds the maximum precision of the number type."]
         #[bpaf(
             long("no-approximative-numeric-constant"),
    @@ -2166,15 +2239,6 @@ pub struct Nursery {
         )]
         #[serde(skip_serializing_if = "Option::is_none")]
         pub no_approximative_numeric_constant: Option,
    -    #[doc = "Disallow void type outside of generic or return types."]
    -    #[bpaf(
    -        long("no-confusing-void-type"),
    -        argument("on|off|warn"),
    -        optional,
    -        hide
    -    )]
    -    #[serde(skip_serializing_if = "Option::is_none")]
    -    pub no_confusing_void_type: Option,
         #[doc = "Disallow two keys with the same name inside a JSON object."]
         #[bpaf(
             long("no-duplicate-json-keys"),
    @@ -2202,32 +2266,6 @@ pub struct Nursery {
         )]
         #[serde(skip_serializing_if = "Option::is_none")]
         pub no_empty_character_class_in_regex: Option,
    -    #[doc = "Disallow functions that exceed a given Cognitive Complexity score."]
    -    #[bpaf(
    -        long("no-excessive-complexity"),
    -        argument("on|off|warn"),
    -        optional,
    -        hide
    -    )]
    -    #[serde(skip_serializing_if = "Option::is_none")]
    -    pub no_excessive_complexity: Option,
    -    #[doc = "Disallow fallthrough of switch clauses."]
    -    #[bpaf(
    -        long("no-fallthrough-switch-clause"),
    -        argument("on|off|warn"),
    -        optional,
    -        hide
    -    )]
    -    #[serde(skip_serializing_if = "Option::is_none")]
    -    pub no_fallthrough_switch_clause: Option,
    -    #[doc = "Use Number.isFinite instead of global isFinite."]
    -    #[bpaf(long("no-global-is-finite"), argument("on|off|warn"), optional, hide)]
    -    #[serde(skip_serializing_if = "Option::is_none")]
    -    pub no_global_is_finite: Option,
    -    #[doc = "Use Number.isNaN instead of global isNaN."]
    -    #[bpaf(long("no-global-is-nan"), argument("on|off|warn"), optional, hide)]
    -    #[serde(skip_serializing_if = "Option::is_none")]
    -    pub no_global_is_nan: Option,
         #[doc = "Enforce that non-interactive ARIA roles are not assigned to interactive HTML elements."]
         #[bpaf(
             long("no-interactive-element-to-noninteractive-role"),
    @@ -2281,10 +2319,6 @@ pub struct Nursery {
         )]
         #[serde(skip_serializing_if = "Option::is_none")]
         pub no_useless_lone_block_statements: Option,
    -    #[doc = "Disallow the use of void operators, which is not a familiar operator."]
    -    #[bpaf(long("no-void"), argument("on|off|warn"), optional, hide)]
    -    #[serde(skip_serializing_if = "Option::is_none")]
    -    pub no_void: Option,
         #[doc = "Enforce that tabIndex is assigned to non-interactive HTML elements with aria-activedescendant."]
         #[bpaf(
             long("use-aria-activedescendant-with-tabindex"),
    @@ -2307,19 +2341,6 @@ pub struct Nursery {
         )]
         #[serde(skip_serializing_if = "Option::is_none")]
         pub use_as_const_assertion: Option,
    -    #[doc = "Enforce using else if instead of nested if in else clauses."]
    -    #[bpaf(long("use-collapsed-else-if"), argument("on|off|warn"), optional, hide)]
    -    #[serde(skip_serializing_if = "Option::is_none")]
    -    pub use_collapsed_else_if: Option,
    -    #[doc = "Enforce all dependencies are correctly specified in a React hook."]
    -    #[bpaf(
    -        long("use-exhaustive-dependencies"),
    -        argument("on|off|warn"),
    -        optional,
    -        hide
    -    )]
    -    #[serde(skip_serializing_if = "Option::is_none")]
    -    pub use_exhaustive_dependencies: Option,
         #[doc = "Enforce the use of import type when an import only has specifiers with type qualifier."]
         #[bpaf(
             long("use-grouped-type-import"),
    @@ -2329,10 +2350,6 @@ pub struct Nursery {
         )]
         #[serde(skip_serializing_if = "Option::is_none")]
         pub use_grouped_type_import: Option,
    -    #[doc = "Enforce that all React hooks are being called from the Top Level component functions."]
    -    #[bpaf(long("use-hook-at-top-level"), argument("on|off|warn"), optional, hide)]
    -    #[serde(skip_serializing_if = "Option::is_none")]
    -    pub use_hook_at_top_level: Option,
         #[doc = "Disallows package private imports."]
         #[bpaf(
             long("use-import-restrictions"),
    @@ -2342,10 +2359,6 @@ pub struct Nursery {
         )]
         #[serde(skip_serializing_if = "Option::is_none")]
         pub use_import_restrictions: Option,
    -    #[doc = "Use Array.isArray() instead of instanceof Array."]
    -    #[bpaf(long("use-is-array"), argument("on|off|warn"), optional, hide)]
    -    #[serde(skip_serializing_if = "Option::is_none")]
    -    pub use_is_array: Option,
         #[doc = "Require assignment operator shorthand where possible."]
         #[bpaf(long("use-shorthand-assign"), argument("on|off|warn"), optional, hide)]
         #[serde(skip_serializing_if = "Option::is_none")]
    @@ -2353,17 +2366,11 @@ pub struct Nursery {
     }
     impl Nursery {
         const GROUP_NAME: &'static str = "nursery";
    -    pub(crate) const GROUP_RULES: [&'static str; 28] = [
    -        "noAccumulatingSpread",
    +    pub(crate) const GROUP_RULES: [&'static str; 17] = [
             "noApproximativeNumericConstant",
    -        "noConfusingVoidType",
             "noDuplicateJsonKeys",
             "noEmptyBlockStatements",
             "noEmptyCharacterClassInRegex",
    -        "noExcessiveComplexity",
    -        "noFallthroughSwitchClause",
    -        "noGlobalIsFinite",
    -        "noGlobalIsNan",
             "noInteractiveElementToNoninteractiveRole",
             "noInvalidNewBuiltin",
             "noMisleadingInstantiator",
    @@ -2371,47 +2378,34 @@ impl Nursery {
             "noUnusedImports",
             "noUselessElse",
             "noUselessLoneBlockStatements",
    -        "noVoid",
             "useAriaActivedescendantWithTabindex",
             "useArrowFunction",
             "useAsConstAssertion",
    -        "useCollapsedElseIf",
    -        "useExhaustiveDependencies",
             "useGroupedTypeImport",
    -        "useHookAtTopLevel",
             "useImportRestrictions",
    -        "useIsArray",
             "useShorthandAssign",
         ];
    -    const RECOMMENDED_RULES: [&'static str; 12] = [
    +    const RECOMMENDED_RULES: [&'static str; 8] = [
             "noDuplicateJsonKeys",
             "noEmptyCharacterClassInRegex",
    -        "noGlobalIsFinite",
    -        "noGlobalIsNan",
             "noInvalidNewBuiltin",
             "noMisleadingInstantiator",
             "noUselessElse",
             "useArrowFunction",
             "useAsConstAssertion",
    -        "useExhaustiveDependencies",
             "useGroupedTypeImport",
    -        "useIsArray",
         ];
    -    const RECOMMENDED_RULES_AS_FILTERS: [RuleFilter<'static>; 12] = [
    +    const RECOMMENDED_RULES_AS_FILTERS: [RuleFilter<'static>; 8] = [
    +        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[1]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[3]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[5]),
    -        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[8]),
    +        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[6]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9]),
    -        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[11]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[12]),
    -        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[15]),
    -        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[19]),
    -        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[20]),
    -        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[22]),
    -        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[23]),
    -        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[26]),
    +        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[13]),
    +        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[14]),
         ];
    -    const ALL_RULES_AS_FILTERS: [RuleFilter<'static>; 28] = [
    +    const ALL_RULES_AS_FILTERS: [RuleFilter<'static>; 17] = [
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[0]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[1]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[2]),
    @@ -2429,17 +2423,6 @@ impl Nursery {
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[14]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[15]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[16]),
    -        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[17]),
    -        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[18]),
    -        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[19]),
    -        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[20]),
    -        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[21]),
    -        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[22]),
    -        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[23]),
    -        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[24]),
    -        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[25]),
    -        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[26]),
    -        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[27]),
         ];
         #[doc = r" Retrieves the recommended rules"]
         pub(crate) fn is_recommended(&self) -> bool {
    @@ -2456,288 +2439,178 @@ impl Nursery {
         }
         pub(crate) fn get_enabled_rules(&self) -> IndexSet {
             let mut index_set = IndexSet::new();
    -        if let Some(rule) = self.no_accumulating_spread.as_ref() {
    -            if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[0]));
    -            }
    -        }
             if let Some(rule) = self.no_approximative_numeric_constant.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[1]));
    -            }
    -        }
    -        if let Some(rule) = self.no_confusing_void_type.as_ref() {
    -            if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[2]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[0]));
                 }
             }
             if let Some(rule) = self.no_duplicate_json_keys.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[3]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[1]));
                 }
             }
             if let Some(rule) = self.no_empty_block_statements.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[4]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[2]));
                 }
             }
             if let Some(rule) = self.no_empty_character_class_in_regex.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[5]));
    -            }
    -        }
    -        if let Some(rule) = self.no_excessive_complexity.as_ref() {
    -            if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[6]));
    -            }
    -        }
    -        if let Some(rule) = self.no_fallthrough_switch_clause.as_ref() {
    -            if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[7]));
    -            }
    -        }
    -        if let Some(rule) = self.no_global_is_finite.as_ref() {
    -            if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[8]));
    -            }
    -        }
    -        if let Some(rule) = self.no_global_is_nan.as_ref() {
    -            if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[3]));
                 }
             }
             if let Some(rule) = self.no_interactive_element_to_noninteractive_role.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[10]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[4]));
                 }
             }
             if let Some(rule) = self.no_invalid_new_builtin.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[11]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[5]));
                 }
             }
             if let Some(rule) = self.no_misleading_instantiator.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[12]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[6]));
                 }
             }
             if let Some(rule) = self.no_misrefactored_shorthand_assign.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[13]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[7]));
                 }
             }
             if let Some(rule) = self.no_unused_imports.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[14]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[8]));
                 }
             }
             if let Some(rule) = self.no_useless_else.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[15]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9]));
                 }
             }
             if let Some(rule) = self.no_useless_lone_block_statements.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[16]));
    -            }
    -        }
    -        if let Some(rule) = self.no_void.as_ref() {
    -            if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[17]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[10]));
                 }
             }
             if let Some(rule) = self.use_aria_activedescendant_with_tabindex.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[18]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[11]));
                 }
             }
             if let Some(rule) = self.use_arrow_function.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[19]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[12]));
                 }
             }
             if let Some(rule) = self.use_as_const_assertion.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[20]));
    -            }
    -        }
    -        if let Some(rule) = self.use_collapsed_else_if.as_ref() {
    -            if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[21]));
    -            }
    -        }
    -        if let Some(rule) = self.use_exhaustive_dependencies.as_ref() {
    -            if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[22]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[13]));
                 }
             }
             if let Some(rule) = self.use_grouped_type_import.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[23]));
    -            }
    -        }
    -        if let Some(rule) = self.use_hook_at_top_level.as_ref() {
    -            if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[24]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[14]));
                 }
             }
             if let Some(rule) = self.use_import_restrictions.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[25]));
    -            }
    -        }
    -        if let Some(rule) = self.use_is_array.as_ref() {
    -            if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[26]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[15]));
                 }
             }
             if let Some(rule) = self.use_shorthand_assign.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[27]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[16]));
                 }
             }
             index_set
         }
         pub(crate) fn get_disabled_rules(&self) -> IndexSet {
             let mut index_set = IndexSet::new();
    -        if let Some(rule) = self.no_accumulating_spread.as_ref() {
    -            if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[0]));
    -            }
    -        }
             if let Some(rule) = self.no_approximative_numeric_constant.as_ref() {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[1]));
    -            }
    -        }
    -        if let Some(rule) = self.no_confusing_void_type.as_ref() {
    -            if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[2]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[0]));
                 }
             }
             if let Some(rule) = self.no_duplicate_json_keys.as_ref() {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[3]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[1]));
                 }
             }
             if let Some(rule) = self.no_empty_block_statements.as_ref() {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[4]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[2]));
                 }
             }
             if let Some(rule) = self.no_empty_character_class_in_regex.as_ref() {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[5]));
    -            }
    -        }
    -        if let Some(rule) = self.no_excessive_complexity.as_ref() {
    -            if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[6]));
    -            }
    -        }
    -        if let Some(rule) = self.no_fallthrough_switch_clause.as_ref() {
    -            if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[7]));
    -            }
    -        }
    -        if let Some(rule) = self.no_global_is_finite.as_ref() {
    -            if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[8]));
    -            }
    -        }
    -        if let Some(rule) = self.no_global_is_nan.as_ref() {
    -            if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[3]));
                 }
             }
             if let Some(rule) = self.no_interactive_element_to_noninteractive_role.as_ref() {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[10]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[4]));
                 }
             }
             if let Some(rule) = self.no_invalid_new_builtin.as_ref() {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[11]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[5]));
                 }
             }
             if let Some(rule) = self.no_misleading_instantiator.as_ref() {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[12]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[6]));
                 }
             }
             if let Some(rule) = self.no_misrefactored_shorthand_assign.as_ref() {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[13]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[7]));
                 }
             }
             if let Some(rule) = self.no_unused_imports.as_ref() {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[14]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[8]));
                 }
             }
             if let Some(rule) = self.no_useless_else.as_ref() {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[15]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9]));
                 }
             }
             if let Some(rule) = self.no_useless_lone_block_statements.as_ref() {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[16]));
    -            }
    -        }
    -        if let Some(rule) = self.no_void.as_ref() {
    -            if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[17]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[10]));
                 }
             }
             if let Some(rule) = self.use_aria_activedescendant_with_tabindex.as_ref() {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[18]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[11]));
                 }
             }
             if let Some(rule) = self.use_arrow_function.as_ref() {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[19]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[12]));
                 }
             }
             if let Some(rule) = self.use_as_const_assertion.as_ref() {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[20]));
    -            }
    -        }
    -        if let Some(rule) = self.use_collapsed_else_if.as_ref() {
    -            if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[21]));
    -            }
    -        }
    -        if let Some(rule) = self.use_exhaustive_dependencies.as_ref() {
    -            if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[22]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[13]));
                 }
             }
             if let Some(rule) = self.use_grouped_type_import.as_ref() {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[23]));
    -            }
    -        }
    -        if let Some(rule) = self.use_hook_at_top_level.as_ref() {
    -            if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[24]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[14]));
                 }
             }
             if let Some(rule) = self.use_import_restrictions.as_ref() {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[25]));
    -            }
    -        }
    -        if let Some(rule) = self.use_is_array.as_ref() {
    -            if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[26]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[15]));
                 }
             }
             if let Some(rule) = self.use_shorthand_assign.as_ref() {
                 if rule.is_disabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[27]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[16]));
                 }
             }
             index_set
    @@ -2750,10 +2623,10 @@ impl Nursery {
         pub(crate) fn is_recommended_rule(rule_name: &str) -> bool {
             Self::RECOMMENDED_RULES.contains(&rule_name)
         }
    -    pub(crate) fn recommended_rules_as_filters() -> [RuleFilter<'static>; 12] {
    +    pub(crate) fn recommended_rules_as_filters() -> [RuleFilter<'static>; 8] {
             Self::RECOMMENDED_RULES_AS_FILTERS
         }
    -    pub(crate) fn all_rules_as_filters() -> [RuleFilter<'static>; 28] {
    +    pub(crate) fn all_rules_as_filters() -> [RuleFilter<'static>; 17] {
             Self::ALL_RULES_AS_FILTERS
         }
         #[doc = r" Select preset rules"]
    @@ -2776,16 +2649,10 @@ impl Nursery {
         }
         pub(crate) fn get_rule_configuration(&self, rule_name: &str) -> Option<&RuleConfiguration> {
             match rule_name {
    -            "noAccumulatingSpread" => self.no_accumulating_spread.as_ref(),
                 "noApproximativeNumericConstant" => self.no_approximative_numeric_constant.as_ref(),
    -            "noConfusingVoidType" => self.no_confusing_void_type.as_ref(),
                 "noDuplicateJsonKeys" => self.no_duplicate_json_keys.as_ref(),
                 "noEmptyBlockStatements" => self.no_empty_block_statements.as_ref(),
                 "noEmptyCharacterClassInRegex" => self.no_empty_character_class_in_regex.as_ref(),
    -            "noExcessiveComplexity" => self.no_excessive_complexity.as_ref(),
    -            "noFallthroughSwitchClause" => self.no_fallthrough_switch_clause.as_ref(),
    -            "noGlobalIsFinite" => self.no_global_is_finite.as_ref(),
    -            "noGlobalIsNan" => self.no_global_is_nan.as_ref(),
                 "noInteractiveElementToNoninteractiveRole" => {
                     self.no_interactive_element_to_noninteractive_role.as_ref()
                 }
    @@ -2795,18 +2662,13 @@ impl Nursery {
                 "noUnusedImports" => self.no_unused_imports.as_ref(),
                 "noUselessElse" => self.no_useless_else.as_ref(),
                 "noUselessLoneBlockStatements" => self.no_useless_lone_block_statements.as_ref(),
    -            "noVoid" => self.no_void.as_ref(),
                 "useAriaActivedescendantWithTabindex" => {
                     self.use_aria_activedescendant_with_tabindex.as_ref()
                 }
                 "useArrowFunction" => self.use_arrow_function.as_ref(),
                 "useAsConstAssertion" => self.use_as_const_assertion.as_ref(),
    -            "useCollapsedElseIf" => self.use_collapsed_else_if.as_ref(),
    -            "useExhaustiveDependencies" => self.use_exhaustive_dependencies.as_ref(),
                 "useGroupedTypeImport" => self.use_grouped_type_import.as_ref(),
    -            "useHookAtTopLevel" => self.use_hook_at_top_level.as_ref(),
                 "useImportRestrictions" => self.use_import_restrictions.as_ref(),
    -            "useIsArray" => self.use_is_array.as_ref(),
                 "useShorthandAssign" => self.use_shorthand_assign.as_ref(),
                 _ => None,
             }
    @@ -2825,6 +2687,15 @@ pub struct Performance {
         #[serde(skip_serializing_if = "Option::is_none")]
         #[bpaf(hide)]
         pub all: Option,
    +    #[doc = "Disallow the use of spread (...) syntax on accumulators."]
    +    #[bpaf(
    +        long("no-accumulating-spread"),
    +        argument("on|off|warn"),
    +        optional,
    +        hide
    +    )]
    +    #[serde(skip_serializing_if = "Option::is_none")]
    +    pub no_accumulating_spread: Option,
         #[doc = "Disallow the use of the delete operator."]
         #[bpaf(long("no-delete"), argument("on|off|warn"), optional, hide)]
         #[serde(skip_serializing_if = "Option::is_none")]
    @@ -2832,12 +2703,16 @@ pub struct Performance {
     }
     impl Performance {
         const GROUP_NAME: &'static str = "performance";
    -    pub(crate) const GROUP_RULES: [&'static str; 1] = ["noDelete"];
    -    const RECOMMENDED_RULES: [&'static str; 1] = ["noDelete"];
    -    const RECOMMENDED_RULES_AS_FILTERS: [RuleFilter<'static>; 1] =
    -        [RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[0])];
    -    const ALL_RULES_AS_FILTERS: [RuleFilter<'static>; 1] =
    -        [RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[0])];
    +    pub(crate) const GROUP_RULES: [&'static str; 2] = ["noAccumulatingSpread", "noDelete"];
    +    const RECOMMENDED_RULES: [&'static str; 2] = ["noAccumulatingSpread", "noDelete"];
    +    const RECOMMENDED_RULES_AS_FILTERS: [RuleFilter<'static>; 2] = [
    +        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[0]),
    +        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[1]),
    +    ];
    +    const ALL_RULES_AS_FILTERS: [RuleFilter<'static>; 2] = [
    +        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[0]),
    +        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[1]),
    +    ];
         #[doc = r" Retrieves the recommended rules"]
         pub(crate) fn is_recommended(&self) -> bool {
             matches!(self.recommended, Some(true))
    @@ -2853,20 +2728,30 @@ impl Performance {
         }
         pub(crate) fn get_enabled_rules(&self) -> IndexSet {
             let mut index_set = IndexSet::new();
    -        if let Some(rule) = self.no_delete.as_ref() {
    +        if let Some(rule) = self.no_accumulating_spread.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[0]));
                 }
             }
    +        if let Some(rule) = self.no_delete.as_ref() {
    +            if rule.is_enabled() {
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[1]));
    +            }
    +        }
             index_set
         }
         pub(crate) fn get_disabled_rules(&self) -> IndexSet {
             let mut index_set = IndexSet::new();
    -        if let Some(rule) = self.no_delete.as_ref() {
    +        if let Some(rule) = self.no_accumulating_spread.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[0]));
                 }
             }
    +        if let Some(rule) = self.no_delete.as_ref() {
    +            if rule.is_disabled() {
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[1]));
    +            }
    +        }
             index_set
         }
         #[doc = r" Checks if, given a rule name, matches one of the rules contained in this category"]
    @@ -2877,10 +2762,10 @@ impl Performance {
         pub(crate) fn is_recommended_rule(rule_name: &str) -> bool {
             Self::RECOMMENDED_RULES.contains(&rule_name)
         }
    -    pub(crate) fn recommended_rules_as_filters() -> [RuleFilter<'static>; 1] {
    +    pub(crate) fn recommended_rules_as_filters() -> [RuleFilter<'static>; 2] {
             Self::RECOMMENDED_RULES_AS_FILTERS
         }
    -    pub(crate) fn all_rules_as_filters() -> [RuleFilter<'static>; 1] {
    +    pub(crate) fn all_rules_as_filters() -> [RuleFilter<'static>; 2] {
             Self::ALL_RULES_AS_FILTERS
         }
         #[doc = r" Select preset rules"]
    @@ -2903,6 +2788,7 @@ impl Performance {
         }
         pub(crate) fn get_rule_configuration(&self, rule_name: &str) -> Option<&RuleConfiguration> {
             match rule_name {
    +            "noAccumulatingSpread" => self.no_accumulating_spread.as_ref(),
                 "noDelete" => self.no_delete.as_ref(),
                 _ => None,
             }
    @@ -3120,6 +3006,10 @@ pub struct Style {
         #[bpaf(long("use-block-statements"), argument("on|off|warn"), optional, hide)]
         #[serde(skip_serializing_if = "Option::is_none")]
         pub use_block_statements: Option,
    +    #[doc = "Enforce using else if instead of nested if in else clauses."]
    +    #[bpaf(long("use-collapsed-else-if"), argument("on|off|warn"), optional, hide)]
    +    #[serde(skip_serializing_if = "Option::is_none")]
    +    pub use_collapsed_else_if: Option,
         #[doc = "Require const declarations for variables that are never reassigned after declared."]
         #[bpaf(long("use-const"), argument("on|off|warn"), optional, hide)]
         #[serde(skip_serializing_if = "Option::is_none")]
    @@ -3214,7 +3104,7 @@ pub struct Style {
     }
     impl Style {
         const GROUP_NAME: &'static str = "style";
    -    pub(crate) const GROUP_RULES: [&'static str; 28] = [
    +    pub(crate) const GROUP_RULES: [&'static str; 29] = [
             "noArguments",
             "noCommaOperator",
             "noImplicitBoolean",
    @@ -3229,6 +3119,7 @@ impl Style {
             "noUnusedTemplateLiteral",
             "noVar",
             "useBlockStatements",
    +        "useCollapsedElseIf",
             "useConst",
             "useDefaultParameterLast",
             "useEnumInitializers",
    @@ -3271,18 +3162,18 @@ impl Style {
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[7]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[11]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[12]),
    -        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[14]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[15]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[16]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[17]),
    -        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[19]),
    -        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[21]),
    +        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[18]),
    +        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[20]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[22]),
    -        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[25]),
    +        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[23]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[26]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[27]),
    +        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[28]),
         ];
    -    const ALL_RULES_AS_FILTERS: [RuleFilter<'static>; 28] = [
    +    const ALL_RULES_AS_FILTERS: [RuleFilter<'static>; 29] = [
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[0]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[1]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[2]),
    @@ -3311,6 +3202,7 @@ impl Style {
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[25]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[26]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[27]),
    +        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[28]),
         ];
         #[doc = r" Retrieves the recommended rules"]
         pub(crate) fn is_recommended(&self) -> bool {
    @@ -3397,74 +3289,79 @@ impl Style {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[13]));
                 }
             }
    -        if let Some(rule) = self.use_const.as_ref() {
    +        if let Some(rule) = self.use_collapsed_else_if.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[14]));
                 }
             }
    -        if let Some(rule) = self.use_default_parameter_last.as_ref() {
    +        if let Some(rule) = self.use_const.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[15]));
                 }
             }
    -        if let Some(rule) = self.use_enum_initializers.as_ref() {
    +        if let Some(rule) = self.use_default_parameter_last.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[16]));
                 }
             }
    +        if let Some(rule) = self.use_enum_initializers.as_ref() {
    +            if rule.is_enabled() {
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[17]));
    +            }
    +        }
             if let Some(rule) = self.use_exponentiation_operator.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[17]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[18]));
                 }
             }
             if let Some(rule) = self.use_fragment_syntax.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[18]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[19]));
                 }
             }
             if let Some(rule) = self.use_literal_enum_members.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[19]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[20]));
                 }
             }
             if let Some(rule) = self.use_naming_convention.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[20]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[21]));
                 }
             }
             if let Some(rule) = self.use_numeric_literals.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[21]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[22]));
                 }
             }
             if let Some(rule) = self.use_self_closing_elements.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[22]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[23]));
                 }
             }
             if let Some(rule) = self.use_shorthand_array_type.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[23]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[24]));
                 }
             }
             if let Some(rule) = self.use_single_case_statement.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[24]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[25]));
                 }
             }
             if let Some(rule) = self.use_single_var_declarator.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[25]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[26]));
                 }
             }
             if let Some(rule) = self.use_template.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[26]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[27]));
                 }
             }
             if let Some(rule) = self.use_while.as_ref() {
                 if rule.is_enabled() {
    -                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[27]));
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[28]));
                 }
             }
             index_set
    @@ -3541,76 +3438,81 @@ impl Style {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[13]));
                 }
             }
    -        if let Some(rule) = self.use_const.as_ref() {
    +        if let Some(rule) = self.use_collapsed_else_if.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[14]));
                 }
             }
    -        if let Some(rule) = self.use_default_parameter_last.as_ref() {
    +        if let Some(rule) = self.use_const.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[15]));
                 }
             }
    -        if let Some(rule) = self.use_enum_initializers.as_ref() {
    +        if let Some(rule) = self.use_default_parameter_last.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[16]));
                 }
             }
    -        if let Some(rule) = self.use_exponentiation_operator.as_ref() {
    +        if let Some(rule) = self.use_enum_initializers.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[17]));
                 }
             }
    -        if let Some(rule) = self.use_fragment_syntax.as_ref() {
    +        if let Some(rule) = self.use_exponentiation_operator.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[18]));
                 }
             }
    -        if let Some(rule) = self.use_literal_enum_members.as_ref() {
    +        if let Some(rule) = self.use_fragment_syntax.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[19]));
                 }
             }
    -        if let Some(rule) = self.use_naming_convention.as_ref() {
    +        if let Some(rule) = self.use_literal_enum_members.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[20]));
                 }
             }
    -        if let Some(rule) = self.use_numeric_literals.as_ref() {
    +        if let Some(rule) = self.use_naming_convention.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[21]));
                 }
             }
    -        if let Some(rule) = self.use_self_closing_elements.as_ref() {
    +        if let Some(rule) = self.use_numeric_literals.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[22]));
                 }
             }
    -        if let Some(rule) = self.use_shorthand_array_type.as_ref() {
    +        if let Some(rule) = self.use_self_closing_elements.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[23]));
                 }
             }
    -        if let Some(rule) = self.use_single_case_statement.as_ref() {
    +        if let Some(rule) = self.use_shorthand_array_type.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[24]));
                 }
             }
    -        if let Some(rule) = self.use_single_var_declarator.as_ref() {
    +        if let Some(rule) = self.use_single_case_statement.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[25]));
                 }
             }
    -        if let Some(rule) = self.use_template.as_ref() {
    +        if let Some(rule) = self.use_single_var_declarator.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[26]));
                 }
             }
    -        if let Some(rule) = self.use_while.as_ref() {
    +        if let Some(rule) = self.use_template.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[27]));
                 }
             }
    +        if let Some(rule) = self.use_while.as_ref() {
    +            if rule.is_disabled() {
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[28]));
    +            }
    +        }
             index_set
         }
         #[doc = r" Checks if, given a rule name, matches one of the rules contained in this category"]
    @@ -3624,7 +3526,7 @@ impl Style {
         pub(crate) fn recommended_rules_as_filters() -> [RuleFilter<'static>; 17] {
             Self::RECOMMENDED_RULES_AS_FILTERS
         }
    -    pub(crate) fn all_rules_as_filters() -> [RuleFilter<'static>; 28] {
    +    pub(crate) fn all_rules_as_filters() -> [RuleFilter<'static>; 29] {
             Self::ALL_RULES_AS_FILTERS
         }
         #[doc = r" Select preset rules"]
    @@ -3661,6 +3563,7 @@ impl Style {
                 "noUnusedTemplateLiteral" => self.no_unused_template_literal.as_ref(),
                 "noVar" => self.no_var.as_ref(),
                 "useBlockStatements" => self.use_block_statements.as_ref(),
    +            "useCollapsedElseIf" => self.use_collapsed_else_if.as_ref(),
                 "useConst" => self.use_const.as_ref(),
                 "useDefaultParameterLast" => self.use_default_parameter_last.as_ref(),
                 "useEnumInitializers" => self.use_enum_initializers.as_ref(),
    @@ -3734,6 +3637,15 @@ pub struct Suspicious {
         #[bpaf(long("no-confusing-labels"), argument("on|off|warn"), optional, hide)]
         #[serde(skip_serializing_if = "Option::is_none")]
         pub no_confusing_labels: Option,
    +    #[doc = "Disallow void type outside of generic or return types."]
    +    #[bpaf(
    +        long("no-confusing-void-type"),
    +        argument("on|off|warn"),
    +        optional,
    +        hide
    +    )]
    +    #[serde(skip_serializing_if = "Option::is_none")]
    +    pub no_confusing_void_type: Option,
         #[doc = "Disallow the use of console.log"]
         #[bpaf(long("no-console-log"), argument("on|off|warn"), optional, hide)]
         #[serde(skip_serializing_if = "Option::is_none")]
    @@ -3816,10 +3728,27 @@ pub struct Suspicious {
         )]
         #[serde(skip_serializing_if = "Option::is_none")]
         pub no_extra_non_null_assertion: Option,
    +    #[doc = "Disallow fallthrough of switch clauses."]
    +    #[bpaf(
    +        long("no-fallthrough-switch-clause"),
    +        argument("on|off|warn"),
    +        optional,
    +        hide
    +    )]
    +    #[serde(skip_serializing_if = "Option::is_none")]
    +    pub no_fallthrough_switch_clause: Option,
         #[doc = "Disallow reassigning function declarations."]
         #[bpaf(long("no-function-assign"), argument("on|off|warn"), optional, hide)]
         #[serde(skip_serializing_if = "Option::is_none")]
         pub no_function_assign: Option,
    +    #[doc = "Use Number.isFinite instead of global isFinite."]
    +    #[bpaf(long("no-global-is-finite"), argument("on|off|warn"), optional, hide)]
    +    #[serde(skip_serializing_if = "Option::is_none")]
    +    pub no_global_is_finite: Option,
    +    #[doc = "Use Number.isNaN instead of global isNaN."]
    +    #[bpaf(long("no-global-is-nan"), argument("on|off|warn"), optional, hide)]
    +    #[serde(skip_serializing_if = "Option::is_none")]
    +    pub no_global_is_nan: Option,
         #[doc = "Disallow assigning to imported bindings"]
         #[bpaf(long("no-import-assign"), argument("on|off|warn"), optional, hide)]
         #[serde(skip_serializing_if = "Option::is_none")]
    @@ -3888,6 +3817,10 @@ pub struct Suspicious {
         #[bpaf(long("use-getter-return"), argument("on|off|warn"), optional, hide)]
         #[serde(skip_serializing_if = "Option::is_none")]
         pub use_getter_return: Option,
    +    #[doc = "Use Array.isArray() instead of instanceof Array."]
    +    #[bpaf(long("use-is-array"), argument("on|off|warn"), optional, hide)]
    +    #[serde(skip_serializing_if = "Option::is_none")]
    +    pub use_is_array: Option,
         #[doc = "Require using the namespace keyword over the module keyword to declare TypeScript namespaces."]
         #[bpaf(long("use-namespace-keyword"), argument("on|off|warn"), optional, hide)]
         #[serde(skip_serializing_if = "Option::is_none")]
    @@ -3899,7 +3832,7 @@ pub struct Suspicious {
     }
     impl Suspicious {
         const GROUP_NAME: &'static str = "suspicious";
    -    pub(crate) const GROUP_RULES: [&'static str; 36] = [
    +    pub(crate) const GROUP_RULES: [&'static str; 41] = [
             "noArrayIndexKey",
             "noAssignInExpressions",
             "noAsyncPromiseExecutor",
    @@ -3908,6 +3841,7 @@ impl Suspicious {
             "noCommentText",
             "noCompareNegZero",
             "noConfusingLabels",
    +        "noConfusingVoidType",
             "noConsoleLog",
             "noConstEnum",
             "noControlCharactersInRegex",
    @@ -3921,7 +3855,10 @@ impl Suspicious {
             "noEmptyInterface",
             "noExplicitAny",
             "noExtraNonNullAssertion",
    +        "noFallthroughSwitchClause",
             "noFunctionAssign",
    +        "noGlobalIsFinite",
    +        "noGlobalIsNan",
             "noImportAssign",
             "noLabelVar",
             "noPrototypeBuiltins",
    @@ -3934,10 +3871,11 @@ impl Suspicious {
             "noUnsafeNegation",
             "useDefaultSwitchClauseLast",
             "useGetterReturn",
    +        "useIsArray",
             "useNamespaceKeyword",
             "useValidTypeof",
         ];
    -    const RECOMMENDED_RULES: [&'static str; 35] = [
    +    const RECOMMENDED_RULES: [&'static str; 40] = [
             "noArrayIndexKey",
             "noAssignInExpressions",
             "noAsyncPromiseExecutor",
    @@ -3946,6 +3884,7 @@ impl Suspicious {
             "noCommentText",
             "noCompareNegZero",
             "noConfusingLabels",
    +        "noConfusingVoidType",
             "noConstEnum",
             "noControlCharactersInRegex",
             "noDebugger",
    @@ -3958,7 +3897,10 @@ impl Suspicious {
             "noEmptyInterface",
             "noExplicitAny",
             "noExtraNonNullAssertion",
    +        "noFallthroughSwitchClause",
             "noFunctionAssign",
    +        "noGlobalIsFinite",
    +        "noGlobalIsNan",
             "noImportAssign",
             "noLabelVar",
             "noPrototypeBuiltins",
    @@ -3971,10 +3913,11 @@ impl Suspicious {
             "noUnsafeNegation",
             "useDefaultSwitchClauseLast",
             "useGetterReturn",
    +        "useIsArray",
             "useNamespaceKeyword",
             "useValidTypeof",
         ];
    -    const RECOMMENDED_RULES_AS_FILTERS: [RuleFilter<'static>; 35] = [
    +    const RECOMMENDED_RULES_AS_FILTERS: [RuleFilter<'static>; 40] = [
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[0]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[1]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[2]),
    @@ -3983,7 +3926,7 @@ impl Suspicious {
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[5]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[6]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[7]),
    -        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9]),
    +        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[8]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[10]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[11]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[12]),
    @@ -4010,8 +3953,13 @@ impl Suspicious {
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[33]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[34]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[35]),
    +        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[36]),
    +        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[37]),
    +        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[38]),
    +        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[39]),
    +        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[40]),
         ];
    -    const ALL_RULES_AS_FILTERS: [RuleFilter<'static>; 36] = [
    +    const ALL_RULES_AS_FILTERS: [RuleFilter<'static>; 41] = [
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[0]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[1]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[2]),
    @@ -4048,6 +3996,11 @@ impl Suspicious {
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[33]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[34]),
             RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[35]),
    +        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[36]),
    +        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[37]),
    +        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[38]),
    +        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[39]),
    +        RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[40]),
         ];
         #[doc = r" Retrieves the recommended rules"]
         pub(crate) fn is_recommended(&self) -> bool {
    @@ -4104,146 +4057,171 @@ impl Suspicious {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[7]));
                 }
             }
    -        if let Some(rule) = self.no_console_log.as_ref() {
    +        if let Some(rule) = self.no_confusing_void_type.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[8]));
                 }
             }
    -        if let Some(rule) = self.no_const_enum.as_ref() {
    +        if let Some(rule) = self.no_console_log.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9]));
                 }
             }
    -        if let Some(rule) = self.no_control_characters_in_regex.as_ref() {
    +        if let Some(rule) = self.no_const_enum.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[10]));
                 }
             }
    -        if let Some(rule) = self.no_debugger.as_ref() {
    +        if let Some(rule) = self.no_control_characters_in_regex.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[11]));
                 }
             }
    -        if let Some(rule) = self.no_double_equals.as_ref() {
    +        if let Some(rule) = self.no_debugger.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[12]));
                 }
             }
    -        if let Some(rule) = self.no_duplicate_case.as_ref() {
    +        if let Some(rule) = self.no_double_equals.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[13]));
                 }
             }
    -        if let Some(rule) = self.no_duplicate_class_members.as_ref() {
    +        if let Some(rule) = self.no_duplicate_case.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[14]));
                 }
             }
    -        if let Some(rule) = self.no_duplicate_jsx_props.as_ref() {
    +        if let Some(rule) = self.no_duplicate_class_members.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[15]));
                 }
             }
    -        if let Some(rule) = self.no_duplicate_object_keys.as_ref() {
    +        if let Some(rule) = self.no_duplicate_jsx_props.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[16]));
                 }
             }
    -        if let Some(rule) = self.no_duplicate_parameters.as_ref() {
    +        if let Some(rule) = self.no_duplicate_object_keys.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[17]));
                 }
             }
    -        if let Some(rule) = self.no_empty_interface.as_ref() {
    +        if let Some(rule) = self.no_duplicate_parameters.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[18]));
                 }
             }
    -        if let Some(rule) = self.no_explicit_any.as_ref() {
    +        if let Some(rule) = self.no_empty_interface.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[19]));
                 }
             }
    -        if let Some(rule) = self.no_extra_non_null_assertion.as_ref() {
    +        if let Some(rule) = self.no_explicit_any.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[20]));
                 }
             }
    -        if let Some(rule) = self.no_function_assign.as_ref() {
    +        if let Some(rule) = self.no_extra_non_null_assertion.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[21]));
                 }
             }
    -        if let Some(rule) = self.no_import_assign.as_ref() {
    +        if let Some(rule) = self.no_fallthrough_switch_clause.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[22]));
                 }
             }
    -        if let Some(rule) = self.no_label_var.as_ref() {
    +        if let Some(rule) = self.no_function_assign.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[23]));
                 }
             }
    -        if let Some(rule) = self.no_prototype_builtins.as_ref() {
    +        if let Some(rule) = self.no_global_is_finite.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[24]));
                 }
             }
    -        if let Some(rule) = self.no_redeclare.as_ref() {
    +        if let Some(rule) = self.no_global_is_nan.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[25]));
                 }
             }
    -        if let Some(rule) = self.no_redundant_use_strict.as_ref() {
    +        if let Some(rule) = self.no_import_assign.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[26]));
                 }
             }
    -        if let Some(rule) = self.no_self_compare.as_ref() {
    +        if let Some(rule) = self.no_label_var.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[27]));
                 }
             }
    -        if let Some(rule) = self.no_shadow_restricted_names.as_ref() {
    +        if let Some(rule) = self.no_prototype_builtins.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[28]));
                 }
             }
    -        if let Some(rule) = self.no_sparse_array.as_ref() {
    +        if let Some(rule) = self.no_redeclare.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[29]));
                 }
             }
    -        if let Some(rule) = self.no_unsafe_declaration_merging.as_ref() {
    +        if let Some(rule) = self.no_redundant_use_strict.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[30]));
                 }
             }
    -        if let Some(rule) = self.no_unsafe_negation.as_ref() {
    +        if let Some(rule) = self.no_self_compare.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[31]));
                 }
             }
    -        if let Some(rule) = self.use_default_switch_clause_last.as_ref() {
    +        if let Some(rule) = self.no_shadow_restricted_names.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[32]));
                 }
             }
    -        if let Some(rule) = self.use_getter_return.as_ref() {
    +        if let Some(rule) = self.no_sparse_array.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[33]));
                 }
             }
    -        if let Some(rule) = self.use_namespace_keyword.as_ref() {
    +        if let Some(rule) = self.no_unsafe_declaration_merging.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[34]));
                 }
             }
    -        if let Some(rule) = self.use_valid_typeof.as_ref() {
    +        if let Some(rule) = self.no_unsafe_negation.as_ref() {
                 if rule.is_enabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[35]));
                 }
             }
    +        if let Some(rule) = self.use_default_switch_clause_last.as_ref() {
    +            if rule.is_enabled() {
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[36]));
    +            }
    +        }
    +        if let Some(rule) = self.use_getter_return.as_ref() {
    +            if rule.is_enabled() {
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[37]));
    +            }
    +        }
    +        if let Some(rule) = self.use_is_array.as_ref() {
    +            if rule.is_enabled() {
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[38]));
    +            }
    +        }
    +        if let Some(rule) = self.use_namespace_keyword.as_ref() {
    +            if rule.is_enabled() {
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[39]));
    +            }
    +        }
    +        if let Some(rule) = self.use_valid_typeof.as_ref() {
    +            if rule.is_enabled() {
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[40]));
    +            }
    +        }
             index_set
         }
         pub(crate) fn get_disabled_rules(&self) -> IndexSet {
    @@ -4288,146 +4266,171 @@ impl Suspicious {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[7]));
                 }
             }
    -        if let Some(rule) = self.no_console_log.as_ref() {
    +        if let Some(rule) = self.no_confusing_void_type.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[8]));
                 }
             }
    -        if let Some(rule) = self.no_const_enum.as_ref() {
    +        if let Some(rule) = self.no_console_log.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9]));
                 }
             }
    -        if let Some(rule) = self.no_control_characters_in_regex.as_ref() {
    +        if let Some(rule) = self.no_const_enum.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[10]));
                 }
             }
    -        if let Some(rule) = self.no_debugger.as_ref() {
    +        if let Some(rule) = self.no_control_characters_in_regex.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[11]));
                 }
             }
    -        if let Some(rule) = self.no_double_equals.as_ref() {
    +        if let Some(rule) = self.no_debugger.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[12]));
                 }
             }
    -        if let Some(rule) = self.no_duplicate_case.as_ref() {
    +        if let Some(rule) = self.no_double_equals.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[13]));
                 }
             }
    -        if let Some(rule) = self.no_duplicate_class_members.as_ref() {
    +        if let Some(rule) = self.no_duplicate_case.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[14]));
                 }
             }
    -        if let Some(rule) = self.no_duplicate_jsx_props.as_ref() {
    +        if let Some(rule) = self.no_duplicate_class_members.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[15]));
                 }
             }
    -        if let Some(rule) = self.no_duplicate_object_keys.as_ref() {
    +        if let Some(rule) = self.no_duplicate_jsx_props.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[16]));
                 }
             }
    -        if let Some(rule) = self.no_duplicate_parameters.as_ref() {
    +        if let Some(rule) = self.no_duplicate_object_keys.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[17]));
                 }
             }
    -        if let Some(rule) = self.no_empty_interface.as_ref() {
    +        if let Some(rule) = self.no_duplicate_parameters.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[18]));
                 }
             }
    -        if let Some(rule) = self.no_explicit_any.as_ref() {
    +        if let Some(rule) = self.no_empty_interface.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[19]));
                 }
             }
    -        if let Some(rule) = self.no_extra_non_null_assertion.as_ref() {
    +        if let Some(rule) = self.no_explicit_any.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[20]));
                 }
             }
    -        if let Some(rule) = self.no_function_assign.as_ref() {
    +        if let Some(rule) = self.no_extra_non_null_assertion.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[21]));
                 }
             }
    -        if let Some(rule) = self.no_import_assign.as_ref() {
    +        if let Some(rule) = self.no_fallthrough_switch_clause.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[22]));
                 }
             }
    -        if let Some(rule) = self.no_label_var.as_ref() {
    +        if let Some(rule) = self.no_function_assign.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[23]));
                 }
             }
    -        if let Some(rule) = self.no_prototype_builtins.as_ref() {
    +        if let Some(rule) = self.no_global_is_finite.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[24]));
                 }
             }
    -        if let Some(rule) = self.no_redeclare.as_ref() {
    +        if let Some(rule) = self.no_global_is_nan.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[25]));
                 }
             }
    -        if let Some(rule) = self.no_redundant_use_strict.as_ref() {
    +        if let Some(rule) = self.no_import_assign.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[26]));
                 }
             }
    -        if let Some(rule) = self.no_self_compare.as_ref() {
    +        if let Some(rule) = self.no_label_var.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[27]));
                 }
             }
    -        if let Some(rule) = self.no_shadow_restricted_names.as_ref() {
    +        if let Some(rule) = self.no_prototype_builtins.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[28]));
                 }
             }
    -        if let Some(rule) = self.no_sparse_array.as_ref() {
    +        if let Some(rule) = self.no_redeclare.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[29]));
                 }
             }
    -        if let Some(rule) = self.no_unsafe_declaration_merging.as_ref() {
    +        if let Some(rule) = self.no_redundant_use_strict.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[30]));
                 }
             }
    -        if let Some(rule) = self.no_unsafe_negation.as_ref() {
    +        if let Some(rule) = self.no_self_compare.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[31]));
                 }
             }
    -        if let Some(rule) = self.use_default_switch_clause_last.as_ref() {
    +        if let Some(rule) = self.no_shadow_restricted_names.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[32]));
                 }
             }
    -        if let Some(rule) = self.use_getter_return.as_ref() {
    +        if let Some(rule) = self.no_sparse_array.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[33]));
                 }
             }
    -        if let Some(rule) = self.use_namespace_keyword.as_ref() {
    +        if let Some(rule) = self.no_unsafe_declaration_merging.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[34]));
                 }
             }
    -        if let Some(rule) = self.use_valid_typeof.as_ref() {
    +        if let Some(rule) = self.no_unsafe_negation.as_ref() {
                 if rule.is_disabled() {
                     index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[35]));
                 }
             }
    +        if let Some(rule) = self.use_default_switch_clause_last.as_ref() {
    +            if rule.is_disabled() {
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[36]));
    +            }
    +        }
    +        if let Some(rule) = self.use_getter_return.as_ref() {
    +            if rule.is_disabled() {
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[37]));
    +            }
    +        }
    +        if let Some(rule) = self.use_is_array.as_ref() {
    +            if rule.is_disabled() {
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[38]));
    +            }
    +        }
    +        if let Some(rule) = self.use_namespace_keyword.as_ref() {
    +            if rule.is_disabled() {
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[39]));
    +            }
    +        }
    +        if let Some(rule) = self.use_valid_typeof.as_ref() {
    +            if rule.is_disabled() {
    +                index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[40]));
    +            }
    +        }
             index_set
         }
         #[doc = r" Checks if, given a rule name, matches one of the rules contained in this category"]
    @@ -4438,10 +4441,10 @@ impl Suspicious {
         pub(crate) fn is_recommended_rule(rule_name: &str) -> bool {
             Self::RECOMMENDED_RULES.contains(&rule_name)
         }
    -    pub(crate) fn recommended_rules_as_filters() -> [RuleFilter<'static>; 35] {
    +    pub(crate) fn recommended_rules_as_filters() -> [RuleFilter<'static>; 40] {
             Self::RECOMMENDED_RULES_AS_FILTERS
         }
    -    pub(crate) fn all_rules_as_filters() -> [RuleFilter<'static>; 36] {
    +    pub(crate) fn all_rules_as_filters() -> [RuleFilter<'static>; 41] {
             Self::ALL_RULES_AS_FILTERS
         }
         #[doc = r" Select preset rules"]
    @@ -4472,6 +4475,7 @@ impl Suspicious {
                 "noCommentText" => self.no_comment_text.as_ref(),
                 "noCompareNegZero" => self.no_compare_neg_zero.as_ref(),
                 "noConfusingLabels" => self.no_confusing_labels.as_ref(),
    +            "noConfusingVoidType" => self.no_confusing_void_type.as_ref(),
                 "noConsoleLog" => self.no_console_log.as_ref(),
                 "noConstEnum" => self.no_const_enum.as_ref(),
                 "noControlCharactersInRegex" => self.no_control_characters_in_regex.as_ref(),
    @@ -4485,7 +4489,10 @@ impl Suspicious {
                 "noEmptyInterface" => self.no_empty_interface.as_ref(),
                 "noExplicitAny" => self.no_explicit_any.as_ref(),
                 "noExtraNonNullAssertion" => self.no_extra_non_null_assertion.as_ref(),
    +            "noFallthroughSwitchClause" => self.no_fallthrough_switch_clause.as_ref(),
                 "noFunctionAssign" => self.no_function_assign.as_ref(),
    +            "noGlobalIsFinite" => self.no_global_is_finite.as_ref(),
    +            "noGlobalIsNan" => self.no_global_is_nan.as_ref(),
                 "noImportAssign" => self.no_import_assign.as_ref(),
                 "noLabelVar" => self.no_label_var.as_ref(),
                 "noPrototypeBuiltins" => self.no_prototype_builtins.as_ref(),
    @@ -4498,6 +4505,7 @@ impl Suspicious {
                 "noUnsafeNegation" => self.no_unsafe_negation.as_ref(),
                 "useDefaultSwitchClauseLast" => self.use_default_switch_clause_last.as_ref(),
                 "useGetterReturn" => self.use_getter_return.as_ref(),
    +            "useIsArray" => self.use_is_array.as_ref(),
                 "useNamespaceKeyword" => self.use_namespace_keyword.as_ref(),
                 "useValidTypeof" => self.use_valid_typeof.as_ref(),
                 _ => None,
    diff --git a/crates/biome_service/tests/invalid/hooks_incorrect_options.json.snap b/crates/biome_service/tests/invalid/hooks_incorrect_options.json.snap
    index 6c4a1344b473..218e0d76d413 100644
    --- a/crates/biome_service/tests/invalid/hooks_incorrect_options.json.snap
    +++ b/crates/biome_service/tests/invalid/hooks_incorrect_options.json.snap
    @@ -19,8 +19,8 @@ hooks_incorrect_options.json:6:5 deserialize ━━━━━━━━━━━
       - all
       - noApproximativeNumericConstant
       - noDuplicateJsonKeys
    +  - noEmptyBlockStatements
       - noEmptyCharacterClassInRegex
    -  - noGlobalIsFinite
       - noInteractiveElementToNoninteractiveRole
       - noInvalidNewBuiltin
       - noMisleadingInstantiator
    diff --git a/crates/biome_service/tests/invalid/hooks_missing_name.json.snap b/crates/biome_service/tests/invalid/hooks_missing_name.json.snap
    index 72b18786271c..e6d6aa47a446 100644
    --- a/crates/biome_service/tests/invalid/hooks_missing_name.json.snap
    +++ b/crates/biome_service/tests/invalid/hooks_missing_name.json.snap
    @@ -19,8 +19,8 @@ hooks_missing_name.json:6:5 deserialize ━━━━━━━━━━━━━
       - all
       - noApproximativeNumericConstant
       - noDuplicateJsonKeys
    +  - noEmptyBlockStatements
       - noEmptyCharacterClassInRegex
    -  - noGlobalIsFinite
       - noInteractiveElementToNoninteractiveRole
       - noInvalidNewBuiltin
       - noMisleadingInstantiator
    diff --git a/editors/vscode/configuration_schema.json b/editors/vscode/configuration_schema.json
    index 69e9ddc706c5..83635b1d814a 100644
    --- a/editors/vscode/configuration_schema.json
    +++ b/editors/vscode/configuration_schema.json
    @@ -273,7 +273,7 @@
     						{ "type": "null" }
     					]
     				},
    -				"noExcessiveComplexity": {
    +				"noExcessiveCognitiveComplexity": {
     					"description": "Disallow functions that exceed a given Cognitive Complexity score.",
     					"anyOf": [
     						{ "$ref": "#/definitions/RuleConfiguration" },
    @@ -427,7 +427,7 @@
     			}
     		},
     		"ComplexityOptions": {
    -			"description": "Options for the rule `noNestedModuleImports`.",
    +			"description": "Options for the rule `noExcessiveCognitiveComplexity`.",
     			"type": "object",
     			"required": ["maxAllowedComplexity"],
     			"properties": {
    diff --git a/packages/@biomejs/backend-jsonrpc/src/workspace.ts b/packages/@biomejs/backend-jsonrpc/src/workspace.ts
    index 7c14646ede59..5f50a668e5d7 100644
    --- a/packages/@biomejs/backend-jsonrpc/src/workspace.ts
    +++ b/packages/@biomejs/backend-jsonrpc/src/workspace.ts
    @@ -466,7 +466,7 @@ export interface Complexity {
     	/**
     	 * Disallow functions that exceed a given Cognitive Complexity score.
     	 */
    -	noExcessiveComplexity?: RuleConfiguration;
    +	noExcessiveCognitiveComplexity?: RuleConfiguration;
     	/**
     	 * Disallow unnecessary boolean casts
     	 */
    @@ -1131,7 +1131,7 @@ export type PossibleOptions =
     	| RestrictedGlobalsOptions
     	| null;
     /**
    - * Options for the rule `noNestedModuleImports`.
    + * Options for the rule `noExcessiveCognitiveComplexity`.
      */
     export interface ComplexityOptions {
     	/**
    @@ -1299,7 +1299,7 @@ export type Category =
     	| "lint/a11y/useValidAriaValues"
     	| "lint/a11y/useValidLang"
     	| "lint/complexity/noBannedTypes"
    -	| "lint/complexity/noExcessiveComplexity"
    +	| "lint/complexity/noExcessiveCognitiveComplexity"
     	| "lint/complexity/noExtraBooleanCast"
     	| "lint/complexity/noForEach"
     	| "lint/complexity/noMultipleSpacesInRegularExpressionLiterals"
    diff --git a/packages/@biomejs/biome/configuration_schema.json b/packages/@biomejs/biome/configuration_schema.json
    index 69e9ddc706c5..83635b1d814a 100644
    --- a/packages/@biomejs/biome/configuration_schema.json
    +++ b/packages/@biomejs/biome/configuration_schema.json
    @@ -273,7 +273,7 @@
     						{ "type": "null" }
     					]
     				},
    -				"noExcessiveComplexity": {
    +				"noExcessiveCognitiveComplexity": {
     					"description": "Disallow functions that exceed a given Cognitive Complexity score.",
     					"anyOf": [
     						{ "$ref": "#/definitions/RuleConfiguration" },
    @@ -427,7 +427,7 @@
     			}
     		},
     		"ComplexityOptions": {
    -			"description": "Options for the rule `noNestedModuleImports`.",
    +			"description": "Options for the rule `noExcessiveCognitiveComplexity`.",
     			"type": "object",
     			"required": ["maxAllowedComplexity"],
     			"properties": {
    diff --git a/website/src/content/docs/internals/changelog.mdx b/website/src/content/docs/internals/changelog.mdx
    index 606f7a9d9f2d..5c5b0fcb0fee 100644
    --- a/website/src/content/docs/internals/changelog.mdx
    +++ b/website/src/content/docs/internals/changelog.mdx
    @@ -105,6 +105,28 @@ Read our [guidelines for writing a good changelog entry](https://github.com/biom
     ### JavaScript APIs
     ### Linter
     
    +#### Promoted rules
    +
    +- [complexity/noExcessiveCognitiveComplexity](https://biomejs.dev/linter/rules/no-excessive-cognitive-complexity)
    +- [complexity/noVoid](https://biomejs.dev/linter/rules/no-void)
    +- [correctness/useExhaustiveDependencies](https://biomejs.dev/linter/rules/use-exhaustive-dependencies)
    +- [correctness/useHookAtTopLevel](https://biomejs.dev/linter/rules/use-hook-at-top-level)
    +- [performance/noAccumulatingSpread](https://biomejs.dev/linter/rules/no-accumulating-spread)
    +- [style/useCollapsedElseIf](https://biomejs.dev/linter/rules/use-collapsed-else-if)
    +- [suspicious/noConfusingVoidType](https://biomejs.dev/linter/rules/no-confusing-void-type)
    +- [suspicious/noFallthroughSwitchClause](https://biomejs.dev/linter/rules/no-fallthrough-switch-clause)
    +- [suspicious/noGlobalIsFinite](https://biomejs.dev/linter/rules/no-global-is-finite)
    +- [suspicious/noGlobalIsNan](https://biomejs.dev/linter/rules/no-global-is-nan)
    +- [suspicious/useIsArray](https://biomejs.dev/linter/rules/use-is-array)
    +
    +The following rules are now recommended:
    +
    +- [noAccumulatingSpread](https://biomejs.dev/linter/rules/)
    +- [noConfusingVoidType](https://biomejs.dev/linter/rules/no-confusing-void-type)
    +- [noFallthroughSwitchClause](https://biomejs.dev/linter/rules/no-fallthrough-switch-clause)
    +- [noForEach](https://biomejs.dev/linter/rules/no-for-each)
    +
    +
     #### Bug fixes
     
     - Fix [#243](https://github.com/biomejs/biome/issues/243) a false positive case where the incorrect scope was defined for the `infer` type. in rule [noUndeclaredVariables](https://biomejs.dev/linter/rules/no-undeclared-variables/). Contributed by @denbezrukov
    @@ -180,6 +202,8 @@ Read our [guidelines for writing a good changelog entry](https://github.com/biom
     
     - [useValidAriaProps](https://biomejs.dev/linter/rules/use-valid-aria-props) now provides an unsafe code fix that removes invalid properties. Contributed by @vasucp1207
     
    +- `noExcessiveComplexity` was renamed to `noExcessiveCognitiveComplexity`
    +
     #### Bug fixes
     
     - Fix [#294](https://github.com/biomejs/biome/issues/294). [noConfusingVoidType](https://biomejs.dev/linter/rules/no-confusing-void-type/) no longer reports false positives for return types. Contributed by @b4s36t4
    @@ -868,9 +892,9 @@ New rules are promoted, please check [#4750](https://github.com/rome/tools/discu
     
     The following rules are now recommended:
     
    -- [noUselessFragments](https://biomejs.dev/linter/rules/no-useless-fragments/)
    +**- [noUselessFragments](https://biomejs.dev/linter/rules/no-useless-fragments/)
     - [noRedundantUseStrict](https://biomejs.dev/linter/rules/no-redundant-use-strict/)
    -- [useExponentiationOperator](https://biomejs.dev/linter/rules/use-exponentiation-operator/)
    +- [useExponentiationOperator](https://biomejs.dev/linter/rules/use-exponentiation-operator/)**
     
     #### Other changes
     
    diff --git a/website/src/content/docs/linter/rules/no-empty-block-statements.md b/website/src/content/docs/linter/rules/no-empty-block-statements.md
    index 8e67c4c2f7d1..2f9dc9d4d2ce 100644
    --- a/website/src/content/docs/linter/rules/no-empty-block-statements.md
    +++ b/website/src/content/docs/linter/rules/no-empty-block-statements.md
    @@ -1,5 +1,5 @@
     ---
    -title: noEmptyBlockStatements (since vnext)
    +title: noEmptyBlockStatements (since v1.3.0)
     ---
     
     **Diagnostic Category: `lint/nursery/noEmptyBlockStatements`**
    diff --git a/website/src/content/docs/linter/rules/no-for-each.md b/website/src/content/docs/linter/rules/no-for-each.md
    index 6dcc15bc8182..22c4941c8e43 100644
    --- a/website/src/content/docs/linter/rules/no-for-each.md
    +++ b/website/src/content/docs/linter/rules/no-for-each.md
    @@ -46,7 +46,7 @@ els.forEach(el => {
        ^^
         4 │ 
       
    -   forEach could lead to performance issue when working with large arrays. When combined with functions like .filter or .map, this causes multiple iterations over the same type.
    +   forEach could lead to performance issues when working with large arrays. When combined with functions like .filter or .map, this causes multiple iterations over the same type.
       
     
    @@ -67,7 +67,7 @@ els['forEach'](el => { ^^ 4 │ - forEach could lead to performance issue when working with large arrays. When combined with functions like .filter or .map, this causes multiple iterations over the same type. + forEach could lead to performance issues when working with large arrays. When combined with functions like .filter or .map, this causes multiple iterations over the same type.