From b322c0ff0660317f512d7739aa5f9093c63455c6 Mon Sep 17 00:00:00 2001 From: Victorien Elvinger Date: Mon, 1 May 2023 17:08:02 +0200 Subject: [PATCH] feat(rome_js_analyze): promote lint rules --- CHANGELOG.md | 45 + .../main_commands_check/nursery_unstable.snap | 3 +- .../incorrect_rule_name.snap | 9 + .../src/categories.rs | 164 +- crates/rome_js_analyze/src/analyzers/a11y.rs | 5 +- .../{nursery => a11y}/no_redundant_alt.rs | 0 .../{nursery => a11y}/no_svg_without_title.rs | 0 .../{nursery => a11y}/use_media_caption.rs | 0 .../src/analyzers/complexity.rs | 9 +- .../no_extra_semicolon.rs} | 6 +- .../no_useless_catch.rs | 0 .../no_useless_constructor.rs | 0 .../no_useless_label.rs} | 6 +- .../no_useless_rename.rs | 0 .../no_useless_switch_case.rs | 0 .../{nursery => complexity}/no_with.rs | 0 .../src/analyzers/correctness.rs | 9 +- .../no_inner_declarations.rs | 0 .../no_invalid_constructor_super.rs | 0 .../no_switch_declarations.rs | 0 .../no_unreachable_super.rs | 0 .../no_unsafe_optional_chaining.rs | 0 .../no_unused_labels.rs | 0 .../{nursery => correctness}/use_yield.rs | 0 .../rome_js_analyze/src/analyzers/nursery.rs | 31 +- .../analyzers/nursery/no_confusing_arrow.rs | 2 +- .../nursery/no_duplicate_jsx_props.rs | 2 +- .../src/analyzers/nursery/no_for_each.rs | 2 +- .../nursery/use_grouped_type_import.rs | 2 +- .../analyzers/nursery/use_heading_content.rs | 2 +- .../src/analyzers/nursery/use_is_nan.rs | 3 +- .../nursery/use_literal_enum_members.rs | 2 +- .../src/analyzers/nursery/use_literal_keys.rs | 2 +- crates/rome_js_analyze/src/analyzers/style.rs | 6 +- .../{nursery => style}/no_comma_operator.rs | 0 .../{nursery => style}/no_inferrable_types.rs | 0 .../{nursery => style}/no_namespace.rs | 2 +- .../no_parameter_properties.rs | 0 .../src/analyzers/suspicious.rs | 9 +- .../no_assign_in_expressions.rs | 0 .../no_confusing_labels.rs | 0 .../no_duplicate_case.rs | 0 .../no_duplicate_class_members.rs | 0 .../no_prototype_builtins.rs | 2 +- .../no_self_compare.rs | 3 +- .../use_namespace_keyword.rs | 2 +- crates/rome_js_analyze/src/aria_analyzers.rs | 3 +- .../src/aria_analyzers/a11y.rs | 8 + ...interactive_element_to_interactive_role.rs | 0 .../use_aria_props_for_role.rs | 0 .../{nursery => a11y}/use_valid_aria_props.rs | 0 .../{nursery => a11y}/use_valid_lang.rs | 0 .../src/aria_analyzers/nursery.rs | 6 +- .../nursery/no_aria_unsupported_elements.rs | 2 +- .../nursery/no_noninteractive_tabindex.rs | 2 +- .../nursery/no_redundant_roles.rs | 2 +- .../src/semantic_analyzers/a11y.rs | 3 +- .../{nursery => a11y}/use_iframe_title.rs | 0 .../src/semantic_analyzers/correctness.rs | 3 +- .../correctness}/no_global_object_calls.rs | 0 .../src/semantic_analyzers/nursery.rs | 7 +- .../nursery/no_accumulating_spread.rs | 2 +- .../nursery/no_console_log.rs | 2 +- .../nursery/no_constant_condition.rs | 2 +- .../src/semantic_analyzers/style.rs | 4 +- .../{nursery => style}/no_parameter_assign.rs | 0 .../no_restricted_globals.rs | 0 .../src/semantic_analyzers/suspicious.rs | 4 +- .../no_class_assign.rs | 0 .../{nursery => suspicious}/no_redeclare.rs | 0 .../invalid.jsx | 0 .../invalid.jsx.snap | 15 +- .../valid.jsx | 0 .../valid.jsx.snap | 0 .../noRedundantAlt/invalid.jsx | 0 .../noRedundantAlt/invalid.jsx.snap | 41 +- .../noRedundantAlt/valid.jsx | 0 .../noRedundantAlt/valid.jsx.snap | 0 .../noSvgWithoutTitle/invalid.jsx | 0 .../noSvgWithoutTitle/invalid.jsx.snap | 11 +- .../noSvgWithoutTitle/valid.jsx | 0 .../noSvgWithoutTitle/valid.jsx.snap | 0 .../useAriaPropsForRole/invalid.jsx | 0 .../useAriaPropsForRole/invalid.jsx.snap | 49 +- .../useAriaPropsForRole/valid.jsx | 0 .../useAriaPropsForRole/valid.jsx.snap | 0 .../useIframeTitle/invalid.jsx | 0 .../useIframeTitle/invalid.jsx.snap | 21 +- .../useIframeTitle/valid.jsx | 0 .../useIframeTitle/valid.jsx.snap | 0 .../useMediaCaption/invalid.jsx | 0 .../useMediaCaption/invalid.jsx.snap | 18 +- .../useMediaCaption/valid.jsx | 0 .../useMediaCaption/valid.jsx.snap | 0 .../useValidAriaProps/invalid.jsx | 0 .../useValidAriaProps/invalid.jsx.snap | 11 +- .../useValidAriaProps/valid.jsx | 0 .../useValidAriaProps/valid.jsx.snap | 0 .../useValidLang/invalid.jsx | 0 .../useValidLang/invalid.jsx.snap | 7 +- .../{nursery => a11y}/useValidLang/valid.jsx | 0 .../useValidLang/valid.jsx.snap | 0 .../noExtraSemicolon}/invalid.js | 0 .../noExtraSemicolon}/invalid.js.snap | 35 +- .../noExtraSemicolon}/valid.js | 0 .../noExtraSemicolon}/valid.js.snap | 0 .../noUselessCatch/invalid.js | 0 .../noUselessCatch/invalid.js.snap | 5 +- .../noUselessCatch/valid.js | 0 .../noUselessCatch/valid.js.snap | 0 .../noUselessConstructor/invalid.js | 0 .../noUselessConstructor/invalid.js.snap | 4 +- .../noUselessConstructor/invalid.jsonc | 0 .../noUselessConstructor/invalid.jsonc.snap | 14 +- .../noUselessConstructor/valid.jsonc | 0 .../noUselessConstructor/valid.jsonc.snap | 0 .../noUselessConstructor/valid.ts | 0 .../noUselessConstructor/valid.ts.snap | 0 .../noUselessLabel}/invalid.jsonc | 0 .../noUselessLabel}/invalid.jsonc.snap | 44 +- .../noUselessLabel}/valid.jsonc | 0 .../noUselessLabel}/valid.jsonc.snap | 0 .../noUselessRename/invalid.js | 0 .../noUselessRename/invalid.js.snap | 24 +- .../noUselessRename/valid.js | 0 .../noUselessRename/valid.js.snap | 0 .../noUselessSwitchCase/invalid.js | 0 .../noUselessSwitchCase/invalid.js.snap | 10 +- .../noUselessSwitchCase/valid.js | 0 .../noUselessSwitchCase/valid.js.snap | 0 .../noWith/invalid.cjs | 0 .../noWith/invalid.cjs.snap | 3 +- .../noWith/invalid.js.snap | 0 .../noWith/valid.js.snap | 0 .../noGlobalObjectCalls/invalid.js | 0 .../noGlobalObjectCalls/invalid.js.snap | 181 +- .../noGlobalObjectCalls/valid.js | 0 .../noGlobalObjectCalls/valid.js.snap | 0 .../noGlobalObjectCalls/valid_import.js | 0 .../noGlobalObjectCalls/valid_import.js.snap | 0 .../noInnerDeclarations/invalid-module.js | 0 .../invalid-module.js.snap | 6 +- .../noInnerDeclarations/invalid.jsonc | 0 .../noInnerDeclarations/invalid.jsonc.snap | 56 +- .../noInnerDeclarations/valid-module.js | 0 .../noInnerDeclarations/valid-module.js.snap | 0 .../noInnerDeclarations/valid.jsonc | 0 .../noInnerDeclarations/valid.jsonc.snap | 0 .../noInvalidConstructorSuper/invalid.js | 0 .../noInvalidConstructorSuper/invalid.js.snap | 25 +- .../noInvalidConstructorSuper/valid.js | 0 .../noInvalidConstructorSuper/valid.js.snap | 0 .../noSwitchDeclarations/invalid.jsonc | 0 .../noSwitchDeclarations/invalid.jsonc.snap | 18 +- .../noSwitchDeclarations/invalid.ts | 0 .../noSwitchDeclarations/invalid.ts.snap | 14 +- .../noSwitchDeclarations/valid.jsonc | 0 .../noSwitchDeclarations/valid.jsonc.snap | 0 .../noUnreachableSuper/duplicateSuper.js | 0 .../noUnreachableSuper/duplicateSuper.js.snap | 11 +- .../noUnreachableSuper/missingSuper.js | 0 .../noUnreachableSuper/missingSuper.js.snap | 7 +- .../noUnreachableSuper/thisBeforeSuper.js | 0 .../thisBeforeSuper.js.snap | 7 +- .../noUnsafeOptionalChaining/invalid.cjs | 0 .../noUnsafeOptionalChaining/invalid.cjs.snap | 3 +- .../noUnsafeOptionalChaining/invalid.js | 0 .../noUnsafeOptionalChaining/invalid.js.snap | 129 +- .../noUnsafeOptionalChaining/valid.js | 0 .../noUnsafeOptionalChaining/valid.js.snap | 0 .../validArithmetic.js | 0 .../validArithmetic.js.snap | 0 .../noUnusedLabels/invalid.js | 0 .../noUnusedLabels/invalid.js.snap | 28 +- .../noUnusedLabels/valid.js | 0 .../noUnusedLabels/valid.js.snap | 0 .../useYield/invalid.js | 0 .../useYield/invalid.js.snap | 19 +- .../useYield/valid.js | 0 .../useYield/valid.js.snap | 0 .../nursery/noSelfAssign/invalid.js.snap | 2 +- .../noCommaOperator/invalid.jsonc | 0 .../noCommaOperator/invalid.jsonc.snap | 44 +- .../noCommaOperator/valid.jsonc | 0 .../noCommaOperator/valid.jsonc.snap | 0 .../noInferrableTypes/invalid.ts | 0 .../noInferrableTypes/invalid.ts.snap | 76 +- .../noInferrableTypes/valid.ts | 0 .../noInferrableTypes/valid.ts.snap | 0 .../{nursery => style}/noNamespace/invalid.ts | 0 .../noNamespace/invalid.ts.snap | 9 +- .../{nursery => style}/noNamespace/valid.ts | 0 .../noNamespace/valid.ts.snap | 0 .../noParameterAssign/invalid.jsonc | 0 .../noParameterAssign/invalid.jsonc.snap | 40 +- .../noParameterAssign/valid.jsonc | 0 .../noParameterAssign/valid.jsonc.snap | 0 .../noParameterProperties/invalid.ts | 0 .../noParameterProperties/invalid.ts.snap | 16 +- .../noParameterProperties/valid.ts | 0 .../noParameterProperties/valid.ts.snap | 0 .../noRestrictedGlobals/invalid.jsonc | 0 .../noRestrictedGlobals/invalid.jsonc.snap | 5 +- .../noRestrictedGlobals/valid.js | 0 .../noRestrictedGlobals/valid.js.snap | 0 .../noAssignInExpressions/invalid.js | 0 .../noAssignInExpressions/invalid.js.snap | 54 +- .../noAssignInExpressions/valid.js | 0 .../noAssignInExpressions/valid.js.snap | 0 .../noClassAssign/invalid.js | 0 .../noClassAssign/invalid.js.snap | 17 +- .../noClassAssign/valid.js | 0 .../noClassAssign/valid.js.snap | 0 .../noConfusingLabels/invalid.jsonc | 0 .../noConfusingLabels/invalid.jsonc.snap | 22 +- .../noConfusingLabels/valid.jsonc | 0 .../noConfusingLabels/valid.jsonc.snap | 0 .../noDuplicateCase/invalid.js | 0 .../noDuplicateCase/invalid.js.snap | 39 +- .../noDuplicateCase/valid.js | 0 .../noDuplicateCase/valid.js.snap | 0 .../noDuplicateClassMembers/invalid.js | 0 .../noDuplicateClassMembers/invalid.js.snap | 37 +- .../noDuplicateClassMembers/valid.js | 0 .../noDuplicateClassMembers/valid.js.snap | 0 .../noPrototypeBuiltins/invalid.js | 0 .../noPrototypeBuiltins/invalid.js.snap | 23 +- .../noPrototypeBuiltins/valid.js | 0 .../noPrototypeBuiltins/valid.js.snap | 0 .../invalid-declaration-merging.ts | 0 .../invalid-declaration-merging.ts.snap | 7 +- .../noRedeclare/invalid.jsonc | 0 .../noRedeclare/invalid.jsonc.snap | 49 +- .../noRedeclare/invalid.ts | 0 .../noRedeclare/invalid.ts.snap | 3 +- .../noRedeclare/valid-declaration-merging.ts | 0 .../valid-declaration-merging.ts.snap | 0 .../noRedeclare/valid-duplicate.ts | 0 .../noRedeclare/valid-duplicate.ts.snap | 0 .../noRedeclare/valid.jsonc | 0 .../noRedeclare/valid.jsonc.snap | 0 .../noSelfCompare/invalid.jsonc | 0 .../noSelfCompare/invalid.jsonc.snap | 33 +- .../noSelfCompare/valid.jsonc | 0 .../noSelfCompare/valid.jsonc.snap | 0 .../useNamespaceKeyword/invalid.ts | 0 .../useNamespaceKeyword/invalid.ts.snap | 10 +- .../useNamespaceKeyword/valid.ts | 0 .../useNamespaceKeyword/valid.ts.snap | 0 .../src/configuration/linter/rules.rs | 1976 +++++++++-------- .../src/configuration/parse/json/rules.rs | 1372 ++++++------ editors/vscode/configuration_schema.json | 686 +++--- npm/backend-jsonrpc/src/workspace.ts | 455 ++-- npm/rome/configuration_schema.json | 686 +++--- website/src/pages/lint/rules/index.mdx | 501 +++-- .../pages/lint/rules/noAccumulatingSpread.md | 2 +- .../lint/rules/noAriaUnsupportedElements.md | 2 +- .../pages/lint/rules/noAssignInExpressions.md | 8 +- website/src/pages/lint/rules/noClassAssign.md | 10 +- .../src/pages/lint/rules/noCommaOperator.md | 8 +- .../src/pages/lint/rules/noConfusingArrow.md | 2 +- .../src/pages/lint/rules/noConfusingLabels.md | 10 +- website/src/pages/lint/rules/noConsoleLog.md | 2 +- .../pages/lint/rules/noConstantCondition.md | 2 +- .../src/pages/lint/rules/noDuplicateCase.md | 8 +- .../lint/rules/noDuplicateClassMembers.md | 10 +- .../pages/lint/rules/noDuplicateJsxProps.md | 2 +- ...ExtraSemicolons.md => noExtraSemicolon.md} | 20 +- website/src/pages/lint/rules/noForEach.md | 2 +- .../pages/lint/rules/noGlobalObjectCalls.md | 22 +- .../src/pages/lint/rules/noInferrableTypes.md | 12 +- .../pages/lint/rules/noInnerDeclarations.md | 10 +- .../lint/rules/noInvalidConstructorSuper.md | 6 +- website/src/pages/lint/rules/noNamespace.md | 16 +- ...oNoninteractiveElementToInteractiveRole.md | 4 +- .../lint/rules/noNoninteractiveTabindex.md | 2 +- .../src/pages/lint/rules/noParameterAssign.md | 10 +- .../pages/lint/rules/noParameterProperties.md | 2 +- .../pages/lint/rules/noPrototypeBuiltins.md | 14 +- website/src/pages/lint/rules/noRedeclare.md | 12 +- .../src/pages/lint/rules/noRedundantAlt.md | 8 +- .../src/pages/lint/rules/noRedundantRoles.md | 2 +- .../pages/lint/rules/noRestrictedGlobals.md | 2 +- website/src/pages/lint/rules/noSelfCompare.md | 9 +- .../src/pages/lint/rules/noSvgWithoutTitle.md | 6 +- .../pages/lint/rules/noSwitchDeclarations.md | 8 +- .../pages/lint/rules/noUnreachableSuper.md | 8 +- .../lint/rules/noUnsafeOptionalChaining.md | 16 +- .../src/pages/lint/rules/noUnusedLabels.md | 4 +- .../src/pages/lint/rules/noUselessCatch.md | 6 +- .../pages/lint/rules/noUselessConstructor.md | 8 +- .../{noExtraLabels.md => noUselessLabel.md} | 8 +- .../src/pages/lint/rules/noUselessRename.md | 8 +- .../pages/lint/rules/noUselessSwitchCase.md | 6 +- website/src/pages/lint/rules/noWith.md | 4 +- .../pages/lint/rules/useAriaPropsForRole.md | 6 +- .../pages/lint/rules/useGroupedTypeImport.md | 2 +- .../src/pages/lint/rules/useHeadingContent.md | 2 +- .../src/pages/lint/rules/useIframeTitle.md | 20 +- website/src/pages/lint/rules/useIsNan.md | 3 +- .../pages/lint/rules/useLiteralEnumMembers.md | 2 +- .../src/pages/lint/rules/useLiteralKeys.md | 2 +- .../src/pages/lint/rules/useMediaCaption.md | 6 +- .../pages/lint/rules/useNamespaceKeyword.md | 6 +- .../src/pages/lint/rules/useValidAriaProps.md | 6 +- website/src/pages/lint/rules/useValidLang.md | 8 +- website/src/pages/lint/rules/useYield.md | 4 +- website/src/playground/components/Tabs.tsx | 2 +- 308 files changed, 3957 insertions(+), 3769 deletions(-) rename crates/rome_js_analyze/src/analyzers/{nursery => a11y}/no_redundant_alt.rs (100%) rename crates/rome_js_analyze/src/analyzers/{nursery => a11y}/no_svg_without_title.rs (100%) rename crates/rome_js_analyze/src/analyzers/{nursery => a11y}/use_media_caption.rs (100%) rename crates/rome_js_analyze/src/analyzers/{nursery/no_extra_semicolons.rs => complexity/no_extra_semicolon.rs} (97%) rename crates/rome_js_analyze/src/analyzers/{nursery => complexity}/no_useless_catch.rs (100%) rename crates/rome_js_analyze/src/analyzers/{nursery => complexity}/no_useless_constructor.rs (100%) rename crates/rome_js_analyze/src/analyzers/{nursery/no_extra_labels.rs => complexity/no_useless_label.rs} (98%) rename crates/rome_js_analyze/src/analyzers/{nursery => complexity}/no_useless_rename.rs (100%) rename crates/rome_js_analyze/src/analyzers/{nursery => complexity}/no_useless_switch_case.rs (100%) rename crates/rome_js_analyze/src/analyzers/{nursery => complexity}/no_with.rs (100%) rename crates/rome_js_analyze/src/analyzers/{nursery => correctness}/no_inner_declarations.rs (100%) rename crates/rome_js_analyze/src/analyzers/{nursery => correctness}/no_invalid_constructor_super.rs (100%) rename crates/rome_js_analyze/src/analyzers/{nursery => correctness}/no_switch_declarations.rs (100%) rename crates/rome_js_analyze/src/analyzers/{nursery => correctness}/no_unreachable_super.rs (100%) rename crates/rome_js_analyze/src/analyzers/{nursery => correctness}/no_unsafe_optional_chaining.rs (100%) rename crates/rome_js_analyze/src/analyzers/{nursery => correctness}/no_unused_labels.rs (100%) rename crates/rome_js_analyze/src/analyzers/{nursery => correctness}/use_yield.rs (100%) rename crates/rome_js_analyze/src/analyzers/{nursery => style}/no_comma_operator.rs (100%) rename crates/rome_js_analyze/src/analyzers/{nursery => style}/no_inferrable_types.rs (100%) rename crates/rome_js_analyze/src/analyzers/{nursery => style}/no_namespace.rs (98%) rename crates/rome_js_analyze/src/analyzers/{nursery => style}/no_parameter_properties.rs (100%) rename crates/rome_js_analyze/src/analyzers/{nursery => suspicious}/no_assign_in_expressions.rs (100%) rename crates/rome_js_analyze/src/analyzers/{nursery => suspicious}/no_confusing_labels.rs (100%) rename crates/rome_js_analyze/src/analyzers/{nursery => suspicious}/no_duplicate_case.rs (100%) rename crates/rome_js_analyze/src/analyzers/{nursery => suspicious}/no_duplicate_class_members.rs (100%) rename crates/rome_js_analyze/src/analyzers/{nursery => suspicious}/no_prototype_builtins.rs (99%) rename crates/rome_js_analyze/src/analyzers/{nursery => suspicious}/no_self_compare.rs (83%) rename crates/rome_js_analyze/src/analyzers/{nursery => suspicious}/use_namespace_keyword.rs (99%) create mode 100644 crates/rome_js_analyze/src/aria_analyzers/a11y.rs rename crates/rome_js_analyze/src/aria_analyzers/{nursery => a11y}/no_noninteractive_element_to_interactive_role.rs (100%) rename crates/rome_js_analyze/src/aria_analyzers/{nursery => a11y}/use_aria_props_for_role.rs (100%) rename crates/rome_js_analyze/src/aria_analyzers/{nursery => a11y}/use_valid_aria_props.rs (100%) rename crates/rome_js_analyze/src/aria_analyzers/{nursery => a11y}/use_valid_lang.rs (100%) rename crates/rome_js_analyze/src/semantic_analyzers/{nursery => a11y}/use_iframe_title.rs (100%) rename crates/rome_js_analyze/src/{analyzers/nursery => semantic_analyzers/correctness}/no_global_object_calls.rs (100%) rename crates/rome_js_analyze/src/semantic_analyzers/{nursery => style}/no_parameter_assign.rs (100%) rename crates/rome_js_analyze/src/semantic_analyzers/{nursery => style}/no_restricted_globals.rs (100%) rename crates/rome_js_analyze/src/semantic_analyzers/{nursery => suspicious}/no_class_assign.rs (100%) rename crates/rome_js_analyze/src/semantic_analyzers/{nursery => suspicious}/no_redeclare.rs (100%) rename crates/rome_js_analyze/tests/specs/{nursery => a11y}/noNoninteractiveElementToInteractiveRole/invalid.jsx (100%) rename crates/rome_js_analyze/tests/specs/{nursery => a11y}/noNoninteractiveElementToInteractiveRole/invalid.jsx.snap (72%) rename crates/rome_js_analyze/tests/specs/{nursery => a11y}/noNoninteractiveElementToInteractiveRole/valid.jsx (100%) rename crates/rome_js_analyze/tests/specs/{nursery => a11y}/noNoninteractiveElementToInteractiveRole/valid.jsx.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => a11y}/noRedundantAlt/invalid.jsx (100%) rename crates/rome_js_analyze/tests/specs/{nursery => a11y}/noRedundantAlt/invalid.jsx.snap (89%) rename crates/rome_js_analyze/tests/specs/{nursery => a11y}/noRedundantAlt/valid.jsx (100%) rename crates/rome_js_analyze/tests/specs/{nursery => a11y}/noRedundantAlt/valid.jsx.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => a11y}/noSvgWithoutTitle/invalid.jsx (100%) rename crates/rome_js_analyze/tests/specs/{nursery => a11y}/noSvgWithoutTitle/invalid.jsx.snap (88%) rename crates/rome_js_analyze/tests/specs/{nursery => a11y}/noSvgWithoutTitle/valid.jsx (100%) rename crates/rome_js_analyze/tests/specs/{nursery => a11y}/noSvgWithoutTitle/valid.jsx.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => a11y}/useAriaPropsForRole/invalid.jsx (100%) rename crates/rome_js_analyze/tests/specs/{nursery => a11y}/useAriaPropsForRole/invalid.jsx.snap (90%) rename crates/rome_js_analyze/tests/specs/{nursery => a11y}/useAriaPropsForRole/valid.jsx (100%) rename crates/rome_js_analyze/tests/specs/{nursery => a11y}/useAriaPropsForRole/valid.jsx.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => a11y}/useIframeTitle/invalid.jsx (100%) rename crates/rome_js_analyze/tests/specs/{nursery => a11y}/useIframeTitle/invalid.jsx.snap (85%) rename crates/rome_js_analyze/tests/specs/{nursery => a11y}/useIframeTitle/valid.jsx (100%) rename crates/rome_js_analyze/tests/specs/{nursery => a11y}/useIframeTitle/valid.jsx.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => a11y}/useMediaCaption/invalid.jsx (100%) rename crates/rome_js_analyze/tests/specs/{nursery => a11y}/useMediaCaption/invalid.jsx.snap (87%) rename crates/rome_js_analyze/tests/specs/{nursery => a11y}/useMediaCaption/valid.jsx (100%) rename crates/rome_js_analyze/tests/specs/{nursery => a11y}/useMediaCaption/valid.jsx.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => a11y}/useValidAriaProps/invalid.jsx (100%) rename crates/rome_js_analyze/tests/specs/{nursery => a11y}/useValidAriaProps/invalid.jsx.snap (91%) rename crates/rome_js_analyze/tests/specs/{nursery => a11y}/useValidAriaProps/valid.jsx (100%) rename crates/rome_js_analyze/tests/specs/{nursery => a11y}/useValidAriaProps/valid.jsx.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => a11y}/useValidLang/invalid.jsx (100%) rename crates/rome_js_analyze/tests/specs/{nursery => a11y}/useValidLang/invalid.jsx.snap (84%) rename crates/rome_js_analyze/tests/specs/{nursery => a11y}/useValidLang/valid.jsx (100%) rename crates/rome_js_analyze/tests/specs/{nursery => a11y}/useValidLang/valid.jsx.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery/noExtraSemicolons => complexity/noExtraSemicolon}/invalid.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery/noExtraSemicolons => complexity/noExtraSemicolon}/invalid.js.snap (71%) rename crates/rome_js_analyze/tests/specs/{nursery/noExtraSemicolons => complexity/noExtraSemicolon}/valid.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery/noExtraSemicolons => complexity/noExtraSemicolon}/valid.js.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => complexity}/noUselessCatch/invalid.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => complexity}/noUselessCatch/invalid.js.snap (86%) rename crates/rome_js_analyze/tests/specs/{nursery => complexity}/noUselessCatch/valid.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => complexity}/noUselessCatch/valid.js.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => complexity}/noUselessConstructor/invalid.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => complexity}/noUselessConstructor/invalid.js.snap (85%) rename crates/rome_js_analyze/tests/specs/{nursery => complexity}/noUselessConstructor/invalid.jsonc (100%) rename crates/rome_js_analyze/tests/specs/{nursery => complexity}/noUselessConstructor/invalid.jsonc.snap (72%) rename crates/rome_js_analyze/tests/specs/{nursery => complexity}/noUselessConstructor/valid.jsonc (100%) rename crates/rome_js_analyze/tests/specs/{nursery => complexity}/noUselessConstructor/valid.jsonc.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => complexity}/noUselessConstructor/valid.ts (100%) rename crates/rome_js_analyze/tests/specs/{nursery => complexity}/noUselessConstructor/valid.ts.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery/noExtraLabels => complexity/noUselessLabel}/invalid.jsonc (100%) rename crates/rome_js_analyze/tests/specs/{nursery/noExtraLabels => complexity/noUselessLabel}/invalid.jsonc.snap (69%) rename crates/rome_js_analyze/tests/specs/{nursery/noExtraLabels => complexity/noUselessLabel}/valid.jsonc (100%) rename crates/rome_js_analyze/tests/specs/{nursery/noExtraLabels => complexity/noUselessLabel}/valid.jsonc.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => complexity}/noUselessRename/invalid.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => complexity}/noUselessRename/invalid.js.snap (79%) rename crates/rome_js_analyze/tests/specs/{nursery => complexity}/noUselessRename/valid.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => complexity}/noUselessRename/valid.js.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => complexity}/noUselessSwitchCase/invalid.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => complexity}/noUselessSwitchCase/invalid.js.snap (87%) rename crates/rome_js_analyze/tests/specs/{nursery => complexity}/noUselessSwitchCase/valid.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => complexity}/noUselessSwitchCase/valid.js.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => complexity}/noWith/invalid.cjs (100%) rename crates/rome_js_analyze/tests/specs/{nursery => complexity}/noWith/invalid.cjs.snap (87%) rename crates/rome_js_analyze/tests/specs/{nursery => complexity}/noWith/invalid.js.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => complexity}/noWith/valid.js.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noGlobalObjectCalls/invalid.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noGlobalObjectCalls/invalid.js.snap (72%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noGlobalObjectCalls/valid.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noGlobalObjectCalls/valid.js.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noGlobalObjectCalls/valid_import.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noGlobalObjectCalls/valid_import.js.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noInnerDeclarations/invalid-module.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noInnerDeclarations/invalid-module.js.snap (67%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noInnerDeclarations/invalid.jsonc (100%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noInnerDeclarations/invalid.jsonc.snap (67%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noInnerDeclarations/valid-module.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noInnerDeclarations/valid-module.js.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noInnerDeclarations/valid.jsonc (100%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noInnerDeclarations/valid.jsonc.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noInvalidConstructorSuper/invalid.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noInvalidConstructorSuper/invalid.js.snap (80%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noInvalidConstructorSuper/valid.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noInvalidConstructorSuper/valid.js.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noSwitchDeclarations/invalid.jsonc (100%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noSwitchDeclarations/invalid.jsonc.snap (79%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noSwitchDeclarations/invalid.ts (100%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noSwitchDeclarations/invalid.ts.snap (84%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noSwitchDeclarations/valid.jsonc (100%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noSwitchDeclarations/valid.jsonc.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noUnreachableSuper/duplicateSuper.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noUnreachableSuper/duplicateSuper.js.snap (81%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noUnreachableSuper/missingSuper.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noUnreachableSuper/missingSuper.js.snap (82%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noUnreachableSuper/thisBeforeSuper.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noUnreachableSuper/thisBeforeSuper.js.snap (83%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noUnsafeOptionalChaining/invalid.cjs (100%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noUnsafeOptionalChaining/invalid.cjs.snap (67%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noUnsafeOptionalChaining/invalid.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noUnsafeOptionalChaining/invalid.js.snap (81%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noUnsafeOptionalChaining/valid.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noUnsafeOptionalChaining/valid.js.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noUnsafeOptionalChaining/validArithmetic.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noUnsafeOptionalChaining/validArithmetic.js.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noUnusedLabels/invalid.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noUnusedLabels/invalid.js.snap (66%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noUnusedLabels/valid.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/noUnusedLabels/valid.js.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/useYield/invalid.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/useYield/invalid.js.snap (72%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/useYield/valid.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => correctness}/useYield/valid.js.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => style}/noCommaOperator/invalid.jsonc (100%) rename crates/rome_js_analyze/tests/specs/{nursery => style}/noCommaOperator/invalid.jsonc.snap (70%) rename crates/rome_js_analyze/tests/specs/{nursery => style}/noCommaOperator/valid.jsonc (100%) rename crates/rome_js_analyze/tests/specs/{nursery => style}/noCommaOperator/valid.jsonc.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => style}/noInferrableTypes/invalid.ts (100%) rename crates/rome_js_analyze/tests/specs/{nursery => style}/noInferrableTypes/invalid.ts.snap (75%) rename crates/rome_js_analyze/tests/specs/{nursery => style}/noInferrableTypes/valid.ts (100%) rename crates/rome_js_analyze/tests/specs/{nursery => style}/noInferrableTypes/valid.ts.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => style}/noNamespace/invalid.ts (100%) rename crates/rome_js_analyze/tests/specs/{nursery => style}/noNamespace/invalid.ts.snap (69%) rename crates/rome_js_analyze/tests/specs/{nursery => style}/noNamespace/valid.ts (100%) rename crates/rome_js_analyze/tests/specs/{nursery => style}/noNamespace/valid.ts.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => style}/noParameterAssign/invalid.jsonc (100%) rename crates/rome_js_analyze/tests/specs/{nursery => style}/noParameterAssign/invalid.jsonc.snap (75%) rename crates/rome_js_analyze/tests/specs/{nursery => style}/noParameterAssign/valid.jsonc (100%) rename crates/rome_js_analyze/tests/specs/{nursery => style}/noParameterAssign/valid.jsonc.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => style}/noParameterProperties/invalid.ts (100%) rename crates/rome_js_analyze/tests/specs/{nursery => style}/noParameterProperties/invalid.ts.snap (81%) rename crates/rome_js_analyze/tests/specs/{nursery => style}/noParameterProperties/valid.ts (100%) rename crates/rome_js_analyze/tests/specs/{nursery => style}/noParameterProperties/valid.ts.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => style}/noRestrictedGlobals/invalid.jsonc (100%) rename crates/rome_js_analyze/tests/specs/{nursery => style}/noRestrictedGlobals/invalid.jsonc.snap (68%) rename crates/rome_js_analyze/tests/specs/{nursery => style}/noRestrictedGlobals/valid.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => style}/noRestrictedGlobals/valid.js.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noAssignInExpressions/invalid.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noAssignInExpressions/invalid.js.snap (78%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noAssignInExpressions/valid.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noAssignInExpressions/valid.js.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noClassAssign/invalid.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noClassAssign/invalid.js.snap (84%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noClassAssign/valid.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noClassAssign/valid.js.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noConfusingLabels/invalid.jsonc (100%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noConfusingLabels/invalid.jsonc.snap (84%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noConfusingLabels/valid.jsonc (100%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noConfusingLabels/valid.jsonc.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noDuplicateCase/invalid.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noDuplicateCase/invalid.js.snap (88%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noDuplicateCase/valid.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noDuplicateCase/valid.js.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noDuplicateClassMembers/invalid.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noDuplicateClassMembers/invalid.js.snap (77%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noDuplicateClassMembers/valid.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noDuplicateClassMembers/valid.js.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noPrototypeBuiltins/invalid.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noPrototypeBuiltins/invalid.js.snap (88%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noPrototypeBuiltins/valid.js (100%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noPrototypeBuiltins/valid.js.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noRedeclare/invalid-declaration-merging.ts (100%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noRedeclare/invalid-declaration-merging.ts.snap (82%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noRedeclare/invalid.jsonc (100%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noRedeclare/invalid.jsonc.snap (84%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noRedeclare/invalid.ts (100%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noRedeclare/invalid.ts.snap (85%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noRedeclare/valid-declaration-merging.ts (100%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noRedeclare/valid-declaration-merging.ts.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noRedeclare/valid-duplicate.ts (100%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noRedeclare/valid-duplicate.ts.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noRedeclare/valid.jsonc (100%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noRedeclare/valid.jsonc.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noSelfCompare/invalid.jsonc (100%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noSelfCompare/invalid.jsonc.snap (78%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noSelfCompare/valid.jsonc (100%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/noSelfCompare/valid.jsonc.snap (100%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/useNamespaceKeyword/invalid.ts (100%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/useNamespaceKeyword/invalid.ts.snap (84%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/useNamespaceKeyword/valid.ts (100%) rename crates/rome_js_analyze/tests/specs/{nursery => suspicious}/useNamespaceKeyword/valid.ts.snap (100%) rename website/src/pages/lint/rules/{noExtraSemicolons.md => noExtraSemicolon.md} (80%) rename website/src/pages/lint/rules/{noExtraLabels.md => noUselessLabel.md} (87%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35d835056b0..1e9df37984c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,51 @@ output. [#4405](https://github.com/rome/tools/pull/4405). - [`useHeadingContent`](https://docs.rome.tools/lint/rules/useHeadingContent/) - [`noAccumulatingSpread`](https://docs.rome.tools/lint/rules/noAccumulatingSpread/) +#### Promoted rules + +New rules are promoted, please check [#4431](https://github.com/rome/tools/pull/4431) for more details. + +- [lint/a11y/noNoninteractiveElementToInteractiveRole](https://docs.rome.tools/lint/rules/noNoninteractiveElementToInteractiveRole) +- [lint/a11y/noRedundantAlt](https://docs.rome.tools/lint/rules/noRedundantAlt) +- [lint/a11y/noSvgWithoutTitle](https://docs.rome.tools/lint/rules/noSvgWithoutTitle) +- [lint/a11y/useAriaPropsForRole](https://docs.rome.tools/lint/rules/useAriaPropsForRole) +- [lint/a11y/useIframeTitle](https://docs.rome.tools/lint/rules/useIframeTitle) +- [lint/a11y/useMediaCaption](https://docs.rome.tools/lint/rules/useMediaCaption) +- [lint/a11y/useValidAriaProps](ttps://docs.rome.tools/lint/rules/useValidAriaProps) +- [lint/a11y/useValidLang](ttps://docs.rome.tools/lint/rules/useValidLang) +- [lint/complexity/noExtraSemicolon](https://docs.rome.tools/lint/rules/noExtraSemicolon) +- [lint/complexity/noUselessCatch](https://docs.rome.tools/lint/rules/noUselessCatch) +- [lint/complexity/noUselessConstructor](https://docs.rome.tools/lint/rules/noUselessConstructor) +- [lint/complexity/noUselessLabel](ttps://docs.rome.tools/lint/rules/noUselessLabel) +- [lint/complexity/noUselessRename](https://docs.rome.tools/lint/rules/noUselessRename) +- [lint/complexity/noUselessSwitchCase](https://docs.rome.tools/lint/rules/noUselessSwitchCase) +- [lint/complexity/noWith](https://docs.rome.tools/lint/rules/noWith) +- [lint/correctness/noGlobalObjectCalls](https://docs.rome.tools/lint/rules/noGlobalObjectCalls) +- [lint/correctness/noInnerDeclarations](https://docs.rome.tools/lint/rules/noInnerDeclarations) +- [lint/correctness/noInvalidConstructorSuper](https://docs.rome.tools/lint/rules/noInvalidConstructorSuper) +- [lint/correctness/noSwitchDeclarations](https://docs.rome.tools/lint/rules/noSwitchDeclarations) +- [lint/correctness/noUnreachableSuper](https://rome.tools/docs/lint/rules/noUnreachableSuper) +- [lint/correctness/noUnsafeOptionalChaining](https://docs.rome.tools/lint/rules/noUnsafeOptionalChaining) +- [lint/correctness/noUnusedLabels](https://docs.rome.tools/lint/rules/noUnusedLabels) +- [lint/correctness/useYield](https://docs.rome.tools/lint/rules/useYield) +- [lint/style/noCommaOperator](https://docs.rome.tools/lint/rules/noCommaOperator) +- [lint/style/noInferrableTypes](https://docs.rome.tools/lint/rules/noInferrableTypes) +- [lint/style/noNamespace](https://docs.rome.tools/lint/rules/noNamespace) +- [lint/style/noParameterAssign](https://docs.rome.tools/lint/rules/noParameterAssign) +- [lint/style/noParameterProperties](https://docs.rome.tools/lint/rules/noParameterProperties) +- [lint/style/noRestrictedGlobals](https://docs.rome.tools/lint/rules/noRestrictedGlobals) +- [lint/suspicious/noAssignInExpressions](https://docs.rome.tools/lint/rules/noAssignInExpressions) +- [lint/suspicious/noClassAssign](https://docs.rome.tools/lint/rules/noClassAssign) +- [lint/suspicious/noConfusingLabels](https://docs.rome.tools/lint/rules/noConfusingLabels) +- [lint/suspicious/noDuplicateCase](https://docs.rome.tools/lint/rules/noDuplicateCase) +- [lint/suspicious/noDuplicateClassMembers](https://docs.rome.tools/lint/rules/noDuplicateClassMembers) +- [lint/suspicious/noPrototypeBuiltins](https://docs.rome.tools/lint/rules/noPrototypeBuiltins) +- [lint/suspicious/noRedeclare](https://docs.rome.tools/lint/rules/noRedeclare) +- [lint/suspicious/noSelfCompare](https://docs.rome.tools/lint/rules/noSelfCompare) +- [lint/suspicious/useNamespaceKeyword](https://docs.rome.tools/lint/rules/useNamespaceKeyword) + +Note that, `noExtraSemicolons` and `noExtraLabels` are renamed to `noExtraSemicolon` and `noUselessLabel`. + #### Other changes - Add new command `rome migrate` the transform the configuration file `rome.json` diff --git a/crates/rome_cli/tests/snapshots/main_commands_check/nursery_unstable.snap b/crates/rome_cli/tests/snapshots/main_commands_check/nursery_unstable.snap index 41a842259ba..04dcd78a82e 100644 --- a/crates/rome_cli/tests/snapshots/main_commands_check/nursery_unstable.snap +++ b/crates/rome_cli/tests/snapshots/main_commands_check/nursery_unstable.snap @@ -1,5 +1,6 @@ --- source: crates/rome_cli/tests/snap_test.rs +assertion_line: 346 expression: content --- ## `check.js` @@ -22,7 +23,7 @@ internalError/io ━━━━━━━━━━━━━━━━━━━━━ # Emitted Messages ```block -check.js:1:4 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +check.js:1:4 lint/suspicious/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × The assignment should not be in an expression. diff --git a/crates/rome_cli/tests/snapshots/main_configuration/incorrect_rule_name.snap b/crates/rome_cli/tests/snapshots/main_configuration/incorrect_rule_name.snap index 13809491897..0f39e1c7f58 100644 --- a/crates/rome_cli/tests/snapshots/main_configuration/incorrect_rule_name.snap +++ b/crates/rome_cli/tests/snapshots/main_configuration/incorrect_rule_name.snap @@ -1,5 +1,6 @@ --- source: crates/rome_cli/tests/snap_test.rs +assertion_line: 346 expression: content --- ## `rome.json` @@ -57,19 +58,27 @@ rome.json:6:13 deserialize ━━━━━━━━━━━━━━━━━ - noConstAssign - noConstructorReturn - noEmptyPattern + - noGlobalObjectCalls + - noInnerDeclarations + - noInvalidConstructorSuper - noNewSymbol - noPrecisionLoss - noRenderReturnValue - noSetterReturn - noStringCaseMismatch + - noSwitchDeclarations - noUndeclaredVariables - noUnnecessaryContinue - noUnreachable + - noUnreachableSuper - noUnsafeFinally + - noUnsafeOptionalChaining + - noUnusedLabels - noUnusedVariables - noVoidElementsWithChildren - noVoidTypeReturn - useValidForDirection + - useYield ``` diff --git a/crates/rome_diagnostics_categories/src/categories.rs b/crates/rome_diagnostics_categories/src/categories.rs index 7f4f40ec5d7..2e099f15ed6 100644 --- a/crates/rome_diagnostics_categories/src/categories.rs +++ b/crates/rome_diagnostics_categories/src/categories.rs @@ -9,25 +9,40 @@ define_categories! { // Lint categories - // a11y group + // a11y + "lint/a11y/noAccessKey": "https://docs.rome.tools/lint/rules/noAccessKey", "lint/a11y/noAutofocus": "https://docs.rome.tools/lint/rules/noAutofocus", "lint/a11y/noBlankTarget": "https://docs.rome.tools/lint/rules/noBlankTarget", + "lint/a11y/noDistractingElements": "https://docs.rome.tools/lint/rules/noDistractingElements", + "lint/a11y/noHeaderScope": "https://docs.rome.tools/lint/rules/noHeaderScope", + "lint/a11y/noNoninteractiveElementToInteractiveRole": "https://docs.rome.tools/lint/rules/noNoninteractiveElementToInteractiveRole", "lint/a11y/noPositiveTabindex": "https://docs.rome.tools/lint/rules/noPositiveTabindex", + "lint/a11y/noRedundantAlt": "https://docs.rome.tools/lint/rules/noRedundantAlt", + "lint/a11y/noSvgWithoutTitle": "https://docs.rome.tools/lint/rules/noSvgWithoutTitle", "lint/a11y/useAltText": "https://docs.rome.tools/lint/rules/useAltText", "lint/a11y/useAnchorContent": "https://docs.rome.tools/lint/rules/useAnchorContent", + "lint/a11y/useAriaPropsForRole": "https://docs.rome.tools/lint/rules/useAriaPropsForRole", "lint/a11y/useButtonType": "https://docs.rome.tools/lint/rules/useButtonType", + "lint/a11y/useHtmlLang": "https://docs.rome.tools/lint/rules/useHtmlLang", + "lint/a11y/useIframeTitle": "https://docs.rome.tools/lint/rules/useIframeTitle", "lint/a11y/useKeyWithClickEvents": "https://docs.rome.tools/lint/rules/useKeyWithClickEvents", "lint/a11y/useKeyWithMouseEvents": "https://docs.rome.tools/lint/rules/useKeyWithMouseEvents", + "lint/a11y/useMediaCaption": "https://docs.rome.tools/lint/rules/useMediaCaption", "lint/a11y/useValidAnchor": "https://docs.rome.tools/lint/rules/useValidAnchor", - "lint/a11y/useHtmlLang": "https://docs.rome.tools/lint/rules/useHtmlLang", - "lint/a11y/noDistractingElements": "https://docs.rome.tools/lint/rules/noDistractingElements", - "lint/a11y/noHeaderScope": "https://docs.rome.tools/lint/rules/noHeaderScope", - "lint/a11y/noAccessKey": "https://docs.rome.tools/lint/rules/noAccessKey", + "lint/a11y/useValidAriaProps":"https://docs.rome.tools/lint/rules/useValidAriaProps", + "lint/a11y/useValidLang":"https://docs.rome.tools/lint/rules/useValidLang", // complexity "lint/complexity/noExtraBooleanCast": "https://docs.rome.tools/lint/rules/noExtraBooleanCast", + "lint/complexity/noExtraSemicolon": "https://docs.rome.tools/lint/rules/noExtraSemicolon", "lint/complexity/noMultipleSpacesInRegularExpressionLiterals": "https://docs.rome.tools/lint/rules/noMultipleSpacesInRegularExpressionLiterals", + "lint/complexity/noUselessCatch": "https://docs.rome.tools/lint/rules/noUselessCatch", + "lint/complexity/noUselessConstructor": "https://docs.rome.tools/lint/rules/noUselessConstructor", "lint/complexity/noUselessFragments": "https://docs.rome.tools/lint/rules/noUselessFragments", + "lint/complexity/noUselessLabel":"https://docs.rome.tools/lint/rules/noUselessLabel", + "lint/complexity/noUselessRename": "https://docs.rome.tools/lint/rules/noUselessRename", + "lint/complexity/noUselessSwitchCase": "https://docs.rome.tools/lint/rules/noUselessSwitchCase", + "lint/complexity/noWith": "https://docs.rome.tools/lint/rules/noWith", "lint/complexity/useFlatMap": "https://docs.rome.tools/lint/rules/useFlatMap", "lint/complexity/useOptionalChain": "https://docs.rome.tools/lint/rules/useOptionalChain", "lint/complexity/useSimplifiedLogicExpression": "https://docs.rome.tools/lint/rules/useSimplifiedLogicExpression", @@ -35,85 +50,53 @@ define_categories! { // correctness "lint/correctness/noChildrenProp": "https://docs.rome.tools/lint/rules/noChildrenProp", "lint/correctness/noConstAssign": "https://docs.rome.tools/lint/rules/noConstAssign", + "lint/correctness/noConstructorReturn": "https://docs.rome.tools/lint/rules/noConstructorReturn", "lint/correctness/noEmptyPattern": "https://docs.rome.tools/lint/rules/noEmptyPattern", + "lint/correctness/noGlobalObjectCalls": "https://docs.rome.tools/lint/rules/noGlobalObjectCalls", + "lint/correctness/noInnerDeclarations": "https://docs.rome.tools/lint/rules/noInnerDeclarations", + "lint/correctness/noInvalidConstructorSuper": "https://docs.rome.tools/lint/rules/noInvalidConstructorSuper", "lint/correctness/noNewSymbol": "https://docs.rome.tools/lint/rules/noNewSymbol", + "lint/correctness/noPrecisionLoss": "https://docs.rome.tools/lint/rules/noPrecisionLoss", "lint/correctness/noRenderReturnValue": "https://docs.rome.tools/lint/rules/noRenderReturnValue", + "lint/correctness/noSetterReturn": "https://docs.rome.tools/lint/rules/noSetterReturn", + "lint/correctness/noStringCaseMismatch": "https://docs.rome.tools/lint/rules/noStringCaseMismatch", + "lint/correctness/noSwitchDeclarations": "https://docs.rome.tools/lint/rules/noSwitchDeclarations", "lint/correctness/noUndeclaredVariables": "https://docs.rome.tools/lint/rules/noUndeclaredVariables", "lint/correctness/noUnnecessaryContinue": "https://docs.rome.tools/lint/rules/noUnnecessaryContinue", "lint/correctness/noUnreachable": "https://docs.rome.tools/lint/rules/noUnreachable", + "lint/correctness/noUnreachableSuper": "https://rome.tools/docs/lint/rules/noUnreachableSuper", + "lint/correctness/noUnsafeFinally": "https://docs.rome.tools/lint/rules/noUnsafeFinally", + "lint/correctness/noUnsafeOptionalChaining": "https://docs.rome.tools/lint/rules/noUnsafeOptionalChaining", + "lint/correctness/noUnusedLabels": "https://docs.rome.tools/lint/rules/noUnusedLabels", "lint/correctness/noUnusedVariables": "https://docs.rome.tools/lint/rules/noUnusedVariables", "lint/correctness/noVoidElementsWithChildren": "https://docs.rome.tools/lint/rules/noVoidElementsWithChildren", - "lint/correctness/useValidForDirection": "https://docs.rome.tools/lint/rules/useValidForDirection", - "lint/correctness/noUnsafeFinally": "https://docs.rome.tools/lint/rules/noUnsafeFinally", - "lint/correctness/noConstructorReturn": "https://docs.rome.tools/lint/rules/noConstructorReturn", - "lint/correctness/noPrecisionLoss": "https://docs.rome.tools/lint/rules/noPrecisionLoss", "lint/correctness/noVoidTypeReturn": "https://docs.rome.tools/lint/rules/noVoidTypeReturn", - "lint/correctness/noStringCaseMismatch": "https://docs.rome.tools/lint/rules/noStringCaseMismatch", - "lint/correctness/noSetterReturn": "https://docs.rome.tools/lint/rules/noSetterReturn", - + "lint/correctness/useValidForDirection": "https://docs.rome.tools/lint/rules/useValidForDirection", + "lint/correctness/useYield": "https://docs.rome.tools/lint/rules/useYield", // nursery - "lint/nursery/noAssignInExpressions": "https://docs.rome.tools/lint/rules/noAssignInExpressions", - "lint/nursery/noWith": "https://docs.rome.tools/lint/rules/noWith", - "lint/nursery/noExtraSemicolons": "https://docs.rome.tools/lint/rules/noExtraSemicolons", + "lint/nursery/noAccumulatingSpread": "https://docs.rome.tools/lint/rules/noAccumulatingSpread", + "lint/nursery/noAriaUnsupportedElements": "https://docs.rome.tools/lint/rules/noAriaUnsupportedElements", "lint/nursery/noBannedTypes":"https://docs.rome.tools/lint/rules/noBannedTypes", - "lint/nursery/noClassAssign": "https://docs.rome.tools/lint/rules/noClassAssign", - "lint/nursery/noCommaOperator": "https://docs.rome.tools/lint/rules/noCommaOperator", - "lint/nursery/noDuplicateCase": "https://docs.rome.tools/lint/rules/noDuplicateCase", - "lint/nursery/noExtraLabels":"https://docs.rome.tools/lint/rules/noExtraLabels", - "lint/nursery/noInferrableTypes": "https://docs.rome.tools/lint/rules/noInferrableTypes", - "lint/nursery/noInnerDeclarations": "https://docs.rome.tools/lint/rules/noInnerDeclarations", - "lint/nursery/noInvalidConstructorSuper": "https://docs.rome.tools/lint/rules/noInvalidConstructorSuper", - "lint/nursery/noConfusingLabels": "https://docs.rome.tools/lint/rules/noConfusingLabels", - "lint/nursery/noParameterProperties": "https://docs.rome.tools/lint/rules/noParameterProperties", - "lint/nursery/noRedundantAlt": "https://docs.rome.tools/lint/rules/noRedundantAlt", - "lint/nursery/noRestrictedGlobals": "https://docs.rome.tools/lint/rules/noRestrictedGlobals", - "lint/nursery/noSelfCompare": "https://docs.rome.tools/lint/rules/noSelfCompare", + "lint/nursery/noConfusingArrow": "https://docs.rome.tools/lint/rules/noConfusingArrow", + "lint/nursery/noConsoleLog": "https://docs.rome.tools/lint/rules/noConsoleLog", + "lint/nursery/noConstantCondition": "https://docs.rome.tools/lint/rules/noConstantCondition", + "lint/nursery/noDuplicateJsxProps": "https://docs.rome.tools/lint/rules/noDuplicateJsxProps", + "lint/nursery/noForEach": "https://docs.rome.tools/lint/rules/noForEach", + "lint/nursery/noNoninteractiveTabindex": "https://docs.rome.tools/lint/rules/noNoninteractiveTabindex", + "lint/nursery/noRedundantRoles": "https://docs.rome.tools/lint/rules/noRedundantRoles", "lint/nursery/noSelfAssign": "https://docs.rome.tools/lint/rules/noSelfAssign", - "lint/nursery/noSetterReturn": "https://docs.rome.tools/lint/rules/noSetterReturn", - "lint/nursery/noStringCaseMismatch": "https://docs.rome.tools/lint/rules/noStringCaseMismatch", - "lint/nursery/noSwitchDeclarations": "https://docs.rome.tools/lint/rules/noSwitchDeclarations", - "lint/nursery/noUnreachableSuper": "https://rome.tools/docs/lint/rules/noUnreachableSuper", - "lint/nursery/noUnusedLabels": "https://docs.rome.tools/lint/rules/noUnusedLabels", - "lint/nursery/noUselessSwitchCase": "https://docs.rome.tools/lint/rules/noUselessSwitchCase", - "lint/nursery/useAriaPropsForRole": "https://docs.rome.tools/lint/rules/useAriaPropsForRole", "lint/nursery/useAriaPropTypes": "https://docs.rome.tools/lint/rules/useAriaPropTypes", "lint/nursery/useCamelCase": "https://docs.rome.tools/lint/rules/useCamelCase", - "lint/nursery/useValidLang":"https://docs.rome.tools/lint/rules/useValidLang", - "lint/nursery/useValidAriaProps":"https://docs.rome.tools/lint/rules/useValidAriaProps", "lint/nursery/useExhaustiveDependencies": "https://docs.rome.tools/lint/rules/useExhaustiveDependencies", - "lint/nursery/useIsNan": "https://docs.rome.tools/lint/rules/useIsNan", - "lint/nursery/useMediaCaption": "https://docs.rome.tools/lint/rules/useMediaCaption", - "lint/nursery/useIframeTitle": "https://docs.rome.tools/lint/rules/useIframeTitle", - "lint/nursery/noNoninteractiveElementToInteractiveRole": "https://docs.rome.tools/lint/rules/noNoninteractiveElementToInteractiveRole", - "lint/nursery/noUselessRename": "https://docs.rome.tools/lint/rules/noUselessRename", - "lint/nursery/useValidForDirection": "https://docs.rome.tools/lint/rules/useValidForDirection", - "lint/nursery/useHookAtTopLevel": "https://docs.rome.tools/lint/rules/useHookAtTopLevel", - "lint/nursery/noUnsafeOptionalChaining": "https://docs.rome.tools/lint/rules/noUnsafeOptionalChaining", - "lint/nursery/noDuplicateJsxProps": "https://docs.rome.tools/lint/rules/noDuplicateJsxProps", - "lint/nursery/noDuplicateClassMembers": "https://docs.rome.tools/lint/rules/noDuplicateClassMembers", - "lint/nursery/useYield": "https://docs.rome.tools/lint/rules/useYield", - "lint/nursery/noGlobalObjectCalls": "https://docs.rome.tools/lint/rules/noGlobalObjectCalls", - "lint/nursery/noPrototypeBuiltins": "https://docs.rome.tools/lint/rules/noPrototypeBuiltins", - "lint/nursery/noSvgWithoutTitle": "https://docs.rome.tools/lint/rules/noSvgWithoutTitle", - "lint/nursery/noUselessCatch": "https://docs.rome.tools/lint/rules/noUselessCatch", - "lint/nursery/noParameterAssign": "https://docs.rome.tools/lint/rules/noParameterAssign", - "lint/nursery/noNamespace": "https://docs.rome.tools/lint/rules/noNamespace", - "lint/nursery/noConfusingArrow": "https://docs.rome.tools/lint/rules/noConfusingArrow", - "lint/nursery/noNoninteractiveTabindex": "https://docs.rome.tools/lint/rules/noNoninteractiveTabindex", - "lint/nursery/noAriaUnsupportedElements": "https://docs.rome.tools/lint/rules/noAriaUnsupportedElements", - "lint/nursery/noConsoleLog": "https://docs.rome.tools/lint/rules/noConsoleLog", - "lint/nursery/noForEach": "https://docs.rome.tools/lint/rules/noForEach", - "lint/nursery/useLiteralKeys": "https://docs.rome.tools/lint/rules/useLiteralKeys", - "lint/nursery/noUselessConstructor": "https://docs.rome.tools/lint/rules/noUselessConstructor", - "lint/nursery/useLiteralEnumMembers": "https://docs.rome.tools/lint/rules/useLiteralEnumMembers", "lint/nursery/useGroupedTypeImport": "https://docs.rome.tools/lint/rules/useGroupedTypeImport", "lint/nursery/useHeadingContent": "https://docs.rome.tools/lint/rules/useHeadingContent", - "lint/nursery/noRedeclare": "https://docs.rome.tools/lint/rules/noRedeclare", - "lint/nursery/useNamespaceKeyword": "https://docs.rome.tools/lint/rules/useNamespaceKeyword", - "lint/nursery/noRedundantRoles": "https://docs.rome.tools/lint/rules/noRedundantRoles", - "lint/nursery/noConstantCondition": "https://docs.rome.tools/lint/rules/noConstantCondition", - "lint/nursery/noAccumulatingSpread": "https://docs.rome.tools/lint/rules/noAccumulatingSpread", + "lint/nursery/useHookAtTopLevel": "https://docs.rome.tools/lint/rules/useHookAtTopLevel", + "lint/nursery/useIsNan": "https://docs.rome.tools/lint/rules/useIsNan", + "lint/nursery/useLiteralEnumMembers": "https://docs.rome.tools/lint/rules/useLiteralEnumMembers", + "lint/nursery/useLiteralKeys": "https://docs.rome.tools/lint/rules/useLiteralKeys", + // Insert new nursery rule here + // performance "lint/performance/noDelete": "https://docs.rome.tools/lint/rules/noDelete", @@ -122,58 +105,69 @@ define_categories! { "lint/security/noDangerouslySetInnerHtml": "https://docs.rome.tools/lint/rules/noDangerouslySetInnerHtml", "lint/security/noDangerouslySetInnerHtmlWithChildren": "https://docs.rome.tools/lint/rules/noDangerouslySetInnerHtmlWithChildren", - // style group + // style "lint/style/noArguments": "https://docs.rome.tools/lint/rules/noArguments", + "lint/style/noCommaOperator": "https://docs.rome.tools/lint/rules/noCommaOperator", "lint/style/noImplicitBoolean": "https://docs.rome.tools/lint/rules/noImplicitBoolean", + "lint/style/noInferrableTypes": "https://docs.rome.tools/lint/rules/noInferrableTypes", + "lint/style/noNamespace": "https://docs.rome.tools/lint/rules/noNamespace", "lint/style/noNegationElse": "https://docs.rome.tools/lint/rules/noNegationElse", + "lint/style/noNonNullAssertion": "https://docs.rome.tools/lint/rules/noNonNullAssertion", + "lint/style/noParameterAssign": "https://docs.rome.tools/lint/rules/noParameterAssign", + "lint/style/noParameterProperties": "https://docs.rome.tools/lint/rules/noParameterProperties", + "lint/style/noRestrictedGlobals": "https://docs.rome.tools/lint/rules/noRestrictedGlobals", "lint/style/noShoutyConstants": "https://docs.rome.tools/lint/rules/noShoutyConstants", "lint/style/noUnusedTemplateLiteral": "https://docs.rome.tools/lint/rules/noUnusedTemplateLiteral", + "lint/style/noVar": "https://docs.rome.tools/lint/rules/noVar", "lint/style/useBlockStatements": "https://docs.rome.tools/lint/rules/useBlockStatements", + "lint/style/useConst":"https://docs.rome.tools/lint/rules/useConst", + "lint/style/useDefaultParameterLast":"https://docs.rome.tools/lint/rules/useDefaultParameterLast", + "lint/style/useEnumInitializers":"https://docs.rome.tools/lint/rules/useEnumInitializers", + "lint/style/useExponentiationOperator": "https://docs.rome.tools/lint/rules/useExponentiationOperator", "lint/style/useFragmentSyntax": "https://docs.rome.tools/lint/rules/useFragmentSyntax", + "lint/style/useNumericLiterals": "https://docs.rome.tools/lint/rules/useNumericLiterals", "lint/style/useSelfClosingElements": "https://docs.rome.tools/lint/rules/useSelfClosingElements", "lint/style/useShorthandArrayType": "https://docs.rome.tools/lint/rules/useShorthandArrayType", "lint/style/useSingleCaseStatement": "https://docs.rome.tools/lint/rules/useSingleCaseStatement", "lint/style/useSingleVarDeclarator": "https://docs.rome.tools/lint/rules/useSingleVarDeclarator", "lint/style/useTemplate": "https://docs.rome.tools/lint/rules/useTemplate", "lint/style/useWhile": "https://docs.rome.tools/lint/rules/useWhile", - "lint/style/useExponentiationOperator": "https://docs.rome.tools/lint/rules/useExponentiationOperator", - "lint/style/useNumericLiterals": "https://docs.rome.tools/lint/rules/useNumericLiterals", - "lint/style/useDefaultParameterLast":"https://docs.rome.tools/lint/rules/useDefaultParameterLast", - "lint/style/useConst":"https://docs.rome.tools/lint/rules/useConst", - "lint/style/noVar": "https://docs.rome.tools/lint/rules/noVar", - "lint/style/noNonNullAssertion": "https://docs.rome.tools/lint/rules/noNonNullAssertion", - "lint/style/useEnumInitializers":"https://docs.rome.tools/lint/rules/useEnumInitializers", - // suspicious "lint/suspicious/noArrayIndexKey": "https://docs.rome.tools/lint/rules/noArrayIndexKey", + "lint/suspicious/noAssignInExpressions": "https://docs.rome.tools/lint/rules/noAssignInExpressions", "lint/suspicious/noAsyncPromiseExecutor": "https://docs.rome.tools/lint/rules/noAsyncPromiseExecutor", "lint/suspicious/noCatchAssign": "https://docs.rome.tools/lint/rules/noCatchAssign", + "lint/suspicious/noClassAssign": "https://docs.rome.tools/lint/rules/noClassAssign", "lint/suspicious/noCommentText": "https://docs.rome.tools/lint/rules/noCommentText", "lint/suspicious/noCompareNegZero": "https://docs.rome.tools/lint/rules/noCompareNegZero", + "lint/suspicious/noConfusingLabels": "https://docs.rome.tools/lint/rules/noConfusingLabels", + "lint/suspicious/noConstEnum": "https://docs.rome.tools/lint/rules/noConstEnum", "lint/suspicious/noDebugger": "https://docs.rome.tools/lint/rules/noDebugger", "lint/suspicious/noDoubleEquals": "https://docs.rome.tools/lint/rules/noDoubleEquals", + "lint/suspicious/noDuplicateCase": "https://docs.rome.tools/lint/rules/noDuplicateCase", + "lint/suspicious/noDuplicateClassMembers": "https://docs.rome.tools/lint/rules/noDuplicateClassMembers", + "lint/suspicious/noDuplicateObjectKeys":"https://docs.rome.tools/lint/rules/noDuplicateObjectKeys", "lint/suspicious/noDuplicateParameters": "https://docs.rome.tools/lint/rules/noDuplicateParameters", + "lint/suspicious/noEmptyInterface": "https://docs.rome.tools/lint/rules/noEmptyInterface", "lint/suspicious/noExplicitAny": "https://docs.rome.tools/lint/rules/noExplicitAny", + "lint/suspicious/noExtraNonNullAssertion":"https://docs.rome.tools/lint/rules/noExtraNonNullAssertion", "lint/suspicious/noFunctionAssign": "https://docs.rome.tools/lint/rules/noFunctionAssign", "lint/suspicious/noImportAssign": "https://docs.rome.tools/lint/rules/noImportAssign", "lint/suspicious/noLabelVar": "https://docs.rome.tools/lint/rules/noLabelVar", + "lint/suspicious/noPrototypeBuiltins": "https://docs.rome.tools/lint/rules/noPrototypeBuiltins", + "lint/suspicious/noRedeclare": "https://docs.rome.tools/lint/rules/noRedeclare", + "lint/suspicious/noRedundantUseStrict": "https://docs.rome.tools/lint/rules/noRedundantUseStrict", + "lint/suspicious/noSelfCompare": "https://docs.rome.tools/lint/rules/noSelfCompare", "lint/suspicious/noShadowRestrictedNames": "https://docs.rome.tools/lint/rules/noShadowRestrictedNames", "lint/suspicious/noSparseArray": "https://docs.rome.tools/lint/rules/noSparseArray", "lint/suspicious/noUnsafeNegation": "https://docs.rome.tools/lint/rules/noUnsafeNegation", - "lint/suspicious/useValidTypeof": "https://docs.rome.tools/lint/rules/useValidTypeof", - "lint/suspicious/noEmptyInterface": "https://docs.rome.tools/lint/rules/noEmptyInterface", - "lint/suspicious/noExtraNonNullAssertion":"https://docs.rome.tools/lint/rules/noExtraNonNullAssertion", - "lint/suspicious/noRedundantUseStrict": "https://docs.rome.tools/lint/rules/noRedundantUseStrict", - "lint/suspicious/noConstEnum": "https://docs.rome.tools/lint/rules/noConstEnum", "lint/suspicious/useDefaultSwitchClauseLast":"https://docs.rome.tools/lint/rules/useDefaultSwitchClauseLast", - "lint/suspicious/noDuplicateObjectKeys":"https://docs.rome.tools/lint/rules/noDuplicateObjectKeys", - - + "lint/suspicious/useNamespaceKeyword": "https://docs.rome.tools/lint/rules/useNamespaceKeyword", + "lint/suspicious/useValidTypeof": "https://docs.rome.tools/lint/rules/useValidTypeof", ; - // General categories "files/missingHandler", "format", @@ -207,8 +201,6 @@ define_categories! { "suppressions/unused", "suppressions/deprecatedSyntax", - - // Used in tests and examples "args/fileNotFound", "flags/invalid", diff --git a/crates/rome_js_analyze/src/analyzers/a11y.rs b/crates/rome_js_analyze/src/analyzers/a11y.rs index 95dc18a4c05..d6fce6bed1c 100644 --- a/crates/rome_js_analyze/src/analyzers/a11y.rs +++ b/crates/rome_js_analyze/src/analyzers/a11y.rs @@ -6,10 +6,13 @@ mod no_auto_focus; mod no_blank_target; mod no_distracting_elements; mod no_header_scope; +mod no_redundant_alt; +mod no_svg_without_title; mod use_alt_text; mod use_anchor_content; mod use_html_lang; mod use_key_with_click_events; mod use_key_with_mouse_events; +mod use_media_caption; mod use_valid_anchor; -declare_group! { pub (crate) A11y { name : "a11y" , rules : [self :: no_access_key :: NoAccessKey , self :: no_auto_focus :: NoAutoFocus , self :: no_blank_target :: NoBlankTarget , self :: no_distracting_elements :: NoDistractingElements , self :: no_header_scope :: NoHeaderScope , self :: use_alt_text :: UseAltText , self :: use_anchor_content :: UseAnchorContent , self :: use_html_lang :: UseHtmlLang , self :: use_key_with_click_events :: UseKeyWithClickEvents , self :: use_key_with_mouse_events :: UseKeyWithMouseEvents , self :: use_valid_anchor :: UseValidAnchor ,] } } +declare_group! { pub (crate) A11y { name : "a11y" , rules : [self :: no_access_key :: NoAccessKey , self :: no_auto_focus :: NoAutoFocus , self :: no_blank_target :: NoBlankTarget , self :: no_distracting_elements :: NoDistractingElements , self :: no_header_scope :: NoHeaderScope , self :: no_redundant_alt :: NoRedundantAlt , self :: no_svg_without_title :: NoSvgWithoutTitle , self :: use_alt_text :: UseAltText , self :: use_anchor_content :: UseAnchorContent , self :: use_html_lang :: UseHtmlLang , self :: use_key_with_click_events :: UseKeyWithClickEvents , self :: use_key_with_mouse_events :: UseKeyWithMouseEvents , self :: use_media_caption :: UseMediaCaption , self :: use_valid_anchor :: UseValidAnchor ,] } } diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_redundant_alt.rs b/crates/rome_js_analyze/src/analyzers/a11y/no_redundant_alt.rs similarity index 100% rename from crates/rome_js_analyze/src/analyzers/nursery/no_redundant_alt.rs rename to crates/rome_js_analyze/src/analyzers/a11y/no_redundant_alt.rs diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_svg_without_title.rs b/crates/rome_js_analyze/src/analyzers/a11y/no_svg_without_title.rs similarity index 100% rename from crates/rome_js_analyze/src/analyzers/nursery/no_svg_without_title.rs rename to crates/rome_js_analyze/src/analyzers/a11y/no_svg_without_title.rs diff --git a/crates/rome_js_analyze/src/analyzers/nursery/use_media_caption.rs b/crates/rome_js_analyze/src/analyzers/a11y/use_media_caption.rs similarity index 100% rename from crates/rome_js_analyze/src/analyzers/nursery/use_media_caption.rs rename to crates/rome_js_analyze/src/analyzers/a11y/use_media_caption.rs diff --git a/crates/rome_js_analyze/src/analyzers/complexity.rs b/crates/rome_js_analyze/src/analyzers/complexity.rs index 33c06eaef9f..aa61989d7f7 100644 --- a/crates/rome_js_analyze/src/analyzers/complexity.rs +++ b/crates/rome_js_analyze/src/analyzers/complexity.rs @@ -2,8 +2,15 @@ use rome_analyze::declare_group; mod no_extra_boolean_cast; +mod no_extra_semicolon; mod no_multiple_spaces_in_regular_expression_literals; +mod no_useless_catch; +mod no_useless_constructor; +mod no_useless_label; +mod no_useless_rename; +mod no_useless_switch_case; +mod no_with; mod use_flat_map; mod use_optional_chain; mod use_simplified_logic_expression; -declare_group! { pub (crate) Complexity { name : "complexity" , rules : [self :: no_extra_boolean_cast :: NoExtraBooleanCast , self :: no_multiple_spaces_in_regular_expression_literals :: NoMultipleSpacesInRegularExpressionLiterals , self :: use_flat_map :: UseFlatMap , self :: use_optional_chain :: UseOptionalChain , self :: use_simplified_logic_expression :: UseSimplifiedLogicExpression ,] } } +declare_group! { pub (crate) Complexity { name : "complexity" , rules : [self :: no_extra_boolean_cast :: NoExtraBooleanCast , self :: no_extra_semicolon :: NoExtraSemicolon , self :: no_multiple_spaces_in_regular_expression_literals :: NoMultipleSpacesInRegularExpressionLiterals , self :: no_useless_catch :: NoUselessCatch , self :: no_useless_constructor :: NoUselessConstructor , self :: no_useless_label :: NoUselessLabel , self :: no_useless_rename :: NoUselessRename , self :: no_useless_switch_case :: NoUselessSwitchCase , self :: no_with :: NoWith , self :: use_flat_map :: UseFlatMap , self :: use_optional_chain :: UseOptionalChain , self :: use_simplified_logic_expression :: UseSimplifiedLogicExpression ,] } } diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_extra_semicolons.rs b/crates/rome_js_analyze/src/analyzers/complexity/no_extra_semicolon.rs similarity index 97% rename from crates/rome_js_analyze/src/analyzers/nursery/no_extra_semicolons.rs rename to crates/rome_js_analyze/src/analyzers/complexity/no_extra_semicolon.rs index 8f5d2380bbe..d8c36e8971a 100644 --- a/crates/rome_js_analyze/src/analyzers/nursery/no_extra_semicolons.rs +++ b/crates/rome_js_analyze/src/analyzers/complexity/no_extra_semicolon.rs @@ -89,9 +89,9 @@ declare_rule! { /// } /// }; /// ``` - pub(crate) NoExtraSemicolons { + pub(crate) NoExtraSemicolon { version: "12.0.0", - name: "noExtraSemicolons", + name: "noExtraSemicolon", recommended: true, } } @@ -100,7 +100,7 @@ declare_node_union! { pub(crate) AnyJsExtraSemicolon = JsEmptyStatement | JsEmptyClassMember } -impl Rule for NoExtraSemicolons { +impl Rule for NoExtraSemicolon { type Query = Ast; type State = AnyJsExtraSemicolon; type Signals = Option; diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_useless_catch.rs b/crates/rome_js_analyze/src/analyzers/complexity/no_useless_catch.rs similarity index 100% rename from crates/rome_js_analyze/src/analyzers/nursery/no_useless_catch.rs rename to crates/rome_js_analyze/src/analyzers/complexity/no_useless_catch.rs diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_useless_constructor.rs b/crates/rome_js_analyze/src/analyzers/complexity/no_useless_constructor.rs similarity index 100% rename from crates/rome_js_analyze/src/analyzers/nursery/no_useless_constructor.rs rename to crates/rome_js_analyze/src/analyzers/complexity/no_useless_constructor.rs diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_extra_labels.rs b/crates/rome_js_analyze/src/analyzers/complexity/no_useless_label.rs similarity index 98% rename from crates/rome_js_analyze/src/analyzers/nursery/no_extra_labels.rs rename to crates/rome_js_analyze/src/analyzers/complexity/no_useless_label.rs index 61599c967c4..8dd53a3b31e 100644 --- a/crates/rome_js_analyze/src/analyzers/nursery/no_extra_labels.rs +++ b/crates/rome_js_analyze/src/analyzers/complexity/no_useless_label.rs @@ -37,9 +37,9 @@ declare_rule! { /// } /// ``` /// - pub(crate) NoExtraLabels { + pub(crate) NoUselessLabel { version: "12.0.0", - name: "noExtraLabels", + name: "noUselessLabel", recommended: true, } } @@ -54,7 +54,7 @@ declare_node_union! { JsWhileStatement } -impl Rule for NoExtraLabels { +impl Rule for NoUselessLabel { type Query = Ast; type State = (); type Signals = Option; diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_useless_rename.rs b/crates/rome_js_analyze/src/analyzers/complexity/no_useless_rename.rs similarity index 100% rename from crates/rome_js_analyze/src/analyzers/nursery/no_useless_rename.rs rename to crates/rome_js_analyze/src/analyzers/complexity/no_useless_rename.rs diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_useless_switch_case.rs b/crates/rome_js_analyze/src/analyzers/complexity/no_useless_switch_case.rs similarity index 100% rename from crates/rome_js_analyze/src/analyzers/nursery/no_useless_switch_case.rs rename to crates/rome_js_analyze/src/analyzers/complexity/no_useless_switch_case.rs diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_with.rs b/crates/rome_js_analyze/src/analyzers/complexity/no_with.rs similarity index 100% rename from crates/rome_js_analyze/src/analyzers/nursery/no_with.rs rename to crates/rome_js_analyze/src/analyzers/complexity/no_with.rs diff --git a/crates/rome_js_analyze/src/analyzers/correctness.rs b/crates/rome_js_analyze/src/analyzers/correctness.rs index 7ba3eff1587..ec5a06e4a21 100644 --- a/crates/rome_js_analyze/src/analyzers/correctness.rs +++ b/crates/rome_js_analyze/src/analyzers/correctness.rs @@ -3,13 +3,20 @@ use rome_analyze::declare_group; mod no_constructor_return; mod no_empty_pattern; +mod no_inner_declarations; +mod no_invalid_constructor_super; mod no_new_symbol; mod no_precision_loss; mod no_setter_return; mod no_string_case_mismatch; +mod no_switch_declarations; mod no_unnecessary_continue; mod no_unreachable; +mod no_unreachable_super; mod no_unsafe_finally; +mod no_unsafe_optional_chaining; +mod no_unused_labels; mod no_void_type_return; mod use_valid_for_direction; -declare_group! { pub (crate) Correctness { name : "correctness" , rules : [self :: no_constructor_return :: NoConstructorReturn , self :: no_empty_pattern :: NoEmptyPattern , self :: no_new_symbol :: NoNewSymbol , self :: no_precision_loss :: NoPrecisionLoss , self :: no_setter_return :: NoSetterReturn , self :: no_string_case_mismatch :: NoStringCaseMismatch , self :: no_unnecessary_continue :: NoUnnecessaryContinue , self :: no_unreachable :: NoUnreachable , self :: no_unsafe_finally :: NoUnsafeFinally , self :: no_void_type_return :: NoVoidTypeReturn , self :: use_valid_for_direction :: UseValidForDirection ,] } } +mod use_yield; +declare_group! { pub (crate) Correctness { name : "correctness" , rules : [self :: no_constructor_return :: NoConstructorReturn , self :: no_empty_pattern :: NoEmptyPattern , self :: no_inner_declarations :: NoInnerDeclarations , self :: no_invalid_constructor_super :: NoInvalidConstructorSuper , self :: no_new_symbol :: NoNewSymbol , self :: no_precision_loss :: NoPrecisionLoss , self :: no_setter_return :: NoSetterReturn , self :: no_string_case_mismatch :: NoStringCaseMismatch , self :: no_switch_declarations :: NoSwitchDeclarations , self :: no_unnecessary_continue :: NoUnnecessaryContinue , self :: no_unreachable :: NoUnreachable , self :: no_unreachable_super :: NoUnreachableSuper , self :: no_unsafe_finally :: NoUnsafeFinally , self :: no_unsafe_optional_chaining :: NoUnsafeOptionalChaining , self :: no_unused_labels :: NoUnusedLabels , self :: no_void_type_return :: NoVoidTypeReturn , self :: use_valid_for_direction :: UseValidForDirection , self :: use_yield :: UseYield ,] } } diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_inner_declarations.rs b/crates/rome_js_analyze/src/analyzers/correctness/no_inner_declarations.rs similarity index 100% rename from crates/rome_js_analyze/src/analyzers/nursery/no_inner_declarations.rs rename to crates/rome_js_analyze/src/analyzers/correctness/no_inner_declarations.rs diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_invalid_constructor_super.rs b/crates/rome_js_analyze/src/analyzers/correctness/no_invalid_constructor_super.rs similarity index 100% rename from crates/rome_js_analyze/src/analyzers/nursery/no_invalid_constructor_super.rs rename to crates/rome_js_analyze/src/analyzers/correctness/no_invalid_constructor_super.rs diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_switch_declarations.rs b/crates/rome_js_analyze/src/analyzers/correctness/no_switch_declarations.rs similarity index 100% rename from crates/rome_js_analyze/src/analyzers/nursery/no_switch_declarations.rs rename to crates/rome_js_analyze/src/analyzers/correctness/no_switch_declarations.rs diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_unreachable_super.rs b/crates/rome_js_analyze/src/analyzers/correctness/no_unreachable_super.rs similarity index 100% rename from crates/rome_js_analyze/src/analyzers/nursery/no_unreachable_super.rs rename to crates/rome_js_analyze/src/analyzers/correctness/no_unreachable_super.rs diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_unsafe_optional_chaining.rs b/crates/rome_js_analyze/src/analyzers/correctness/no_unsafe_optional_chaining.rs similarity index 100% rename from crates/rome_js_analyze/src/analyzers/nursery/no_unsafe_optional_chaining.rs rename to crates/rome_js_analyze/src/analyzers/correctness/no_unsafe_optional_chaining.rs diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_unused_labels.rs b/crates/rome_js_analyze/src/analyzers/correctness/no_unused_labels.rs similarity index 100% rename from crates/rome_js_analyze/src/analyzers/nursery/no_unused_labels.rs rename to crates/rome_js_analyze/src/analyzers/correctness/no_unused_labels.rs diff --git a/crates/rome_js_analyze/src/analyzers/nursery/use_yield.rs b/crates/rome_js_analyze/src/analyzers/correctness/use_yield.rs similarity index 100% rename from crates/rome_js_analyze/src/analyzers/nursery/use_yield.rs rename to crates/rome_js_analyze/src/analyzers/correctness/use_yield.rs diff --git a/crates/rome_js_analyze/src/analyzers/nursery.rs b/crates/rome_js_analyze/src/analyzers/nursery.rs index 1da94b8df2e..4e296670ed6 100644 --- a/crates/rome_js_analyze/src/analyzers/nursery.rs +++ b/crates/rome_js_analyze/src/analyzers/nursery.rs @@ -1,43 +1,14 @@ //! Generated file, do not edit by hand, see `xtask/codegen` use rome_analyze::declare_group; -mod no_assign_in_expressions; mod no_banned_types; -mod no_comma_operator; mod no_confusing_arrow; -mod no_confusing_labels; -mod no_duplicate_case; -mod no_duplicate_class_members; mod no_duplicate_jsx_props; -mod no_extra_labels; -mod no_extra_semicolons; mod no_for_each; -mod no_global_object_calls; -mod no_inferrable_types; -mod no_inner_declarations; -mod no_invalid_constructor_super; -mod no_namespace; -mod no_parameter_properties; -mod no_prototype_builtins; -mod no_redundant_alt; mod no_self_assign; -mod no_self_compare; -mod no_svg_without_title; -mod no_switch_declarations; -mod no_unreachable_super; -mod no_unsafe_optional_chaining; -mod no_unused_labels; -mod no_useless_catch; -mod no_useless_constructor; -mod no_useless_rename; -mod no_useless_switch_case; -mod no_with; mod use_grouped_type_import; mod use_heading_content; mod use_is_nan; mod use_literal_enum_members; mod use_literal_keys; -mod use_media_caption; -mod use_namespace_keyword; -mod use_yield; -declare_group! { pub (crate) Nursery { name : "nursery" , rules : [self :: no_assign_in_expressions :: NoAssignInExpressions , self :: no_banned_types :: NoBannedTypes , self :: no_comma_operator :: NoCommaOperator , self :: no_confusing_arrow :: NoConfusingArrow , self :: no_confusing_labels :: NoConfusingLabels , self :: no_duplicate_case :: NoDuplicateCase , self :: no_duplicate_class_members :: NoDuplicateClassMembers , self :: no_duplicate_jsx_props :: NoDuplicateJsxProps , self :: no_extra_labels :: NoExtraLabels , self :: no_extra_semicolons :: NoExtraSemicolons , self :: no_for_each :: NoForEach , self :: no_global_object_calls :: NoGlobalObjectCalls , self :: no_inferrable_types :: NoInferrableTypes , self :: no_inner_declarations :: NoInnerDeclarations , self :: no_invalid_constructor_super :: NoInvalidConstructorSuper , self :: no_namespace :: NoNamespace , self :: no_parameter_properties :: NoParameterProperties , self :: no_prototype_builtins :: NoPrototypeBuiltins , self :: no_redundant_alt :: NoRedundantAlt , self :: no_self_assign :: NoSelfAssign , self :: no_self_compare :: NoSelfCompare , self :: no_svg_without_title :: NoSvgWithoutTitle , self :: no_switch_declarations :: NoSwitchDeclarations , self :: no_unreachable_super :: NoUnreachableSuper , self :: no_unsafe_optional_chaining :: NoUnsafeOptionalChaining , self :: no_unused_labels :: NoUnusedLabels , self :: no_useless_catch :: NoUselessCatch , self :: no_useless_constructor :: NoUselessConstructor , self :: no_useless_rename :: NoUselessRename , self :: no_useless_switch_case :: NoUselessSwitchCase , self :: no_with :: NoWith , self :: use_grouped_type_import :: UseGroupedTypeImport , self :: use_heading_content :: UseHeadingContent , self :: use_is_nan :: UseIsNan , self :: use_literal_enum_members :: UseLiteralEnumMembers , self :: use_literal_keys :: UseLiteralKeys , self :: use_media_caption :: UseMediaCaption , self :: use_namespace_keyword :: UseNamespaceKeyword , self :: use_yield :: UseYield ,] } } +declare_group! { pub (crate) Nursery { name : "nursery" , rules : [self :: no_banned_types :: NoBannedTypes , self :: no_confusing_arrow :: NoConfusingArrow , self :: no_duplicate_jsx_props :: NoDuplicateJsxProps , self :: no_for_each :: NoForEach , self :: no_self_assign :: NoSelfAssign , self :: use_grouped_type_import :: UseGroupedTypeImport , self :: use_heading_content :: UseHeadingContent , self :: use_is_nan :: UseIsNan , self :: use_literal_enum_members :: UseLiteralEnumMembers , self :: use_literal_keys :: UseLiteralKeys ,] } } diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_confusing_arrow.rs b/crates/rome_js_analyze/src/analyzers/nursery/no_confusing_arrow.rs index 2547d1dc7d0..21f3b89fdc3 100644 --- a/crates/rome_js_analyze/src/analyzers/nursery/no_confusing_arrow.rs +++ b/crates/rome_js_analyze/src/analyzers/nursery/no_confusing_arrow.rs @@ -33,7 +33,7 @@ declare_rule! { /// ``` /// pub(crate) NoConfusingArrow { - version: "next", + version: "12.1.0", name: "noConfusingArrow", recommended: false, } diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_duplicate_jsx_props.rs b/crates/rome_js_analyze/src/analyzers/nursery/no_duplicate_jsx_props.rs index 6d6238177f7..9e7b6d3bb7a 100644 --- a/crates/rome_js_analyze/src/analyzers/nursery/no_duplicate_jsx_props.rs +++ b/crates/rome_js_analyze/src/analyzers/nursery/no_duplicate_jsx_props.rs @@ -31,7 +31,7 @@ declare_rule! { /// /// ``` pub(crate) NoDuplicateJsxProps { - version: "13.0.0", + version: "12.1.0", name: "noDuplicateJsxProps", recommended: true, } diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_for_each.rs b/crates/rome_js_analyze/src/analyzers/nursery/no_for_each.rs index e870b93d15b..f005b6985f6 100644 --- a/crates/rome_js_analyze/src/analyzers/nursery/no_for_each.rs +++ b/crates/rome_js_analyze/src/analyzers/nursery/no_for_each.rs @@ -41,7 +41,7 @@ declare_rule! { /// ``` /// pub(crate) NoForEach { - version: "next", + version: "12.1.0", name: "noForEach", recommended: false, } diff --git a/crates/rome_js_analyze/src/analyzers/nursery/use_grouped_type_import.rs b/crates/rome_js_analyze/src/analyzers/nursery/use_grouped_type_import.rs index d71a79dc7af..6d36abe20d8 100644 --- a/crates/rome_js_analyze/src/analyzers/nursery/use_grouped_type_import.rs +++ b/crates/rome_js_analyze/src/analyzers/nursery/use_grouped_type_import.rs @@ -61,7 +61,7 @@ declare_rule! { /// import { A, type B } from "mod"; /// ``` pub(crate) UseGroupedTypeImport { - version: "next", + version: "12.1.0", name: "useGroupedTypeImport", recommended: true, } diff --git a/crates/rome_js_analyze/src/analyzers/nursery/use_heading_content.rs b/crates/rome_js_analyze/src/analyzers/nursery/use_heading_content.rs index 752cc99d88f..1191b091685 100644 --- a/crates/rome_js_analyze/src/analyzers/nursery/use_heading_content.rs +++ b/crates/rome_js_analyze/src/analyzers/nursery/use_heading_content.rs @@ -46,7 +46,7 @@ declare_rule! { /// - [WCAG 2.4.6](https://www.w3.org/TR/UNDERSTANDING-WCAG20/navigation-mechanisms-descriptive.html) /// pub(crate) UseHeadingContent { - version: "next", + version: "12.1.0", name: "useHeadingContent", recommended: false, } diff --git a/crates/rome_js_analyze/src/analyzers/nursery/use_is_nan.rs b/crates/rome_js_analyze/src/analyzers/nursery/use_is_nan.rs index 744c2a85b19..f3287a0a615 100644 --- a/crates/rome_js_analyze/src/analyzers/nursery/use_is_nan.rs +++ b/crates/rome_js_analyze/src/analyzers/nursery/use_is_nan.rs @@ -8,7 +8,8 @@ use rome_rowan::{declare_node_union, AstNode}; declare_rule! { /// Require calls to `isNaN()` when checking for `NaN`. /// - /// In JavaScript, `NaN` is a special value of the `Number` type. It’s used to represent any of the "not-a-number" values represented by the double-precision 64-bit format as specified by the IEEE Standard for Binary Floating-Point Arithmetic. + /// In JavaScript, `NaN` is a special value of the `Number` type. + /// It’s used to represent any of the "not-a-number" values represented by the double-precision 64-bit format as specified by the IEEE Standard for Binary Floating-Point Arithmetic. /// /// Because `NaN` is unique in JavaScript by not being equal to anything, including itself, the results of comparisons to `NaN` are confusing: /// - `NaN` === `NaN` or `NaN` == `NaN` evaluate to false diff --git a/crates/rome_js_analyze/src/analyzers/nursery/use_literal_enum_members.rs b/crates/rome_js_analyze/src/analyzers/nursery/use_literal_enum_members.rs index e411e58dcba..0475fc32a2e 100644 --- a/crates/rome_js_analyze/src/analyzers/nursery/use_literal_enum_members.rs +++ b/crates/rome_js_analyze/src/analyzers/nursery/use_literal_enum_members.rs @@ -72,7 +72,7 @@ declare_rule! { /// } /// ``` pub(crate) UseLiteralEnumMembers { - version: "next", + version: "12.1.0", name: "useLiteralEnumMembers", recommended: true, } diff --git a/crates/rome_js_analyze/src/analyzers/nursery/use_literal_keys.rs b/crates/rome_js_analyze/src/analyzers/nursery/use_literal_keys.rs index e2efcf93428..86ba0257553 100644 --- a/crates/rome_js_analyze/src/analyzers/nursery/use_literal_keys.rs +++ b/crates/rome_js_analyze/src/analyzers/nursery/use_literal_keys.rs @@ -45,7 +45,7 @@ declare_rule! { /// ``` /// pub(crate) UseLiteralKeys { - version: "next", + version: "12.1.0", name: "useLiteralKeys", recommended: true, } diff --git a/crates/rome_js_analyze/src/analyzers/style.rs b/crates/rome_js_analyze/src/analyzers/style.rs index 196f4d56f90..62098170af3 100644 --- a/crates/rome_js_analyze/src/analyzers/style.rs +++ b/crates/rome_js_analyze/src/analyzers/style.rs @@ -1,9 +1,13 @@ //! Generated file, do not edit by hand, see `xtask/codegen` use rome_analyze::declare_group; +mod no_comma_operator; mod no_implicit_boolean; +mod no_inferrable_types; +mod no_namespace; mod no_negation_else; mod no_non_null_assertion; +mod no_parameter_properties; mod no_unused_template_literal; mod use_block_statements; mod use_default_parameter_last; @@ -16,4 +20,4 @@ mod use_single_case_statement; mod use_single_var_declarator; mod use_template; mod use_while; -declare_group! { pub (crate) Style { name : "style" , rules : [self :: no_implicit_boolean :: NoImplicitBoolean , self :: no_negation_else :: NoNegationElse , self :: no_non_null_assertion :: NoNonNullAssertion , self :: no_unused_template_literal :: NoUnusedTemplateLiteral , self :: use_block_statements :: UseBlockStatements , self :: use_default_parameter_last :: UseDefaultParameterLast , self :: use_enum_initializers :: UseEnumInitializers , self :: use_exponentiation_operator :: UseExponentiationOperator , self :: use_numeric_literals :: UseNumericLiterals , self :: use_self_closing_elements :: UseSelfClosingElements , self :: use_shorthand_array_type :: UseShorthandArrayType , self :: use_single_case_statement :: UseSingleCaseStatement , self :: use_single_var_declarator :: UseSingleVarDeclarator , self :: use_template :: UseTemplate , self :: use_while :: UseWhile ,] } } +declare_group! { pub (crate) Style { name : "style" , rules : [self :: no_comma_operator :: NoCommaOperator , self :: no_implicit_boolean :: NoImplicitBoolean , self :: no_inferrable_types :: NoInferrableTypes , self :: no_namespace :: NoNamespace , self :: no_negation_else :: NoNegationElse , self :: no_non_null_assertion :: NoNonNullAssertion , self :: no_parameter_properties :: NoParameterProperties , self :: no_unused_template_literal :: NoUnusedTemplateLiteral , self :: use_block_statements :: UseBlockStatements , self :: use_default_parameter_last :: UseDefaultParameterLast , self :: use_enum_initializers :: UseEnumInitializers , self :: use_exponentiation_operator :: UseExponentiationOperator , self :: use_numeric_literals :: UseNumericLiterals , self :: use_self_closing_elements :: UseSelfClosingElements , self :: use_shorthand_array_type :: UseShorthandArrayType , self :: use_single_case_statement :: UseSingleCaseStatement , self :: use_single_var_declarator :: UseSingleVarDeclarator , self :: use_template :: UseTemplate , self :: use_while :: UseWhile ,] } } diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_comma_operator.rs b/crates/rome_js_analyze/src/analyzers/style/no_comma_operator.rs similarity index 100% rename from crates/rome_js_analyze/src/analyzers/nursery/no_comma_operator.rs rename to crates/rome_js_analyze/src/analyzers/style/no_comma_operator.rs diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_inferrable_types.rs b/crates/rome_js_analyze/src/analyzers/style/no_inferrable_types.rs similarity index 100% rename from crates/rome_js_analyze/src/analyzers/nursery/no_inferrable_types.rs rename to crates/rome_js_analyze/src/analyzers/style/no_inferrable_types.rs diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_namespace.rs b/crates/rome_js_analyze/src/analyzers/style/no_namespace.rs similarity index 98% rename from crates/rome_js_analyze/src/analyzers/nursery/no_namespace.rs rename to crates/rome_js_analyze/src/analyzers/style/no_namespace.rs index ff79c5699bc..5444c26f763 100644 --- a/crates/rome_js_analyze/src/analyzers/nursery/no_namespace.rs +++ b/crates/rome_js_analyze/src/analyzers/style/no_namespace.rs @@ -50,7 +50,7 @@ declare_rule! { pub(crate) NoNamespace { version: "12.0.0", name: "noNamespace", - recommended: true, + recommended: false, } } diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_parameter_properties.rs b/crates/rome_js_analyze/src/analyzers/style/no_parameter_properties.rs similarity index 100% rename from crates/rome_js_analyze/src/analyzers/nursery/no_parameter_properties.rs rename to crates/rome_js_analyze/src/analyzers/style/no_parameter_properties.rs diff --git a/crates/rome_js_analyze/src/analyzers/suspicious.rs b/crates/rome_js_analyze/src/analyzers/suspicious.rs index cd67b08b4c4..aa519ee401f 100644 --- a/crates/rome_js_analyze/src/analyzers/suspicious.rs +++ b/crates/rome_js_analyze/src/analyzers/suspicious.rs @@ -1,20 +1,27 @@ //! Generated file, do not edit by hand, see `xtask/codegen` use rome_analyze::declare_group; +mod no_assign_in_expressions; mod no_async_promise_executor; mod no_comment_text; mod no_compare_neg_zero; +mod no_confusing_labels; mod no_const_enum; mod no_debugger; mod no_double_equals; +mod no_duplicate_case; +mod no_duplicate_class_members; mod no_duplicate_object_keys; mod no_empty_interface; mod no_explicit_any; mod no_extra_non_null_assertion; +mod no_prototype_builtins; mod no_redundant_use_strict; +mod no_self_compare; mod no_shadow_restricted_names; mod no_sparse_array; mod no_unsafe_negation; mod use_default_switch_clause_last; +mod use_namespace_keyword; mod use_valid_typeof; -declare_group! { pub (crate) Suspicious { name : "suspicious" , rules : [self :: no_async_promise_executor :: NoAsyncPromiseExecutor , self :: no_comment_text :: NoCommentText , self :: no_compare_neg_zero :: NoCompareNegZero , self :: no_const_enum :: NoConstEnum , self :: no_debugger :: NoDebugger , self :: no_double_equals :: NoDoubleEquals , self :: no_duplicate_object_keys :: NoDuplicateObjectKeys , self :: no_empty_interface :: NoEmptyInterface , self :: no_explicit_any :: NoExplicitAny , self :: no_extra_non_null_assertion :: NoExtraNonNullAssertion , self :: no_redundant_use_strict :: NoRedundantUseStrict , self :: no_shadow_restricted_names :: NoShadowRestrictedNames , self :: no_sparse_array :: NoSparseArray , self :: no_unsafe_negation :: NoUnsafeNegation , self :: use_default_switch_clause_last :: UseDefaultSwitchClauseLast , self :: use_valid_typeof :: UseValidTypeof ,] } } +declare_group! { pub (crate) Suspicious { name : "suspicious" , rules : [self :: no_assign_in_expressions :: NoAssignInExpressions , self :: no_async_promise_executor :: NoAsyncPromiseExecutor , self :: no_comment_text :: NoCommentText , self :: no_compare_neg_zero :: NoCompareNegZero , self :: no_confusing_labels :: NoConfusingLabels , self :: no_const_enum :: NoConstEnum , self :: no_debugger :: NoDebugger , self :: no_double_equals :: NoDoubleEquals , self :: no_duplicate_case :: NoDuplicateCase , self :: no_duplicate_class_members :: NoDuplicateClassMembers , self :: no_duplicate_object_keys :: NoDuplicateObjectKeys , self :: no_empty_interface :: NoEmptyInterface , self :: no_explicit_any :: NoExplicitAny , self :: no_extra_non_null_assertion :: NoExtraNonNullAssertion , self :: no_prototype_builtins :: NoPrototypeBuiltins , self :: no_redundant_use_strict :: NoRedundantUseStrict , self :: no_self_compare :: NoSelfCompare , self :: no_shadow_restricted_names :: NoShadowRestrictedNames , self :: no_sparse_array :: NoSparseArray , self :: no_unsafe_negation :: NoUnsafeNegation , self :: use_default_switch_clause_last :: UseDefaultSwitchClauseLast , self :: use_namespace_keyword :: UseNamespaceKeyword , self :: use_valid_typeof :: UseValidTypeof ,] } } diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_assign_in_expressions.rs b/crates/rome_js_analyze/src/analyzers/suspicious/no_assign_in_expressions.rs similarity index 100% rename from crates/rome_js_analyze/src/analyzers/nursery/no_assign_in_expressions.rs rename to crates/rome_js_analyze/src/analyzers/suspicious/no_assign_in_expressions.rs diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_confusing_labels.rs b/crates/rome_js_analyze/src/analyzers/suspicious/no_confusing_labels.rs similarity index 100% rename from crates/rome_js_analyze/src/analyzers/nursery/no_confusing_labels.rs rename to crates/rome_js_analyze/src/analyzers/suspicious/no_confusing_labels.rs diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_duplicate_case.rs b/crates/rome_js_analyze/src/analyzers/suspicious/no_duplicate_case.rs similarity index 100% rename from crates/rome_js_analyze/src/analyzers/nursery/no_duplicate_case.rs rename to crates/rome_js_analyze/src/analyzers/suspicious/no_duplicate_case.rs diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_duplicate_class_members.rs b/crates/rome_js_analyze/src/analyzers/suspicious/no_duplicate_class_members.rs similarity index 100% rename from crates/rome_js_analyze/src/analyzers/nursery/no_duplicate_class_members.rs rename to crates/rome_js_analyze/src/analyzers/suspicious/no_duplicate_class_members.rs diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_prototype_builtins.rs b/crates/rome_js_analyze/src/analyzers/suspicious/no_prototype_builtins.rs similarity index 99% rename from crates/rome_js_analyze/src/analyzers/nursery/no_prototype_builtins.rs rename to crates/rome_js_analyze/src/analyzers/suspicious/no_prototype_builtins.rs index ce7275f634c..92a2b5e9b57 100644 --- a/crates/rome_js_analyze/src/analyzers/nursery/no_prototype_builtins.rs +++ b/crates/rome_js_analyze/src/analyzers/suspicious/no_prototype_builtins.rs @@ -42,7 +42,7 @@ declare_rule! { pub(crate) NoPrototypeBuiltins { version: "12.0.0", name: "noPrototypeBuiltins", - recommended: false, + recommended: true, } } diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_self_compare.rs b/crates/rome_js_analyze/src/analyzers/suspicious/no_self_compare.rs similarity index 83% rename from crates/rome_js_analyze/src/analyzers/nursery/no_self_compare.rs rename to crates/rome_js_analyze/src/analyzers/suspicious/no_self_compare.rs index 11cf949544b..0170fac0d2a 100644 --- a/crates/rome_js_analyze/src/analyzers/nursery/no_self_compare.rs +++ b/crates/rome_js_analyze/src/analyzers/suspicious/no_self_compare.rs @@ -9,7 +9,8 @@ declare_rule! { /// /// > Comparing a variable against itself is usually an error, either a typo or refactoring error. It is confusing to the reader and may potentially introduce a runtime error. /// - /// > The only time you would compare a variable against itself is when you are testing for `NaN`. However, it is far more appropriate to use `typeof x === 'number' && isNaN(x)` or the [Number.isNaN ES2015 function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN) for that use case rather than leaving the reader of the code to determine the intent of self comparison. + /// > The only time you would compare a variable against itself is when you are testing for `NaN`. + /// However, it is far more appropriate to use `typeof x === 'number' && Number.isNaN(x)` for that use case rather than leaving the reader of the code to determine the intent of self comparison. /// /// Source: [no-self-compare](https://eslint.org/docs/latest/rules/no-self-compare). /// diff --git a/crates/rome_js_analyze/src/analyzers/nursery/use_namespace_keyword.rs b/crates/rome_js_analyze/src/analyzers/suspicious/use_namespace_keyword.rs similarity index 99% rename from crates/rome_js_analyze/src/analyzers/nursery/use_namespace_keyword.rs rename to crates/rome_js_analyze/src/analyzers/suspicious/use_namespace_keyword.rs index 39f29874bb3..eaccfa9e0d9 100644 --- a/crates/rome_js_analyze/src/analyzers/nursery/use_namespace_keyword.rs +++ b/crates/rome_js_analyze/src/analyzers/suspicious/use_namespace_keyword.rs @@ -43,7 +43,7 @@ declare_rule! { pub(crate) UseNamespaceKeyword { version: "12.0.0", name: "useNamespaceKeyword", - recommended: false, + recommended: true, } } diff --git a/crates/rome_js_analyze/src/aria_analyzers.rs b/crates/rome_js_analyze/src/aria_analyzers.rs index 61d82a67ed6..b116233f52b 100644 --- a/crates/rome_js_analyze/src/aria_analyzers.rs +++ b/crates/rome_js_analyze/src/aria_analyzers.rs @@ -1,4 +1,5 @@ //! Generated file, do not edit by hand, see `xtask/codegen` +mod a11y; mod nursery; -::rome_analyze::declare_category! { pub (crate) AriaAnalyzers { kind : Lint , groups : [self :: nursery :: Nursery ,] } } +::rome_analyze::declare_category! { pub (crate) AriaAnalyzers { kind : Lint , groups : [self :: a11y :: A11y , self :: nursery :: Nursery ,] } } diff --git a/crates/rome_js_analyze/src/aria_analyzers/a11y.rs b/crates/rome_js_analyze/src/aria_analyzers/a11y.rs new file mode 100644 index 00000000000..e85a7ac2c87 --- /dev/null +++ b/crates/rome_js_analyze/src/aria_analyzers/a11y.rs @@ -0,0 +1,8 @@ +//! Generated file, do not edit by hand, see `xtask/codegen` + +use rome_analyze::declare_group; +mod no_noninteractive_element_to_interactive_role; +mod use_aria_props_for_role; +mod use_valid_aria_props; +mod use_valid_lang; +declare_group! { pub (crate) A11y { name : "a11y" , rules : [self :: no_noninteractive_element_to_interactive_role :: NoNoninteractiveElementToInteractiveRole , self :: use_aria_props_for_role :: UseAriaPropsForRole , self :: use_valid_aria_props :: UseValidAriaProps , self :: use_valid_lang :: UseValidLang ,] } } diff --git a/crates/rome_js_analyze/src/aria_analyzers/nursery/no_noninteractive_element_to_interactive_role.rs b/crates/rome_js_analyze/src/aria_analyzers/a11y/no_noninteractive_element_to_interactive_role.rs similarity index 100% rename from crates/rome_js_analyze/src/aria_analyzers/nursery/no_noninteractive_element_to_interactive_role.rs rename to crates/rome_js_analyze/src/aria_analyzers/a11y/no_noninteractive_element_to_interactive_role.rs diff --git a/crates/rome_js_analyze/src/aria_analyzers/nursery/use_aria_props_for_role.rs b/crates/rome_js_analyze/src/aria_analyzers/a11y/use_aria_props_for_role.rs similarity index 100% rename from crates/rome_js_analyze/src/aria_analyzers/nursery/use_aria_props_for_role.rs rename to crates/rome_js_analyze/src/aria_analyzers/a11y/use_aria_props_for_role.rs diff --git a/crates/rome_js_analyze/src/aria_analyzers/nursery/use_valid_aria_props.rs b/crates/rome_js_analyze/src/aria_analyzers/a11y/use_valid_aria_props.rs similarity index 100% rename from crates/rome_js_analyze/src/aria_analyzers/nursery/use_valid_aria_props.rs rename to crates/rome_js_analyze/src/aria_analyzers/a11y/use_valid_aria_props.rs diff --git a/crates/rome_js_analyze/src/aria_analyzers/nursery/use_valid_lang.rs b/crates/rome_js_analyze/src/aria_analyzers/a11y/use_valid_lang.rs similarity index 100% rename from crates/rome_js_analyze/src/aria_analyzers/nursery/use_valid_lang.rs rename to crates/rome_js_analyze/src/aria_analyzers/a11y/use_valid_lang.rs diff --git a/crates/rome_js_analyze/src/aria_analyzers/nursery.rs b/crates/rome_js_analyze/src/aria_analyzers/nursery.rs index 0028d7d37ba..5d10fd49299 100644 --- a/crates/rome_js_analyze/src/aria_analyzers/nursery.rs +++ b/crates/rome_js_analyze/src/aria_analyzers/nursery.rs @@ -2,11 +2,7 @@ use rome_analyze::declare_group; mod no_aria_unsupported_elements; -mod no_noninteractive_element_to_interactive_role; mod no_noninteractive_tabindex; mod no_redundant_roles; mod use_aria_prop_types; -mod use_aria_props_for_role; -mod use_valid_aria_props; -mod use_valid_lang; -declare_group! { pub (crate) Nursery { name : "nursery" , rules : [self :: no_aria_unsupported_elements :: NoAriaUnsupportedElements , self :: no_noninteractive_element_to_interactive_role :: NoNoninteractiveElementToInteractiveRole , self :: no_noninteractive_tabindex :: NoNoninteractiveTabindex , self :: no_redundant_roles :: NoRedundantRoles , self :: use_aria_prop_types :: UseAriaPropTypes , self :: use_aria_props_for_role :: UseAriaPropsForRole , self :: use_valid_aria_props :: UseValidAriaProps , self :: use_valid_lang :: UseValidLang ,] } } +declare_group! { pub (crate) Nursery { name : "nursery" , rules : [self :: no_aria_unsupported_elements :: NoAriaUnsupportedElements , self :: no_noninteractive_tabindex :: NoNoninteractiveTabindex , self :: no_redundant_roles :: NoRedundantRoles , self :: use_aria_prop_types :: UseAriaPropTypes ,] } } diff --git a/crates/rome_js_analyze/src/aria_analyzers/nursery/no_aria_unsupported_elements.rs b/crates/rome_js_analyze/src/aria_analyzers/nursery/no_aria_unsupported_elements.rs index ff732f462a7..d586f2d16bf 100644 --- a/crates/rome_js_analyze/src/aria_analyzers/nursery/no_aria_unsupported_elements.rs +++ b/crates/rome_js_analyze/src/aria_analyzers/nursery/no_aria_unsupported_elements.rs @@ -33,7 +33,7 @@ declare_rule! { /// /// pub(crate) NoAriaUnsupportedElements { - version: "next", + version: "12.1.0", name: "noAriaUnsupportedElements", recommended: true, } diff --git a/crates/rome_js_analyze/src/aria_analyzers/nursery/no_noninteractive_tabindex.rs b/crates/rome_js_analyze/src/aria_analyzers/nursery/no_noninteractive_tabindex.rs index 1d36dd89e49..9794e4815c8 100644 --- a/crates/rome_js_analyze/src/aria_analyzers/nursery/no_noninteractive_tabindex.rs +++ b/crates/rome_js_analyze/src/aria_analyzers/nursery/no_noninteractive_tabindex.rs @@ -48,7 +48,7 @@ declare_rule! { /// ``` /// pub(crate) NoNoninteractiveTabindex { - version: "next", + version: "12.1.0", name: "noNoninteractiveTabindex", recommended: false, } diff --git a/crates/rome_js_analyze/src/aria_analyzers/nursery/no_redundant_roles.rs b/crates/rome_js_analyze/src/aria_analyzers/nursery/no_redundant_roles.rs index 4d26185fead..31812f94863 100644 --- a/crates/rome_js_analyze/src/aria_analyzers/nursery/no_redundant_roles.rs +++ b/crates/rome_js_analyze/src/aria_analyzers/nursery/no_redundant_roles.rs @@ -44,7 +44,7 @@ declare_rule! { /// ``` /// pub(crate) NoRedundantRoles { - version: "next", + version: "12.1.0", name: "noRedundantRoles", recommended: true, } diff --git a/crates/rome_js_analyze/src/semantic_analyzers/a11y.rs b/crates/rome_js_analyze/src/semantic_analyzers/a11y.rs index f000972b065..0778cefd42d 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/a11y.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/a11y.rs @@ -3,4 +3,5 @@ use rome_analyze::declare_group; mod no_positive_tabindex; mod use_button_type; -declare_group! { pub (crate) A11y { name : "a11y" , rules : [self :: no_positive_tabindex :: NoPositiveTabindex , self :: use_button_type :: UseButtonType ,] } } +mod use_iframe_title; +declare_group! { pub (crate) A11y { name : "a11y" , rules : [self :: no_positive_tabindex :: NoPositiveTabindex , self :: use_button_type :: UseButtonType , self :: use_iframe_title :: UseIframeTitle ,] } } diff --git a/crates/rome_js_analyze/src/semantic_analyzers/nursery/use_iframe_title.rs b/crates/rome_js_analyze/src/semantic_analyzers/a11y/use_iframe_title.rs similarity index 100% rename from crates/rome_js_analyze/src/semantic_analyzers/nursery/use_iframe_title.rs rename to crates/rome_js_analyze/src/semantic_analyzers/a11y/use_iframe_title.rs diff --git a/crates/rome_js_analyze/src/semantic_analyzers/correctness.rs b/crates/rome_js_analyze/src/semantic_analyzers/correctness.rs index 1ce272173c7..0b80e51023f 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/correctness.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/correctness.rs @@ -3,8 +3,9 @@ use rome_analyze::declare_group; mod no_children_prop; mod no_const_assign; +mod no_global_object_calls; mod no_render_return_value; mod no_undeclared_variables; mod no_unused_variables; mod no_void_elements_with_children; -declare_group! { pub (crate) Correctness { name : "correctness" , rules : [self :: no_children_prop :: NoChildrenProp , self :: no_const_assign :: NoConstAssign , self :: no_render_return_value :: NoRenderReturnValue , self :: no_undeclared_variables :: NoUndeclaredVariables , self :: no_unused_variables :: NoUnusedVariables , self :: no_void_elements_with_children :: NoVoidElementsWithChildren ,] } } +declare_group! { pub (crate) Correctness { name : "correctness" , rules : [self :: no_children_prop :: NoChildrenProp , self :: no_const_assign :: NoConstAssign , self :: no_global_object_calls :: NoGlobalObjectCalls , self :: no_render_return_value :: NoRenderReturnValue , self :: no_undeclared_variables :: NoUndeclaredVariables , self :: no_unused_variables :: NoUnusedVariables , self :: no_void_elements_with_children :: NoVoidElementsWithChildren ,] } } diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_global_object_calls.rs b/crates/rome_js_analyze/src/semantic_analyzers/correctness/no_global_object_calls.rs similarity index 100% rename from crates/rome_js_analyze/src/analyzers/nursery/no_global_object_calls.rs rename to crates/rome_js_analyze/src/semantic_analyzers/correctness/no_global_object_calls.rs diff --git a/crates/rome_js_analyze/src/semantic_analyzers/nursery.rs b/crates/rome_js_analyze/src/semantic_analyzers/nursery.rs index e3cdee69765..4b681b226fc 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/nursery.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/nursery.rs @@ -2,14 +2,9 @@ use rome_analyze::declare_group; mod no_accumulating_spread; -mod no_class_assign; mod no_console_log; mod no_constant_condition; -mod no_parameter_assign; -mod no_redeclare; -mod no_restricted_globals; mod use_camel_case; mod use_exhaustive_dependencies; mod use_hook_at_top_level; -mod use_iframe_title; -declare_group! { pub (crate) Nursery { name : "nursery" , rules : [self :: no_accumulating_spread :: NoAccumulatingSpread , self :: no_class_assign :: NoClassAssign , self :: no_console_log :: NoConsoleLog , self :: no_constant_condition :: NoConstantCondition , self :: no_parameter_assign :: NoParameterAssign , self :: no_redeclare :: NoRedeclare , self :: no_restricted_globals :: NoRestrictedGlobals , self :: use_camel_case :: UseCamelCase , self :: use_exhaustive_dependencies :: UseExhaustiveDependencies , self :: use_hook_at_top_level :: UseHookAtTopLevel , self :: use_iframe_title :: UseIframeTitle ,] } } +declare_group! { pub (crate) Nursery { name : "nursery" , rules : [self :: no_accumulating_spread :: NoAccumulatingSpread , self :: no_console_log :: NoConsoleLog , self :: no_constant_condition :: NoConstantCondition , self :: use_camel_case :: UseCamelCase , self :: use_exhaustive_dependencies :: UseExhaustiveDependencies , self :: use_hook_at_top_level :: UseHookAtTopLevel ,] } } diff --git a/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_accumulating_spread.rs b/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_accumulating_spread.rs index a16688ef4f4..9ff018173fe 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_accumulating_spread.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_accumulating_spread.rs @@ -46,7 +46,7 @@ declare_rule! { /// ``` /// pub(crate) NoAccumulatingSpread { - version: "next", + version: "12.1.0", name: "noAccumulatingSpread", recommended: false, } diff --git a/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_console_log.rs b/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_console_log.rs index 85384accf89..ae4e354beb3 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_console_log.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_console_log.rs @@ -28,7 +28,7 @@ declare_rule! { /// ``` /// pub(crate) NoConsoleLog { - version: "next", + version: "12.1.0", name: "noConsoleLog", recommended: false, } diff --git a/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_constant_condition.rs b/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_constant_condition.rs index 645586c12b6..bcfc5817bca 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_constant_condition.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_constant_condition.rs @@ -74,7 +74,7 @@ declare_rule! { /// ``` /// pub(crate) NoConstantCondition { - version: "next", + version: "12.1.0", name: "noConstantCondition", recommended: true, } diff --git a/crates/rome_js_analyze/src/semantic_analyzers/style.rs b/crates/rome_js_analyze/src/semantic_analyzers/style.rs index f4285e33f5f..d6121e1ca50 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/style.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/style.rs @@ -2,8 +2,10 @@ use rome_analyze::declare_group; mod no_arguments; +mod no_parameter_assign; +mod no_restricted_globals; mod no_shouty_constants; mod no_var; mod use_const; mod use_fragment_syntax; -declare_group! { pub (crate) Style { name : "style" , rules : [self :: no_arguments :: NoArguments , self :: no_shouty_constants :: NoShoutyConstants , self :: no_var :: NoVar , self :: use_const :: UseConst , self :: use_fragment_syntax :: UseFragmentSyntax ,] } } +declare_group! { pub (crate) Style { name : "style" , rules : [self :: no_arguments :: NoArguments , self :: no_parameter_assign :: NoParameterAssign , self :: no_restricted_globals :: NoRestrictedGlobals , self :: no_shouty_constants :: NoShoutyConstants , self :: no_var :: NoVar , self :: use_const :: UseConst , self :: use_fragment_syntax :: UseFragmentSyntax ,] } } diff --git a/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_parameter_assign.rs b/crates/rome_js_analyze/src/semantic_analyzers/style/no_parameter_assign.rs similarity index 100% rename from crates/rome_js_analyze/src/semantic_analyzers/nursery/no_parameter_assign.rs rename to crates/rome_js_analyze/src/semantic_analyzers/style/no_parameter_assign.rs diff --git a/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_restricted_globals.rs b/crates/rome_js_analyze/src/semantic_analyzers/style/no_restricted_globals.rs similarity index 100% rename from crates/rome_js_analyze/src/semantic_analyzers/nursery/no_restricted_globals.rs rename to crates/rome_js_analyze/src/semantic_analyzers/style/no_restricted_globals.rs diff --git a/crates/rome_js_analyze/src/semantic_analyzers/suspicious.rs b/crates/rome_js_analyze/src/semantic_analyzers/suspicious.rs index 36b115f18dd..545b072dabc 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/suspicious.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/suspicious.rs @@ -3,8 +3,10 @@ use rome_analyze::declare_group; mod no_array_index_key; mod no_catch_assign; +mod no_class_assign; mod no_duplicate_parameters; mod no_function_assign; mod no_import_assign; mod no_label_var; -declare_group! { pub (crate) Suspicious { name : "suspicious" , rules : [self :: no_array_index_key :: NoArrayIndexKey , self :: no_catch_assign :: NoCatchAssign , self :: no_duplicate_parameters :: NoDuplicateParameters , self :: no_function_assign :: NoFunctionAssign , self :: no_import_assign :: NoImportAssign , self :: no_label_var :: NoLabelVar ,] } } +mod no_redeclare; +declare_group! { pub (crate) Suspicious { name : "suspicious" , rules : [self :: no_array_index_key :: NoArrayIndexKey , self :: no_catch_assign :: NoCatchAssign , self :: no_class_assign :: NoClassAssign , self :: no_duplicate_parameters :: NoDuplicateParameters , self :: no_function_assign :: NoFunctionAssign , self :: no_import_assign :: NoImportAssign , self :: no_label_var :: NoLabelVar , self :: no_redeclare :: NoRedeclare ,] } } diff --git a/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_class_assign.rs b/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_class_assign.rs similarity index 100% rename from crates/rome_js_analyze/src/semantic_analyzers/nursery/no_class_assign.rs rename to crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_class_assign.rs diff --git a/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_redeclare.rs b/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_redeclare.rs similarity index 100% rename from crates/rome_js_analyze/src/semantic_analyzers/nursery/no_redeclare.rs rename to crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_redeclare.rs diff --git a/crates/rome_js_analyze/tests/specs/nursery/noNoninteractiveElementToInteractiveRole/invalid.jsx b/crates/rome_js_analyze/tests/specs/a11y/noNoninteractiveElementToInteractiveRole/invalid.jsx similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noNoninteractiveElementToInteractiveRole/invalid.jsx rename to crates/rome_js_analyze/tests/specs/a11y/noNoninteractiveElementToInteractiveRole/invalid.jsx diff --git a/crates/rome_js_analyze/tests/specs/nursery/noNoninteractiveElementToInteractiveRole/invalid.jsx.snap b/crates/rome_js_analyze/tests/specs/a11y/noNoninteractiveElementToInteractiveRole/invalid.jsx.snap similarity index 72% rename from crates/rome_js_analyze/tests/specs/nursery/noNoninteractiveElementToInteractiveRole/invalid.jsx.snap rename to crates/rome_js_analyze/tests/specs/a11y/noNoninteractiveElementToInteractiveRole/invalid.jsx.snap index de9ee6e8b46..08fe44999ba 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noNoninteractiveElementToInteractiveRole/invalid.jsx.snap +++ b/crates/rome_js_analyze/tests/specs/a11y/noNoninteractiveElementToInteractiveRole/invalid.jsx.snap @@ -1,5 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs +assertion_line: 96 expression: invalid.jsx --- # Input @@ -17,7 +18,7 @@ var a =

; # Diagnostics ``` -invalid.jsx:1:13 lint/nursery/noNoninteractiveElementToInteractiveRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:1:13 lint/a11y/noNoninteractiveElementToInteractiveRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The HTML element h1 is non-interactive and should not have an interactive role. @@ -32,7 +33,7 @@ invalid.jsx:1:13 lint/nursery/noNoninteractiveElementToInteractiveRole ━━━ ``` ``` -invalid.jsx:2:13 lint/nursery/noNoninteractiveElementToInteractiveRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:2:13 lint/a11y/noNoninteractiveElementToInteractiveRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The HTML element h1 is non-interactive and should not have an interactive role. @@ -48,7 +49,7 @@ invalid.jsx:2:13 lint/nursery/noNoninteractiveElementToInteractiveRole ━━━ ``` ``` -invalid.jsx:3:13 lint/nursery/noNoninteractiveElementToInteractiveRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:3:13 lint/a11y/noNoninteractiveElementToInteractiveRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The HTML element h1 is non-interactive and should not have an interactive role. @@ -65,7 +66,7 @@ invalid.jsx:3:13 lint/nursery/noNoninteractiveElementToInteractiveRole ━━━ ``` ``` -invalid.jsx:4:13 lint/nursery/noNoninteractiveElementToInteractiveRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:4:13 lint/a11y/noNoninteractiveElementToInteractiveRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The HTML element h1 is non-interactive and should not have an interactive role. @@ -82,7 +83,7 @@ invalid.jsx:4:13 lint/nursery/noNoninteractiveElementToInteractiveRole ━━━ ``` ``` -invalid.jsx:5:13 lint/nursery/noNoninteractiveElementToInteractiveRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:5:13 lint/a11y/noNoninteractiveElementToInteractiveRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The HTML element h1 is non-interactive and should not have an interactive role. @@ -99,7 +100,7 @@ invalid.jsx:5:13 lint/nursery/noNoninteractiveElementToInteractiveRole ━━━ ``` ``` -invalid.jsx:6:13 lint/nursery/noNoninteractiveElementToInteractiveRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:6:13 lint/a11y/noNoninteractiveElementToInteractiveRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The HTML element h1 is non-interactive and should not have an interactive role. @@ -116,7 +117,7 @@ invalid.jsx:6:13 lint/nursery/noNoninteractiveElementToInteractiveRole ━━━ ``` ``` -invalid.jsx:7:13 lint/nursery/noNoninteractiveElementToInteractiveRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:7:13 lint/a11y/noNoninteractiveElementToInteractiveRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The HTML element h1 is non-interactive and should not have an interactive role. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noNoninteractiveElementToInteractiveRole/valid.jsx b/crates/rome_js_analyze/tests/specs/a11y/noNoninteractiveElementToInteractiveRole/valid.jsx similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noNoninteractiveElementToInteractiveRole/valid.jsx rename to crates/rome_js_analyze/tests/specs/a11y/noNoninteractiveElementToInteractiveRole/valid.jsx diff --git a/crates/rome_js_analyze/tests/specs/nursery/noNoninteractiveElementToInteractiveRole/valid.jsx.snap b/crates/rome_js_analyze/tests/specs/a11y/noNoninteractiveElementToInteractiveRole/valid.jsx.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noNoninteractiveElementToInteractiveRole/valid.jsx.snap rename to crates/rome_js_analyze/tests/specs/a11y/noNoninteractiveElementToInteractiveRole/valid.jsx.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noRedundantAlt/invalid.jsx b/crates/rome_js_analyze/tests/specs/a11y/noRedundantAlt/invalid.jsx similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noRedundantAlt/invalid.jsx rename to crates/rome_js_analyze/tests/specs/a11y/noRedundantAlt/invalid.jsx diff --git a/crates/rome_js_analyze/tests/specs/nursery/noRedundantAlt/invalid.jsx.snap b/crates/rome_js_analyze/tests/specs/a11y/noRedundantAlt/invalid.jsx.snap similarity index 89% rename from crates/rome_js_analyze/tests/specs/nursery/noRedundantAlt/invalid.jsx.snap rename to crates/rome_js_analyze/tests/specs/a11y/noRedundantAlt/invalid.jsx.snap index d68eb673c67..aae7f0e2199 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noRedundantAlt/invalid.jsx.snap +++ b/crates/rome_js_analyze/tests/specs/a11y/noRedundantAlt/invalid.jsx.snap @@ -1,5 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs +assertion_line: 96 expression: invalid.jsx --- # Input @@ -29,7 +30,7 @@ let a = {`image; # Diagnostics ``` -invalid.jsx:1:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:1:18 lint/a11y/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the words "image", "picture", or "photo" in img element alt text. @@ -44,7 +45,7 @@ invalid.jsx:1:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━ ``` ``` -invalid.jsx:2:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:2:18 lint/a11y/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the words "image", "picture", or "photo" in img element alt text. @@ -60,7 +61,7 @@ invalid.jsx:2:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━ ``` ``` -invalid.jsx:3:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:3:18 lint/a11y/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the words "image", "picture", or "photo" in img element alt text. @@ -77,7 +78,7 @@ invalid.jsx:3:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━ ``` ``` -invalid.jsx:4:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:4:18 lint/a11y/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the words "image", "picture", or "photo" in img element alt text. @@ -94,7 +95,7 @@ invalid.jsx:4:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━ ``` ``` -invalid.jsx:5:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:5:18 lint/a11y/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the words "image", "picture", or "photo" in img element alt text. @@ -111,7 +112,7 @@ invalid.jsx:5:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━ ``` ``` -invalid.jsx:6:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:6:18 lint/a11y/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the words "image", "picture", or "photo" in img element alt text. @@ -128,7 +129,7 @@ invalid.jsx:6:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━ ``` ``` -invalid.jsx:7:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:7:18 lint/a11y/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the words "image", "picture", or "photo" in img element alt text. @@ -145,7 +146,7 @@ invalid.jsx:7:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━ ``` ``` -invalid.jsx:8:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:8:18 lint/a11y/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the words "image", "picture", or "photo" in img element alt text. @@ -162,7 +163,7 @@ invalid.jsx:8:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━ ``` ``` -invalid.jsx:9:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:9:18 lint/a11y/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the words "image", "picture", or "photo" in img element alt text. @@ -179,7 +180,7 @@ invalid.jsx:9:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━ ``` ``` -invalid.jsx:10:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:10:18 lint/a11y/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the words "image", "picture", or "photo" in img element alt text. @@ -196,7 +197,7 @@ invalid.jsx:10:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━ ``` ``` -invalid.jsx:11:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:11:18 lint/a11y/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the words "image", "picture", or "photo" in img element alt text. @@ -213,7 +214,7 @@ invalid.jsx:11:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━ ``` ``` -invalid.jsx:12:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:12:18 lint/a11y/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the words "image", "picture", or "photo" in img element alt text. @@ -230,7 +231,7 @@ invalid.jsx:12:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━ ``` ``` -invalid.jsx:13:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:13:18 lint/a11y/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the words "image", "picture", or "photo" in img element alt text. @@ -247,7 +248,7 @@ invalid.jsx:13:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━ ``` ``` -invalid.jsx:14:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:14:18 lint/a11y/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the words "image", "picture", or "photo" in img element alt text. @@ -264,7 +265,7 @@ invalid.jsx:14:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━ ``` ``` -invalid.jsx:15:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:15:18 lint/a11y/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the words "image", "picture", or "photo" in img element alt text. @@ -281,7 +282,7 @@ invalid.jsx:15:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━ ``` ``` -invalid.jsx:16:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:16:18 lint/a11y/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the words "image", "picture", or "photo" in img element alt text. @@ -298,7 +299,7 @@ invalid.jsx:16:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━ ``` ``` -invalid.jsx:17:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:17:18 lint/a11y/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the words "image", "picture", or "photo" in img element alt text. @@ -315,7 +316,7 @@ invalid.jsx:17:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━ ``` ``` -invalid.jsx:18:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:18:18 lint/a11y/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the words "image", "picture", or "photo" in img element alt text. @@ -332,7 +333,7 @@ invalid.jsx:18:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━ ``` ``` -invalid.jsx:19:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:19:18 lint/a11y/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the words "image", "picture", or "photo" in img element alt text. @@ -349,7 +350,7 @@ invalid.jsx:19:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━ ``` ``` -invalid.jsx:20:18 lint/nursery/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:20:18 lint/a11y/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Avoid the words "image", "picture", or "photo" in img element alt text. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noRedundantAlt/valid.jsx b/crates/rome_js_analyze/tests/specs/a11y/noRedundantAlt/valid.jsx similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noRedundantAlt/valid.jsx rename to crates/rome_js_analyze/tests/specs/a11y/noRedundantAlt/valid.jsx diff --git a/crates/rome_js_analyze/tests/specs/nursery/noRedundantAlt/valid.jsx.snap b/crates/rome_js_analyze/tests/specs/a11y/noRedundantAlt/valid.jsx.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noRedundantAlt/valid.jsx.snap rename to crates/rome_js_analyze/tests/specs/a11y/noRedundantAlt/valid.jsx.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noSvgWithoutTitle/invalid.jsx b/crates/rome_js_analyze/tests/specs/a11y/noSvgWithoutTitle/invalid.jsx similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noSvgWithoutTitle/invalid.jsx rename to crates/rome_js_analyze/tests/specs/a11y/noSvgWithoutTitle/invalid.jsx diff --git a/crates/rome_js_analyze/tests/specs/nursery/noSvgWithoutTitle/invalid.jsx.snap b/crates/rome_js_analyze/tests/specs/a11y/noSvgWithoutTitle/invalid.jsx.snap similarity index 88% rename from crates/rome_js_analyze/tests/specs/nursery/noSvgWithoutTitle/invalid.jsx.snap rename to crates/rome_js_analyze/tests/specs/a11y/noSvgWithoutTitle/invalid.jsx.snap index e8b24f142db..c9706b5eba8 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noSvgWithoutTitle/invalid.jsx.snap +++ b/crates/rome_js_analyze/tests/specs/a11y/noSvgWithoutTitle/invalid.jsx.snap @@ -1,5 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs +assertion_line: 96 expression: invalid.jsx --- # Input @@ -25,7 +26,7 @@ expression: invalid.jsx # Diagnostics ``` -invalid.jsx:2:2 lint/nursery/noSvgWithoutTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:2:2 lint/a11y/noSvgWithoutTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Alternative text title element cannot be empty @@ -42,7 +43,7 @@ invalid.jsx:2:2 lint/nursery/noSvgWithoutTitle ━━━━━━━━━━━ ``` ``` -invalid.jsx:3:2 lint/nursery/noSvgWithoutTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:3:2 lint/a11y/noSvgWithoutTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Alternative text title element cannot be empty @@ -60,7 +61,7 @@ invalid.jsx:3:2 lint/nursery/noSvgWithoutTitle ━━━━━━━━━━━ ``` ``` -invalid.jsx:7:2 lint/nursery/noSvgWithoutTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:7:2 lint/a11y/noSvgWithoutTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Alternative text title element cannot be empty @@ -78,7 +79,7 @@ invalid.jsx:7:2 lint/nursery/noSvgWithoutTitle ━━━━━━━━━━━ ``` ``` -invalid.jsx:10:2 lint/nursery/noSvgWithoutTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:10:2 lint/a11y/noSvgWithoutTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Alternative text title element cannot be empty @@ -96,7 +97,7 @@ invalid.jsx:10:2 lint/nursery/noSvgWithoutTitle ━━━━━━━━━━ ``` ``` -invalid.jsx:13:2 lint/nursery/noSvgWithoutTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:13:2 lint/a11y/noSvgWithoutTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Alternative text title element cannot be empty diff --git a/crates/rome_js_analyze/tests/specs/nursery/noSvgWithoutTitle/valid.jsx b/crates/rome_js_analyze/tests/specs/a11y/noSvgWithoutTitle/valid.jsx similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noSvgWithoutTitle/valid.jsx rename to crates/rome_js_analyze/tests/specs/a11y/noSvgWithoutTitle/valid.jsx diff --git a/crates/rome_js_analyze/tests/specs/nursery/noSvgWithoutTitle/valid.jsx.snap b/crates/rome_js_analyze/tests/specs/a11y/noSvgWithoutTitle/valid.jsx.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noSvgWithoutTitle/valid.jsx.snap rename to crates/rome_js_analyze/tests/specs/a11y/noSvgWithoutTitle/valid.jsx.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/useAriaPropsForRole/invalid.jsx b/crates/rome_js_analyze/tests/specs/a11y/useAriaPropsForRole/invalid.jsx similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/useAriaPropsForRole/invalid.jsx rename to crates/rome_js_analyze/tests/specs/a11y/useAriaPropsForRole/invalid.jsx diff --git a/crates/rome_js_analyze/tests/specs/nursery/useAriaPropsForRole/invalid.jsx.snap b/crates/rome_js_analyze/tests/specs/a11y/useAriaPropsForRole/invalid.jsx.snap similarity index 90% rename from crates/rome_js_analyze/tests/specs/nursery/useAriaPropsForRole/invalid.jsx.snap rename to crates/rome_js_analyze/tests/specs/a11y/useAriaPropsForRole/invalid.jsx.snap index fa05166947d..fc002ff06f0 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/useAriaPropsForRole/invalid.jsx.snap +++ b/crates/rome_js_analyze/tests/specs/a11y/useAriaPropsForRole/invalid.jsx.snap @@ -1,5 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs +assertion_line: 96 expression: invalid.jsx --- # Input @@ -32,7 +33,7 @@ var a = ; # Diagnostics ``` -invalid.jsx:1:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:1:15 lint/a11y/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The element with the checkbox ARIA role does not have the required ARIA attributes. @@ -49,7 +50,7 @@ invalid.jsx:1:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━━ ``` ``` -invalid.jsx:2:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:2:15 lint/a11y/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The element with the switch ARIA role does not have the required ARIA attributes. @@ -67,7 +68,7 @@ invalid.jsx:2:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━━ ``` ``` -invalid.jsx:3:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:3:15 lint/a11y/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The element with the spinbutton ARIA role does not have the required ARIA attributes. @@ -88,7 +89,7 @@ invalid.jsx:3:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━━ ``` ``` -invalid.jsx:4:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:4:15 lint/a11y/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The element with the spinbutton ARIA role does not have the required ARIA attributes. @@ -108,7 +109,7 @@ invalid.jsx:4:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━━ ``` ``` -invalid.jsx:5:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:5:15 lint/a11y/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The element with the spinbutton ARIA role does not have the required ARIA attributes. @@ -128,7 +129,7 @@ invalid.jsx:5:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━━ ``` ``` -invalid.jsx:6:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:6:15 lint/a11y/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The element with the spinbutton ARIA role does not have the required ARIA attributes. @@ -147,7 +148,7 @@ invalid.jsx:6:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━━ ``` ``` -invalid.jsx:7:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:7:15 lint/a11y/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The element with the slider ARIA role does not have the required ARIA attributes. @@ -167,7 +168,7 @@ invalid.jsx:7:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━━ ``` ``` -invalid.jsx:8:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:8:15 lint/a11y/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The element with the slider ARIA role does not have the required ARIA attributes. @@ -187,7 +188,7 @@ invalid.jsx:8:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━━ ``` ``` -invalid.jsx:9:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:9:15 lint/a11y/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The element with the slider ARIA role does not have the required ARIA attributes. @@ -206,7 +207,7 @@ invalid.jsx:9:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━━ ``` ``` -invalid.jsx:10:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:10:15 lint/a11y/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The element with the separator ARIA role does not have the required ARIA attributes. @@ -226,7 +227,7 @@ invalid.jsx:10:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━ ``` ``` -invalid.jsx:11:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:11:15 lint/a11y/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The element with the separator ARIA role does not have the required ARIA attributes. @@ -246,7 +247,7 @@ invalid.jsx:11:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━ ``` ``` -invalid.jsx:12:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:12:15 lint/a11y/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The element with the separator ARIA role does not have the required ARIA attributes. @@ -265,7 +266,7 @@ invalid.jsx:12:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━ ``` ``` -invalid.jsx:13:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:13:15 lint/a11y/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The element with the scrollbar ARIA role does not have the required ARIA attributes. @@ -287,7 +288,7 @@ invalid.jsx:13:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━ ``` ``` -invalid.jsx:14:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:14:15 lint/a11y/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The element with the scrollbar ARIA role does not have the required ARIA attributes. @@ -309,7 +310,7 @@ invalid.jsx:14:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━ ``` ``` -invalid.jsx:15:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:15:15 lint/a11y/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The element with the scrollbar ARIA role does not have the required ARIA attributes. @@ -330,7 +331,7 @@ invalid.jsx:15:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━ ``` ``` -invalid.jsx:16:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:16:15 lint/a11y/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The element with the scrollbar ARIA role does not have the required ARIA attributes. @@ -350,7 +351,7 @@ invalid.jsx:16:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━ ``` ``` -invalid.jsx:17:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:17:15 lint/a11y/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The element with the radio ARIA role does not have the required ARIA attributes. @@ -369,7 +370,7 @@ invalid.jsx:17:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━ ``` ``` -invalid.jsx:18:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:18:15 lint/a11y/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The element with the option ARIA role does not have the required ARIA attributes. @@ -388,7 +389,7 @@ invalid.jsx:18:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━ ``` ``` -invalid.jsx:19:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:19:15 lint/a11y/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The element with the heading ARIA role does not have the required ARIA attributes. @@ -407,7 +408,7 @@ invalid.jsx:19:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━ ``` ``` -invalid.jsx:20:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:20:15 lint/a11y/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The element with the combobox ARIA role does not have the required ARIA attributes. @@ -427,7 +428,7 @@ invalid.jsx:20:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━ ``` ``` -invalid.jsx:21:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:21:15 lint/a11y/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The element with the combobox ARIA role does not have the required ARIA attributes. @@ -446,7 +447,7 @@ invalid.jsx:21:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━ ``` ``` -invalid.jsx:22:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:22:15 lint/a11y/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The element with the combobox ARIA role does not have the required ARIA attributes. @@ -465,7 +466,7 @@ invalid.jsx:22:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━ ``` ``` -invalid.jsx:23:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:23:15 lint/a11y/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The element with the menuitemcheckbox ARIA role does not have the required ARIA attributes. @@ -483,7 +484,7 @@ invalid.jsx:23:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━ ``` ``` -invalid.jsx:24:15 lint/nursery/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:24:15 lint/a11y/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The element with the menuitemradio ARIA role does not have the required ARIA attributes. diff --git a/crates/rome_js_analyze/tests/specs/nursery/useAriaPropsForRole/valid.jsx b/crates/rome_js_analyze/tests/specs/a11y/useAriaPropsForRole/valid.jsx similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/useAriaPropsForRole/valid.jsx rename to crates/rome_js_analyze/tests/specs/a11y/useAriaPropsForRole/valid.jsx diff --git a/crates/rome_js_analyze/tests/specs/nursery/useAriaPropsForRole/valid.jsx.snap b/crates/rome_js_analyze/tests/specs/a11y/useAriaPropsForRole/valid.jsx.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/useAriaPropsForRole/valid.jsx.snap rename to crates/rome_js_analyze/tests/specs/a11y/useAriaPropsForRole/valid.jsx.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/useIframeTitle/invalid.jsx b/crates/rome_js_analyze/tests/specs/a11y/useIframeTitle/invalid.jsx similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/useIframeTitle/invalid.jsx rename to crates/rome_js_analyze/tests/specs/a11y/useIframeTitle/invalid.jsx diff --git a/crates/rome_js_analyze/tests/specs/nursery/useIframeTitle/invalid.jsx.snap b/crates/rome_js_analyze/tests/specs/a11y/useIframeTitle/invalid.jsx.snap similarity index 85% rename from crates/rome_js_analyze/tests/specs/nursery/useIframeTitle/invalid.jsx.snap rename to crates/rome_js_analyze/tests/specs/a11y/useIframeTitle/invalid.jsx.snap index 24b66e4dd2f..8d6c24f6a58 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/useIframeTitle/invalid.jsx.snap +++ b/crates/rome_js_analyze/tests/specs/a11y/useIframeTitle/invalid.jsx.snap @@ -1,5 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs +assertion_line: 96 expression: invalid.jsx --- # Input @@ -22,7 +23,7 @@ expression: invalid.jsx # Diagnostics ``` -invalid.jsx:3:2 lint/nursery/useIframeTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:3:2 lint/a11y/useIframeTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a title attribute when using iframe elements. @@ -39,7 +40,7 @@ invalid.jsx:3:2 lint/nursery/useIframeTitle ━━━━━━━━━━━━ ``` ``` -invalid.jsx:4:2 lint/nursery/useIframeTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:4:2 lint/a11y/useIframeTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a title attribute when using iframe elements. @@ -56,7 +57,7 @@ invalid.jsx:4:2 lint/nursery/useIframeTitle ━━━━━━━━━━━━ ``` ``` -invalid.jsx:5:2 lint/nursery/useIframeTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:5:2 lint/a11y/useIframeTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a title attribute when using iframe elements. @@ -73,7 +74,7 @@ invalid.jsx:5:2 lint/nursery/useIframeTitle ━━━━━━━━━━━━ ``` ``` -invalid.jsx:6:2 lint/nursery/useIframeTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:6:2 lint/a11y/useIframeTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a title attribute when using iframe elements. @@ -90,7 +91,7 @@ invalid.jsx:6:2 lint/nursery/useIframeTitle ━━━━━━━━━━━━ ``` ``` -invalid.jsx:7:2 lint/nursery/useIframeTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:7:2 lint/a11y/useIframeTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a title attribute when using iframe elements. @@ -107,7 +108,7 @@ invalid.jsx:7:2 lint/nursery/useIframeTitle ━━━━━━━━━━━━ ``` ``` -invalid.jsx:8:2 lint/nursery/useIframeTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:8:2 lint/a11y/useIframeTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a title attribute when using iframe elements. @@ -124,7 +125,7 @@ invalid.jsx:8:2 lint/nursery/useIframeTitle ━━━━━━━━━━━━ ``` ``` -invalid.jsx:9:2 lint/nursery/useIframeTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:9:2 lint/a11y/useIframeTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a title attribute when using iframe elements. @@ -141,7 +142,7 @@ invalid.jsx:9:2 lint/nursery/useIframeTitle ━━━━━━━━━━━━ ``` ``` -invalid.jsx:10:2 lint/nursery/useIframeTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:10:2 lint/a11y/useIframeTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a title attribute when using iframe elements. @@ -158,7 +159,7 @@ invalid.jsx:10:2 lint/nursery/useIframeTitle ━━━━━━━━━━━ ``` ``` -invalid.jsx:11:2 lint/nursery/useIframeTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:11:2 lint/a11y/useIframeTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a title attribute when using iframe elements. @@ -175,7 +176,7 @@ invalid.jsx:11:2 lint/nursery/useIframeTitle ━━━━━━━━━━━ ``` ``` -invalid.jsx:12:2 lint/nursery/useIframeTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:12:2 lint/a11y/useIframeTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a title attribute when using iframe elements. diff --git a/crates/rome_js_analyze/tests/specs/nursery/useIframeTitle/valid.jsx b/crates/rome_js_analyze/tests/specs/a11y/useIframeTitle/valid.jsx similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/useIframeTitle/valid.jsx rename to crates/rome_js_analyze/tests/specs/a11y/useIframeTitle/valid.jsx diff --git a/crates/rome_js_analyze/tests/specs/nursery/useIframeTitle/valid.jsx.snap b/crates/rome_js_analyze/tests/specs/a11y/useIframeTitle/valid.jsx.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/useIframeTitle/valid.jsx.snap rename to crates/rome_js_analyze/tests/specs/a11y/useIframeTitle/valid.jsx.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/useMediaCaption/invalid.jsx b/crates/rome_js_analyze/tests/specs/a11y/useMediaCaption/invalid.jsx similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/useMediaCaption/invalid.jsx rename to crates/rome_js_analyze/tests/specs/a11y/useMediaCaption/invalid.jsx diff --git a/crates/rome_js_analyze/tests/specs/nursery/useMediaCaption/invalid.jsx.snap b/crates/rome_js_analyze/tests/specs/a11y/useMediaCaption/invalid.jsx.snap similarity index 87% rename from crates/rome_js_analyze/tests/specs/nursery/useMediaCaption/invalid.jsx.snap rename to crates/rome_js_analyze/tests/specs/a11y/useMediaCaption/invalid.jsx.snap index 9f0de1774f8..647091e8026 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/useMediaCaption/invalid.jsx.snap +++ b/crates/rome_js_analyze/tests/specs/a11y/useMediaCaption/invalid.jsx.snap @@ -1,6 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs -assertion_line: 92 +assertion_line: 96 expression: invalid.jsx --- # Input @@ -20,7 +20,7 @@ expression: invalid.jsx # Diagnostics ``` -invalid.jsx:2:2 lint/nursery/useMediaCaption ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:2:2 lint/a11y/useMediaCaption ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a track for captions when using audio or video elements. @@ -36,7 +36,7 @@ invalid.jsx:2:2 lint/nursery/useMediaCaption ━━━━━━━━━━━ ``` ``` -invalid.jsx:3:2 lint/nursery/useMediaCaption ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:3:2 lint/a11y/useMediaCaption ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a track for captions when using audio or video elements. @@ -53,7 +53,7 @@ invalid.jsx:3:2 lint/nursery/useMediaCaption ━━━━━━━━━━━ ``` ``` -invalid.jsx:4:2 lint/nursery/useMediaCaption ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:4:2 lint/a11y/useMediaCaption ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a track for captions when using audio or video elements. @@ -70,7 +70,7 @@ invalid.jsx:4:2 lint/nursery/useMediaCaption ━━━━━━━━━━━ ``` ``` -invalid.jsx:5:2 lint/nursery/useMediaCaption ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:5:2 lint/a11y/useMediaCaption ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a track for captions when using audio or video elements. @@ -87,7 +87,7 @@ invalid.jsx:5:2 lint/nursery/useMediaCaption ━━━━━━━━━━━ ``` ``` -invalid.jsx:6:2 lint/nursery/useMediaCaption ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:6:2 lint/a11y/useMediaCaption ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a track for captions when using audio or video elements. @@ -104,7 +104,7 @@ invalid.jsx:6:2 lint/nursery/useMediaCaption ━━━━━━━━━━━ ``` ``` -invalid.jsx:7:2 lint/nursery/useMediaCaption ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:7:2 lint/a11y/useMediaCaption ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a track for captions when using audio or video elements. @@ -121,7 +121,7 @@ invalid.jsx:7:2 lint/nursery/useMediaCaption ━━━━━━━━━━━ ``` ``` -invalid.jsx:8:2 lint/nursery/useMediaCaption ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:8:2 lint/a11y/useMediaCaption ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a track for captions when using audio or video elements. @@ -138,7 +138,7 @@ invalid.jsx:8:2 lint/nursery/useMediaCaption ━━━━━━━━━━━ ``` ``` -invalid.jsx:9:2 lint/nursery/useMediaCaption ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:9:2 lint/a11y/useMediaCaption ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a track for captions when using audio or video elements. diff --git a/crates/rome_js_analyze/tests/specs/nursery/useMediaCaption/valid.jsx b/crates/rome_js_analyze/tests/specs/a11y/useMediaCaption/valid.jsx similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/useMediaCaption/valid.jsx rename to crates/rome_js_analyze/tests/specs/a11y/useMediaCaption/valid.jsx diff --git a/crates/rome_js_analyze/tests/specs/nursery/useMediaCaption/valid.jsx.snap b/crates/rome_js_analyze/tests/specs/a11y/useMediaCaption/valid.jsx.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/useMediaCaption/valid.jsx.snap rename to crates/rome_js_analyze/tests/specs/a11y/useMediaCaption/valid.jsx.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/useValidAriaProps/invalid.jsx b/crates/rome_js_analyze/tests/specs/a11y/useValidAriaProps/invalid.jsx similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/useValidAriaProps/invalid.jsx rename to crates/rome_js_analyze/tests/specs/a11y/useValidAriaProps/invalid.jsx diff --git a/crates/rome_js_analyze/tests/specs/nursery/useValidAriaProps/invalid.jsx.snap b/crates/rome_js_analyze/tests/specs/a11y/useValidAriaProps/invalid.jsx.snap similarity index 91% rename from crates/rome_js_analyze/tests/specs/nursery/useValidAriaProps/invalid.jsx.snap rename to crates/rome_js_analyze/tests/specs/a11y/useValidAriaProps/invalid.jsx.snap index 206cfb6fd6a..15c79d5c0c7 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/useValidAriaProps/invalid.jsx.snap +++ b/crates/rome_js_analyze/tests/specs/a11y/useValidAriaProps/invalid.jsx.snap @@ -1,5 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs +assertion_line: 96 expression: invalid.jsx --- # Input @@ -14,7 +15,7 @@ var a =
; # Diagnostics ``` -invalid.jsx:1:9 lint/nursery/useValidAriaProps ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:1:9 lint/a11y/useValidAriaProps ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The element contains invalid ARIA attribute(s) @@ -34,7 +35,7 @@ invalid.jsx:1:9 lint/nursery/useValidAriaProps ━━━━━━━━━━━ ``` ``` -invalid.jsx:2:9 lint/nursery/useValidAriaProps ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:2:9 lint/a11y/useValidAriaProps ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The element contains invalid ARIA attribute(s) @@ -56,7 +57,7 @@ invalid.jsx:2:9 lint/nursery/useValidAriaProps ━━━━━━━━━━━ ``` ``` -invalid.jsx:3:9 lint/nursery/useValidAriaProps ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:3:9 lint/a11y/useValidAriaProps ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The element contains invalid ARIA attribute(s) @@ -80,7 +81,7 @@ invalid.jsx:3:9 lint/nursery/useValidAriaProps ━━━━━━━━━━━ ``` ``` -invalid.jsx:4:9 lint/nursery/useValidAriaProps ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:4:9 lint/a11y/useValidAriaProps ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The element contains invalid ARIA attribute(s) @@ -104,7 +105,7 @@ invalid.jsx:4:9 lint/nursery/useValidAriaProps ━━━━━━━━━━━ ``` ``` -invalid.jsx:5:9 lint/nursery/useValidAriaProps ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:5:9 lint/a11y/useValidAriaProps ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The element contains invalid ARIA attribute(s) diff --git a/crates/rome_js_analyze/tests/specs/nursery/useValidAriaProps/valid.jsx b/crates/rome_js_analyze/tests/specs/a11y/useValidAriaProps/valid.jsx similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/useValidAriaProps/valid.jsx rename to crates/rome_js_analyze/tests/specs/a11y/useValidAriaProps/valid.jsx diff --git a/crates/rome_js_analyze/tests/specs/nursery/useValidAriaProps/valid.jsx.snap b/crates/rome_js_analyze/tests/specs/a11y/useValidAriaProps/valid.jsx.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/useValidAriaProps/valid.jsx.snap rename to crates/rome_js_analyze/tests/specs/a11y/useValidAriaProps/valid.jsx.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/useValidLang/invalid.jsx b/crates/rome_js_analyze/tests/specs/a11y/useValidLang/invalid.jsx similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/useValidLang/invalid.jsx rename to crates/rome_js_analyze/tests/specs/a11y/useValidLang/invalid.jsx diff --git a/crates/rome_js_analyze/tests/specs/nursery/useValidLang/invalid.jsx.snap b/crates/rome_js_analyze/tests/specs/a11y/useValidLang/invalid.jsx.snap similarity index 84% rename from crates/rome_js_analyze/tests/specs/nursery/useValidLang/invalid.jsx.snap rename to crates/rome_js_analyze/tests/specs/a11y/useValidLang/invalid.jsx.snap index d776ffc7dc4..019fa60c15f 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/useValidLang/invalid.jsx.snap +++ b/crates/rome_js_analyze/tests/specs/a11y/useValidLang/invalid.jsx.snap @@ -1,5 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs +assertion_line: 96 expression: invalid.jsx --- # Input @@ -12,7 +13,7 @@ let a = ; # Diagnostics ``` -invalid.jsx:1:20 lint/nursery/useValidLang ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:1:20 lint/a11y/useValidLang ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a valid value for the lang attribute. @@ -43,7 +44,7 @@ invalid.jsx:1:20 lint/nursery/useValidLang ━━━━━━━━━━━━ ``` ``` -invalid.jsx:2:20 lint/nursery/useValidLang ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:2:20 lint/a11y/useValidLang ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a valid value for the lang attribute. @@ -75,7 +76,7 @@ invalid.jsx:2:20 lint/nursery/useValidLang ━━━━━━━━━━━━ ``` ``` -invalid.jsx:3:20 lint/nursery/useValidLang ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsx:3:20 lint/a11y/useValidLang ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a valid value for the lang attribute. diff --git a/crates/rome_js_analyze/tests/specs/nursery/useValidLang/valid.jsx b/crates/rome_js_analyze/tests/specs/a11y/useValidLang/valid.jsx similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/useValidLang/valid.jsx rename to crates/rome_js_analyze/tests/specs/a11y/useValidLang/valid.jsx diff --git a/crates/rome_js_analyze/tests/specs/nursery/useValidLang/valid.jsx.snap b/crates/rome_js_analyze/tests/specs/a11y/useValidLang/valid.jsx.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/useValidLang/valid.jsx.snap rename to crates/rome_js_analyze/tests/specs/a11y/useValidLang/valid.jsx.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noExtraSemicolons/invalid.js b/crates/rome_js_analyze/tests/specs/complexity/noExtraSemicolon/invalid.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noExtraSemicolons/invalid.js rename to crates/rome_js_analyze/tests/specs/complexity/noExtraSemicolon/invalid.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noExtraSemicolons/invalid.js.snap b/crates/rome_js_analyze/tests/specs/complexity/noExtraSemicolon/invalid.js.snap similarity index 71% rename from crates/rome_js_analyze/tests/specs/nursery/noExtraSemicolons/invalid.js.snap rename to crates/rome_js_analyze/tests/specs/complexity/noExtraSemicolon/invalid.js.snap index 378b4d75890..bc0a5ed1c75 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noExtraSemicolons/invalid.js.snap +++ b/crates/rome_js_analyze/tests/specs/complexity/noExtraSemicolon/invalid.js.snap @@ -1,5 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs +assertion_line: 96 expression: invalid.js --- # Input @@ -102,7 +103,7 @@ if (x > 5) { # Diagnostics ``` -invalid.js:6:2 lint/nursery/noExtraSemicolons FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:6:2 lint/complexity/noExtraSemicolon FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary semicolon. @@ -121,7 +122,7 @@ invalid.js:6:2 lint/nursery/noExtraSemicolons FIXABLE ━━━━━━━━ ``` ``` -invalid.js:8:13 lint/nursery/noExtraSemicolons FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:8:13 lint/complexity/noExtraSemicolon FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary semicolon. @@ -140,7 +141,7 @@ invalid.js:8:13 lint/nursery/noExtraSemicolons FIXABLE ━━━━━━━ ``` ``` -invalid.js:10:15 lint/nursery/noExtraSemicolons FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:10:15 lint/complexity/noExtraSemicolon FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary semicolon. @@ -159,7 +160,7 @@ invalid.js:10:15 lint/nursery/noExtraSemicolons FIXABLE ━━━━━━━ ``` ``` -invalid.js:14:17 lint/nursery/noExtraSemicolons FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:14:17 lint/complexity/noExtraSemicolon FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary semicolon. @@ -178,7 +179,7 @@ invalid.js:14:17 lint/nursery/noExtraSemicolons FIXABLE ━━━━━━━ ``` ``` -invalid.js:15:2 lint/nursery/noExtraSemicolons FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:15:2 lint/complexity/noExtraSemicolon FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary semicolon. @@ -197,7 +198,7 @@ invalid.js:15:2 lint/nursery/noExtraSemicolons FIXABLE ━━━━━━━ ``` ``` -invalid.js:23:2 lint/nursery/noExtraSemicolons FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:23:2 lint/complexity/noExtraSemicolon FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary semicolon. @@ -216,7 +217,7 @@ invalid.js:23:2 lint/nursery/noExtraSemicolons FIXABLE ━━━━━━━ ``` ``` -invalid.js:25:18 lint/nursery/noExtraSemicolons FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:25:18 lint/complexity/noExtraSemicolon FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary semicolon. @@ -235,7 +236,7 @@ invalid.js:25:18 lint/nursery/noExtraSemicolons FIXABLE ━━━━━━━ ``` ``` -invalid.js:28:16 lint/nursery/noExtraSemicolons FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:28:16 lint/complexity/noExtraSemicolon FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary semicolon. @@ -253,7 +254,7 @@ invalid.js:28:16 lint/nursery/noExtraSemicolons FIXABLE ━━━━━━━ ``` ``` -invalid.js:31:13 lint/nursery/noExtraSemicolons FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:31:13 lint/complexity/noExtraSemicolon FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary semicolon. @@ -272,7 +273,7 @@ invalid.js:31:13 lint/nursery/noExtraSemicolons FIXABLE ━━━━━━━ ``` ``` -invalid.js:33:61 lint/nursery/noExtraSemicolons FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:33:61 lint/complexity/noExtraSemicolon FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary semicolon. @@ -291,7 +292,7 @@ invalid.js:33:61 lint/nursery/noExtraSemicolons FIXABLE ━━━━━━━ ``` ``` -invalid.js:36:15 lint/nursery/noExtraSemicolons FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:36:15 lint/complexity/noExtraSemicolon FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary semicolon. @@ -309,7 +310,7 @@ invalid.js:36:15 lint/nursery/noExtraSemicolons FIXABLE ━━━━━━━ ``` ``` -invalid.js:41:2 lint/nursery/noExtraSemicolons FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:41:2 lint/complexity/noExtraSemicolon FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary semicolon. @@ -328,7 +329,7 @@ invalid.js:41:2 lint/nursery/noExtraSemicolons FIXABLE ━━━━━━━ ``` ``` -invalid.js:44:11 lint/nursery/noExtraSemicolons FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:44:11 lint/complexity/noExtraSemicolon FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary semicolon. @@ -346,7 +347,7 @@ invalid.js:44:11 lint/nursery/noExtraSemicolons FIXABLE ━━━━━━━ ``` ``` -invalid.js:60:6 lint/nursery/noExtraSemicolons FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:60:6 lint/complexity/noExtraSemicolon FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary semicolon. @@ -365,7 +366,7 @@ invalid.js:60:6 lint/nursery/noExtraSemicolons FIXABLE ━━━━━━━ ``` ``` -invalid.js:76:6 lint/nursery/noExtraSemicolons FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:76:6 lint/complexity/noExtraSemicolon FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary semicolon. @@ -384,7 +385,7 @@ invalid.js:76:6 lint/nursery/noExtraSemicolons FIXABLE ━━━━━━━ ``` ``` -invalid.js:89:2 lint/nursery/noExtraSemicolons FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:89:2 lint/complexity/noExtraSemicolon FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary semicolon. @@ -403,7 +404,7 @@ invalid.js:89:2 lint/nursery/noExtraSemicolons FIXABLE ━━━━━━━ ``` ``` -invalid.js:94:2 lint/nursery/noExtraSemicolons FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:94:2 lint/complexity/noExtraSemicolon FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary semicolon. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noExtraSemicolons/valid.js b/crates/rome_js_analyze/tests/specs/complexity/noExtraSemicolon/valid.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noExtraSemicolons/valid.js rename to crates/rome_js_analyze/tests/specs/complexity/noExtraSemicolon/valid.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noExtraSemicolons/valid.js.snap b/crates/rome_js_analyze/tests/specs/complexity/noExtraSemicolon/valid.js.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noExtraSemicolons/valid.js.snap rename to crates/rome_js_analyze/tests/specs/complexity/noExtraSemicolon/valid.js.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUselessCatch/invalid.js b/crates/rome_js_analyze/tests/specs/complexity/noUselessCatch/invalid.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noUselessCatch/invalid.js rename to crates/rome_js_analyze/tests/specs/complexity/noUselessCatch/invalid.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUselessCatch/invalid.js.snap b/crates/rome_js_analyze/tests/specs/complexity/noUselessCatch/invalid.js.snap similarity index 86% rename from crates/rome_js_analyze/tests/specs/nursery/noUselessCatch/invalid.js.snap rename to crates/rome_js_analyze/tests/specs/complexity/noUselessCatch/invalid.js.snap index 93db1b1a547..52a8d3031c5 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noUselessCatch/invalid.js.snap +++ b/crates/rome_js_analyze/tests/specs/complexity/noUselessCatch/invalid.js.snap @@ -1,5 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs +assertion_line: 96 expression: invalid.js --- # Input @@ -22,7 +23,7 @@ try { # Diagnostics ``` -invalid.js:4:2 lint/nursery/noUselessCatch ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:4:2 lint/complexity/noUselessCatch ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The catch clause that only rethrows the original error is redundant. @@ -39,7 +40,7 @@ invalid.js:4:2 lint/nursery/noUselessCatch ━━━━━━━━━━━━ ``` ``` -invalid.js:10:2 lint/nursery/noUselessCatch ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:10:2 lint/complexity/noUselessCatch ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The catch clause that only rethrows the original error is redundant. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUselessCatch/valid.js b/crates/rome_js_analyze/tests/specs/complexity/noUselessCatch/valid.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noUselessCatch/valid.js rename to crates/rome_js_analyze/tests/specs/complexity/noUselessCatch/valid.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUselessCatch/valid.js.snap b/crates/rome_js_analyze/tests/specs/complexity/noUselessCatch/valid.js.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noUselessCatch/valid.js.snap rename to crates/rome_js_analyze/tests/specs/complexity/noUselessCatch/valid.js.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUselessConstructor/invalid.js b/crates/rome_js_analyze/tests/specs/complexity/noUselessConstructor/invalid.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noUselessConstructor/invalid.js rename to crates/rome_js_analyze/tests/specs/complexity/noUselessConstructor/invalid.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUselessConstructor/invalid.js.snap b/crates/rome_js_analyze/tests/specs/complexity/noUselessConstructor/invalid.js.snap similarity index 85% rename from crates/rome_js_analyze/tests/specs/nursery/noUselessConstructor/invalid.js.snap rename to crates/rome_js_analyze/tests/specs/complexity/noUselessConstructor/invalid.js.snap index a847eb44e7a..71a039312ba 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noUselessConstructor/invalid.js.snap +++ b/crates/rome_js_analyze/tests/specs/complexity/noUselessConstructor/invalid.js.snap @@ -22,7 +22,7 @@ class WithComments { # Diagnostics ``` -invalid.js:5:5 lint/nursery/noUselessConstructor FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:5:5 lint/complexity/noUselessConstructor FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This constructor is unnecessary. @@ -47,7 +47,7 @@ invalid.js:5:5 lint/nursery/noUselessConstructor FIXABLE ━━━━━━━ ``` ``` -invalid.js:9:5 lint/nursery/noUselessConstructor FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:9:5 lint/complexity/noUselessConstructor FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This constructor is unnecessary. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUselessConstructor/invalid.jsonc b/crates/rome_js_analyze/tests/specs/complexity/noUselessConstructor/invalid.jsonc similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noUselessConstructor/invalid.jsonc rename to crates/rome_js_analyze/tests/specs/complexity/noUselessConstructor/invalid.jsonc diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUselessConstructor/invalid.jsonc.snap b/crates/rome_js_analyze/tests/specs/complexity/noUselessConstructor/invalid.jsonc.snap similarity index 72% rename from crates/rome_js_analyze/tests/specs/nursery/noUselessConstructor/invalid.jsonc.snap rename to crates/rome_js_analyze/tests/specs/complexity/noUselessConstructor/invalid.jsonc.snap index 48f039afaa8..b5b21a23636 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noUselessConstructor/invalid.jsonc.snap +++ b/crates/rome_js_analyze/tests/specs/complexity/noUselessConstructor/invalid.jsonc.snap @@ -10,7 +10,7 @@ class A { constructor(){} } # Diagnostics ``` -invalid.jsonc:1:11 lint/nursery/noUselessConstructor FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:11 lint/complexity/noUselessConstructor FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This constructor is unnecessary. @@ -31,7 +31,7 @@ class A { 'constructor'(){} } # Diagnostics ``` -invalid.jsonc:1:11 lint/nursery/noUselessConstructor FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:11 lint/complexity/noUselessConstructor FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This constructor is unnecessary. @@ -52,7 +52,7 @@ class A extends B { constructor() { super(); } } # Diagnostics ``` -invalid.jsonc:1:21 lint/nursery/noUselessConstructor FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:21 lint/complexity/noUselessConstructor FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This constructor is unnecessary. @@ -73,7 +73,7 @@ class A extends B { constructor(foo){ super(foo); } } # Diagnostics ``` -invalid.jsonc:1:21 lint/nursery/noUselessConstructor FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:21 lint/complexity/noUselessConstructor FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This constructor is unnecessary. @@ -94,7 +94,7 @@ class A extends B { constructor(foo, bar){ super(foo, bar); } } # Diagnostics ``` -invalid.jsonc:1:21 lint/nursery/noUselessConstructor FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:21 lint/complexity/noUselessConstructor FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This constructor is unnecessary. @@ -115,7 +115,7 @@ class A extends B { constructor(...args){ super(...args); } } # Diagnostics ``` -invalid.jsonc:1:21 lint/nursery/noUselessConstructor FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:21 lint/complexity/noUselessConstructor FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This constructor is unnecessary. @@ -136,7 +136,7 @@ class A extends B { constructor(a, b, ...c) { super(a, b, ...c); } } # Diagnostics ``` -invalid.jsonc:1:21 lint/nursery/noUselessConstructor FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:21 lint/complexity/noUselessConstructor FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This constructor is unnecessary. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUselessConstructor/valid.jsonc b/crates/rome_js_analyze/tests/specs/complexity/noUselessConstructor/valid.jsonc similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noUselessConstructor/valid.jsonc rename to crates/rome_js_analyze/tests/specs/complexity/noUselessConstructor/valid.jsonc diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUselessConstructor/valid.jsonc.snap b/crates/rome_js_analyze/tests/specs/complexity/noUselessConstructor/valid.jsonc.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noUselessConstructor/valid.jsonc.snap rename to crates/rome_js_analyze/tests/specs/complexity/noUselessConstructor/valid.jsonc.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUselessConstructor/valid.ts b/crates/rome_js_analyze/tests/specs/complexity/noUselessConstructor/valid.ts similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noUselessConstructor/valid.ts rename to crates/rome_js_analyze/tests/specs/complexity/noUselessConstructor/valid.ts diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUselessConstructor/valid.ts.snap b/crates/rome_js_analyze/tests/specs/complexity/noUselessConstructor/valid.ts.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noUselessConstructor/valid.ts.snap rename to crates/rome_js_analyze/tests/specs/complexity/noUselessConstructor/valid.ts.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noExtraLabels/invalid.jsonc b/crates/rome_js_analyze/tests/specs/complexity/noUselessLabel/invalid.jsonc similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noExtraLabels/invalid.jsonc rename to crates/rome_js_analyze/tests/specs/complexity/noUselessLabel/invalid.jsonc diff --git a/crates/rome_js_analyze/tests/specs/nursery/noExtraLabels/invalid.jsonc.snap b/crates/rome_js_analyze/tests/specs/complexity/noUselessLabel/invalid.jsonc.snap similarity index 69% rename from crates/rome_js_analyze/tests/specs/nursery/noExtraLabels/invalid.jsonc.snap rename to crates/rome_js_analyze/tests/specs/complexity/noUselessLabel/invalid.jsonc.snap index 72af4a17489..34ccde4c1fa 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noExtraLabels/invalid.jsonc.snap +++ b/crates/rome_js_analyze/tests/specs/complexity/noUselessLabel/invalid.jsonc.snap @@ -1,6 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs -assertion_line: 92 +assertion_line: 96 expression: invalid.jsonc --- # Input @@ -10,7 +10,7 @@ A: while (a) break A; # Diagnostics ``` -invalid.jsonc:1:20 lint/nursery/noExtraLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:20 lint/complexity/noUselessLabel FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary label. @@ -32,7 +32,7 @@ A: while (a) { B: { continue A; } } # Diagnostics ``` -invalid.jsonc:1:30 lint/nursery/noExtraLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:30 lint/complexity/noUselessLabel FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary label. @@ -54,7 +54,7 @@ X: while (x) { A: while (a) { B: { break A; break B; continue X; } } } # Diagnostics ``` -invalid.jsonc:1:42 lint/nursery/noExtraLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:42 lint/complexity/noUselessLabel FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary label. @@ -76,7 +76,7 @@ A: do { break A; } while (a); # Diagnostics ``` -invalid.jsonc:1:15 lint/nursery/noExtraLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:15 lint/complexity/noUselessLabel FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary label. @@ -98,7 +98,7 @@ A: for (;;) { break A; } # Diagnostics ``` -invalid.jsonc:1:21 lint/nursery/noExtraLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:21 lint/complexity/noUselessLabel FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary label. @@ -120,7 +120,7 @@ A: for (a in obj) { break A; } # Diagnostics ``` -invalid.jsonc:1:27 lint/nursery/noExtraLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:27 lint/complexity/noUselessLabel FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary label. @@ -142,7 +142,7 @@ A: for (a of ary) { break A; } # Diagnostics ``` -invalid.jsonc:1:27 lint/nursery/noExtraLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:27 lint/complexity/noUselessLabel FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary label. @@ -164,7 +164,7 @@ A: switch (a) { case 0: break A; } # Diagnostics ``` -invalid.jsonc:1:31 lint/nursery/noExtraLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:31 lint/complexity/noUselessLabel FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary label. @@ -186,7 +186,7 @@ X: while (x) { A: switch (a) { case 0: break A; } } # Diagnostics ``` -invalid.jsonc:1:46 lint/nursery/noExtraLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:46 lint/complexity/noUselessLabel FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary label. @@ -208,7 +208,7 @@ X: switch (a) { case 0: A: while (b) break A; } # Diagnostics ``` -invalid.jsonc:1:44 lint/nursery/noExtraLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:44 lint/complexity/noUselessLabel FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary label. @@ -230,7 +230,7 @@ A: while (true) { break A; while (true) { break A; } } # Diagnostics ``` -invalid.jsonc:1:25 lint/nursery/noExtraLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:25 lint/complexity/noUselessLabel FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary label. @@ -252,7 +252,7 @@ A: while(true) { /*before*/break A; } # Diagnostics ``` -invalid.jsonc:1:34 lint/nursery/noExtraLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:34 lint/complexity/noUselessLabel FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary label. @@ -274,7 +274,7 @@ A: while(true) { break/**/ A; } # Diagnostics ``` -invalid.jsonc:1:28 lint/nursery/noExtraLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:28 lint/complexity/noUselessLabel FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary label. @@ -296,7 +296,7 @@ A: while(true) { continue /**/ A; } # Diagnostics ``` -invalid.jsonc:1:32 lint/nursery/noExtraLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:32 lint/complexity/noUselessLabel FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary label. @@ -318,7 +318,7 @@ A: while(true) { break /**/A; } # Diagnostics ``` -invalid.jsonc:1:28 lint/nursery/noExtraLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:28 lint/complexity/noUselessLabel FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary label. @@ -340,7 +340,7 @@ A: while(true) { continue/**/A; } # Diagnostics ``` -invalid.jsonc:1:30 lint/nursery/noExtraLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:30 lint/complexity/noUselessLabel FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary label. @@ -362,7 +362,7 @@ A: while(true) { continue A/*after*/; } # Diagnostics ``` -invalid.jsonc:1:27 lint/nursery/noExtraLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:27 lint/complexity/noUselessLabel FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary label. @@ -385,7 +385,7 @@ A: while(true) { break A //after # Diagnostics ``` -invalid.jsonc:1:24 lint/nursery/noExtraLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:24 lint/complexity/noUselessLabel FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary label. @@ -409,7 +409,7 @@ foo() } # Diagnostics ``` -invalid.jsonc:1:24 lint/nursery/noExtraLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:24 lint/complexity/noUselessLabel FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary label. @@ -432,7 +432,7 @@ A: while(true) { while(true) { break A; } break A; } # Diagnostics ``` -invalid.jsonc:1:49 lint/nursery/noExtraLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:49 lint/complexity/noUselessLabel FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary label. @@ -454,7 +454,7 @@ A: while(true) { (() => { A: while(true) {} } )(); break A; } # Diagnostics ``` -invalid.jsonc:1:58 lint/nursery/noExtraLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:58 lint/complexity/noUselessLabel FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unnecessary label. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noExtraLabels/valid.jsonc b/crates/rome_js_analyze/tests/specs/complexity/noUselessLabel/valid.jsonc similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noExtraLabels/valid.jsonc rename to crates/rome_js_analyze/tests/specs/complexity/noUselessLabel/valid.jsonc diff --git a/crates/rome_js_analyze/tests/specs/nursery/noExtraLabels/valid.jsonc.snap b/crates/rome_js_analyze/tests/specs/complexity/noUselessLabel/valid.jsonc.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noExtraLabels/valid.jsonc.snap rename to crates/rome_js_analyze/tests/specs/complexity/noUselessLabel/valid.jsonc.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUselessRename/invalid.js b/crates/rome_js_analyze/tests/specs/complexity/noUselessRename/invalid.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noUselessRename/invalid.js rename to crates/rome_js_analyze/tests/specs/complexity/noUselessRename/invalid.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUselessRename/invalid.js.snap b/crates/rome_js_analyze/tests/specs/complexity/noUselessRename/invalid.js.snap similarity index 79% rename from crates/rome_js_analyze/tests/specs/nursery/noUselessRename/invalid.js.snap rename to crates/rome_js_analyze/tests/specs/complexity/noUselessRename/invalid.js.snap index 917a02f994a..a3388f28c4b 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noUselessRename/invalid.js.snap +++ b/crates/rome_js_analyze/tests/specs/complexity/noUselessRename/invalid.js.snap @@ -1,6 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs -assertion_line: 92 +assertion_line: 96 expression: invalid.js --- # Input @@ -45,7 +45,7 @@ export { /*before*/ foo as foo /*after*/ } from "foo"; # Diagnostics ``` -invalid.js:1:18 lint/nursery/noUselessRename FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:1:18 lint/complexity/noUselessRename FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Useless rename. @@ -62,7 +62,7 @@ invalid.js:1:18 lint/nursery/noUselessRename FIXABLE ━━━━━━━━ ``` ``` -invalid.js:3:10 lint/nursery/noUselessRename FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:3:10 lint/complexity/noUselessRename FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Useless rename. @@ -81,7 +81,7 @@ invalid.js:3:10 lint/nursery/noUselessRename FIXABLE ━━━━━━━━ ``` ``` -invalid.js:5:7 lint/nursery/noUselessRename FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:5:7 lint/complexity/noUselessRename FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Useless rename. @@ -100,7 +100,7 @@ invalid.js:5:7 lint/nursery/noUselessRename FIXABLE ━━━━━━━━ ``` ``` -invalid.js:8:9 lint/nursery/noUselessRename FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:8:9 lint/complexity/noUselessRename FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Useless rename. @@ -118,7 +118,7 @@ invalid.js:8:9 lint/nursery/noUselessRename FIXABLE ━━━━━━━━ ``` ``` -invalid.js:11:18 lint/nursery/noUselessRename FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:11:18 lint/complexity/noUselessRename FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Useless rename. @@ -137,7 +137,7 @@ invalid.js:11:18 lint/nursery/noUselessRename FIXABLE ━━━━━━━━ ``` ``` -invalid.js:14:14 lint/nursery/noUselessRename FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:14:14 lint/complexity/noUselessRename FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Useless rename. @@ -156,7 +156,7 @@ invalid.js:14:14 lint/nursery/noUselessRename FIXABLE ━━━━━━━━ ``` ``` -invalid.js:16:4 lint/nursery/noUselessRename FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:16:4 lint/complexity/noUselessRename FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Useless rename. @@ -175,7 +175,7 @@ invalid.js:16:4 lint/nursery/noUselessRename FIXABLE ━━━━━━━━ ``` ``` -invalid.js:18:21 lint/nursery/noUselessRename FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:18:21 lint/complexity/noUselessRename FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Useless rename. @@ -194,7 +194,7 @@ invalid.js:18:21 lint/nursery/noUselessRename FIXABLE ━━━━━━━━ ``` ``` -invalid.js:20:10 lint/nursery/noUselessRename FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:20:10 lint/complexity/noUselessRename FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Useless rename. @@ -213,7 +213,7 @@ invalid.js:20:10 lint/nursery/noUselessRename FIXABLE ━━━━━━━━ ``` ``` -invalid.js:22:21 lint/nursery/noUselessRename FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:22:21 lint/complexity/noUselessRename FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Useless rename. @@ -232,7 +232,7 @@ invalid.js:22:21 lint/nursery/noUselessRename FIXABLE ━━━━━━━━ ``` ``` -invalid.js:24:21 lint/nursery/noUselessRename FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:24:21 lint/complexity/noUselessRename FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Useless rename. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUselessRename/valid.js b/crates/rome_js_analyze/tests/specs/complexity/noUselessRename/valid.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noUselessRename/valid.js rename to crates/rome_js_analyze/tests/specs/complexity/noUselessRename/valid.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUselessRename/valid.js.snap b/crates/rome_js_analyze/tests/specs/complexity/noUselessRename/valid.js.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noUselessRename/valid.js.snap rename to crates/rome_js_analyze/tests/specs/complexity/noUselessRename/valid.js.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUselessSwitchCase/invalid.js b/crates/rome_js_analyze/tests/specs/complexity/noUselessSwitchCase/invalid.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noUselessSwitchCase/invalid.js rename to crates/rome_js_analyze/tests/specs/complexity/noUselessSwitchCase/invalid.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUselessSwitchCase/invalid.js.snap b/crates/rome_js_analyze/tests/specs/complexity/noUselessSwitchCase/invalid.js.snap similarity index 87% rename from crates/rome_js_analyze/tests/specs/nursery/noUselessSwitchCase/invalid.js.snap rename to crates/rome_js_analyze/tests/specs/complexity/noUselessSwitchCase/invalid.js.snap index a82c18320ff..b4ec99c522e 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noUselessSwitchCase/invalid.js.snap +++ b/crates/rome_js_analyze/tests/specs/complexity/noUselessSwitchCase/invalid.js.snap @@ -1,6 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs -assertion_line: 83 +assertion_line: 96 expression: invalid.js --- # Input @@ -27,7 +27,7 @@ switch (foo) { # Diagnostics ``` -invalid.js:2:2 lint/nursery/noUselessSwitchCase FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:2:2 lint/complexity/noUselessSwitchCase FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Useless case clause. @@ -61,7 +61,7 @@ invalid.js:2:2 lint/nursery/noUselessSwitchCase FIXABLE ━━━━━━━ ``` ``` -invalid.js:10:14 lint/nursery/noUselessSwitchCase FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:10:14 lint/complexity/noUselessSwitchCase FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Useless case clause. @@ -94,7 +94,7 @@ invalid.js:10:14 lint/nursery/noUselessSwitchCase FIXABLE ━━━━━━ ``` ``` -invalid.js:13:2 lint/nursery/noUselessSwitchCase FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:13:2 lint/complexity/noUselessSwitchCase FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Useless case clause. @@ -128,7 +128,7 @@ invalid.js:13:2 lint/nursery/noUselessSwitchCase FIXABLE ━━━━━━━ ``` ``` -invalid.js:14:2 lint/nursery/noUselessSwitchCase FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:14:2 lint/complexity/noUselessSwitchCase FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Useless case clause. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUselessSwitchCase/valid.js b/crates/rome_js_analyze/tests/specs/complexity/noUselessSwitchCase/valid.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noUselessSwitchCase/valid.js rename to crates/rome_js_analyze/tests/specs/complexity/noUselessSwitchCase/valid.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUselessSwitchCase/valid.js.snap b/crates/rome_js_analyze/tests/specs/complexity/noUselessSwitchCase/valid.js.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noUselessSwitchCase/valid.js.snap rename to crates/rome_js_analyze/tests/specs/complexity/noUselessSwitchCase/valid.js.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noWith/invalid.cjs b/crates/rome_js_analyze/tests/specs/complexity/noWith/invalid.cjs similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noWith/invalid.cjs rename to crates/rome_js_analyze/tests/specs/complexity/noWith/invalid.cjs diff --git a/crates/rome_js_analyze/tests/specs/nursery/noWith/invalid.cjs.snap b/crates/rome_js_analyze/tests/specs/complexity/noWith/invalid.cjs.snap similarity index 87% rename from crates/rome_js_analyze/tests/specs/nursery/noWith/invalid.cjs.snap rename to crates/rome_js_analyze/tests/specs/complexity/noWith/invalid.cjs.snap index bc94e2e5376..af730e6a638 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noWith/invalid.cjs.snap +++ b/crates/rome_js_analyze/tests/specs/complexity/noWith/invalid.cjs.snap @@ -1,5 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs +assertion_line: 96 expression: invalid.cjs --- # Input @@ -13,7 +14,7 @@ function f() { # Diagnostics ``` -invalid.cjs:2:3 lint/nursery/noWith ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.cjs:2:3 lint/complexity/noWith ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected use of with statement. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noWith/invalid.js.snap b/crates/rome_js_analyze/tests/specs/complexity/noWith/invalid.js.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noWith/invalid.js.snap rename to crates/rome_js_analyze/tests/specs/complexity/noWith/invalid.js.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noWith/valid.js.snap b/crates/rome_js_analyze/tests/specs/complexity/noWith/valid.js.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noWith/valid.js.snap rename to crates/rome_js_analyze/tests/specs/complexity/noWith/valid.js.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noGlobalObjectCalls/invalid.js b/crates/rome_js_analyze/tests/specs/correctness/noGlobalObjectCalls/invalid.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noGlobalObjectCalls/invalid.js rename to crates/rome_js_analyze/tests/specs/correctness/noGlobalObjectCalls/invalid.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noGlobalObjectCalls/invalid.js.snap b/crates/rome_js_analyze/tests/specs/correctness/noGlobalObjectCalls/invalid.js.snap similarity index 72% rename from crates/rome_js_analyze/tests/specs/nursery/noGlobalObjectCalls/invalid.js.snap rename to crates/rome_js_analyze/tests/specs/correctness/noGlobalObjectCalls/invalid.js.snap index 93a096dc85f..0e692a4ee71 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noGlobalObjectCalls/invalid.js.snap +++ b/crates/rome_js_analyze/tests/specs/correctness/noGlobalObjectCalls/invalid.js.snap @@ -1,5 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs +assertion_line: 96 expression: invalid.js --- # Input @@ -120,7 +121,7 @@ new globalThis['Intl']; # Diagnostics ``` -invalid.js:1:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:1:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Atomics is not a function. @@ -133,7 +134,7 @@ invalid.js:1:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:2:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:2:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! JSON is not a function. @@ -147,7 +148,7 @@ invalid.js:2:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:3:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:3:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Math is not a function. @@ -162,7 +163,7 @@ invalid.js:3:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:4:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:4:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Reflect is not a function. @@ -177,7 +178,7 @@ invalid.js:4:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:5:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:5:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Intl is not a function. @@ -192,7 +193,7 @@ invalid.js:5:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:7:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:7:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Atomics is not a function. @@ -207,7 +208,7 @@ invalid.js:7:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:8:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:8:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! JSON is not a function. @@ -221,7 +222,7 @@ invalid.js:8:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:9:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:9:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Math is not a function. @@ -236,7 +237,7 @@ invalid.js:9:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:10:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:10:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Reflect is not a function. @@ -251,7 +252,7 @@ invalid.js:10:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:11:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:11:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Intl is not a function. @@ -266,7 +267,7 @@ invalid.js:11:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:13:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:13:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Atomics is not a function. @@ -281,7 +282,7 @@ invalid.js:13:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:14:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:14:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! JSON is not a function. @@ -295,7 +296,7 @@ invalid.js:14:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:15:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:15:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Math is not a function. @@ -310,7 +311,7 @@ invalid.js:15:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:16:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:16:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Reflect is not a function. @@ -325,7 +326,7 @@ invalid.js:16:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:17:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:17:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Intl is not a function. @@ -340,7 +341,7 @@ invalid.js:17:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:19:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:19:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Atomics is not a function. @@ -355,7 +356,7 @@ invalid.js:19:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:20:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:20:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! JSON is not a function. @@ -369,7 +370,7 @@ invalid.js:20:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:21:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:21:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Math is not a function. @@ -384,7 +385,7 @@ invalid.js:21:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:22:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:22:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Reflect is not a function. @@ -399,7 +400,7 @@ invalid.js:22:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:23:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:23:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Intl is not a function. @@ -414,7 +415,7 @@ invalid.js:23:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:25:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:25:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Atomics is not a function. @@ -429,7 +430,7 @@ invalid.js:25:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:26:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:26:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! JSON is not a function. @@ -443,7 +444,7 @@ invalid.js:26:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:27:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:27:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Math is not a function. @@ -458,7 +459,7 @@ invalid.js:27:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:28:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:28:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Reflect is not a function. @@ -473,7 +474,7 @@ invalid.js:28:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:29:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:29:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Intl is not a function. @@ -488,7 +489,7 @@ invalid.js:29:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:32:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:32:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Atomics is not a function. @@ -502,7 +503,7 @@ invalid.js:32:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:33:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:33:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! JSON is not a function. @@ -517,7 +518,7 @@ invalid.js:33:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:34:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:34:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Math is not a function. @@ -532,7 +533,7 @@ invalid.js:34:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:35:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:35:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Reflect is not a function. @@ -547,7 +548,7 @@ invalid.js:35:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:36:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:36:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Intl is not a function. @@ -562,7 +563,7 @@ invalid.js:36:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:38:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:38:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Atomics is not a function. @@ -577,7 +578,7 @@ invalid.js:38:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:39:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:39:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! JSON is not a function. @@ -591,7 +592,7 @@ invalid.js:39:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:40:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:40:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Math is not a function. @@ -606,7 +607,7 @@ invalid.js:40:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:41:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:41:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Reflect is not a function. @@ -621,7 +622,7 @@ invalid.js:41:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:42:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:42:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Intl is not a function. @@ -636,7 +637,7 @@ invalid.js:42:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:44:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:44:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Atomics is not a function. @@ -651,7 +652,7 @@ invalid.js:44:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:45:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:45:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! JSON is not a function. @@ -665,7 +666,7 @@ invalid.js:45:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:46:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:46:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Math is not a function. @@ -680,7 +681,7 @@ invalid.js:46:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:47:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:47:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Reflect is not a function. @@ -695,7 +696,7 @@ invalid.js:47:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:48:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:48:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Intl is not a function. @@ -710,7 +711,7 @@ invalid.js:48:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:50:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:50:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Atomics is not a function. @@ -725,7 +726,7 @@ invalid.js:50:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:51:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:51:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! JSON is not a function. @@ -739,7 +740,7 @@ invalid.js:51:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:52:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:52:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Math is not a function. @@ -754,7 +755,7 @@ invalid.js:52:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:53:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:53:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Reflect is not a function. @@ -769,7 +770,7 @@ invalid.js:53:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:54:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:54:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Intl is not a function. @@ -784,7 +785,7 @@ invalid.js:54:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:56:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:56:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Atomics is not a function. @@ -799,7 +800,7 @@ invalid.js:56:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:57:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:57:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! JSON is not a function. @@ -813,7 +814,7 @@ invalid.js:57:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:58:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:58:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Math is not a function. @@ -828,7 +829,7 @@ invalid.js:58:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:59:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:59:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Reflect is not a function. @@ -843,7 +844,7 @@ invalid.js:59:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:60:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:60:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Intl is not a function. @@ -858,7 +859,7 @@ invalid.js:60:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:62:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:62:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Atomics is not a function. @@ -873,7 +874,7 @@ invalid.js:62:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:63:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:63:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! JSON is not a function. @@ -887,7 +888,7 @@ invalid.js:63:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:64:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:64:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Math is not a function. @@ -902,7 +903,7 @@ invalid.js:64:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:65:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:65:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Reflect is not a function. @@ -917,7 +918,7 @@ invalid.js:65:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:66:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:66:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Intl is not a function. @@ -932,7 +933,7 @@ invalid.js:66:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:69:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:69:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'Atomics' is not a function. @@ -946,7 +947,7 @@ invalid.js:69:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:70:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:70:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'JSON' is not a function. @@ -961,7 +962,7 @@ invalid.js:70:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:71:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:71:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'Math' is not a function. @@ -976,7 +977,7 @@ invalid.js:71:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:72:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:72:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'Reflect' is not a function. @@ -991,7 +992,7 @@ invalid.js:72:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:73:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:73:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'Intl' is not a function. @@ -1006,7 +1007,7 @@ invalid.js:73:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:75:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:75:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'Atomics' is not a function. @@ -1021,7 +1022,7 @@ invalid.js:75:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:76:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:76:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'JSON' is not a function. @@ -1035,7 +1036,7 @@ invalid.js:76:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:77:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:77:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'Math' is not a function. @@ -1050,7 +1051,7 @@ invalid.js:77:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:78:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:78:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'Reflect' is not a function. @@ -1065,7 +1066,7 @@ invalid.js:78:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:79:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:79:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'Intl' is not a function. @@ -1080,7 +1081,7 @@ invalid.js:79:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:81:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:81:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'Atomics' is not a function. @@ -1095,7 +1096,7 @@ invalid.js:81:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:82:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:82:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'JSON' is not a function. @@ -1109,7 +1110,7 @@ invalid.js:82:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:83:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:83:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'Math' is not a function. @@ -1124,7 +1125,7 @@ invalid.js:83:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:84:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:84:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'Reflect' is not a function. @@ -1139,7 +1140,7 @@ invalid.js:84:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:85:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:85:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'Intl' is not a function. @@ -1154,7 +1155,7 @@ invalid.js:85:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:87:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:87:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'Atomics' is not a function. @@ -1169,7 +1170,7 @@ invalid.js:87:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:88:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:88:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'JSON' is not a function. @@ -1183,7 +1184,7 @@ invalid.js:88:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:89:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:89:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'Math' is not a function. @@ -1198,7 +1199,7 @@ invalid.js:89:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:90:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:90:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'Reflect' is not a function. @@ -1213,7 +1214,7 @@ invalid.js:90:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:91:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:91:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'Intl' is not a function. @@ -1228,7 +1229,7 @@ invalid.js:91:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:93:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:93:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'Atomics' is not a function. @@ -1243,7 +1244,7 @@ invalid.js:93:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:94:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:94:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'JSON' is not a function. @@ -1257,7 +1258,7 @@ invalid.js:94:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:95:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:95:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'Math' is not a function. @@ -1272,7 +1273,7 @@ invalid.js:95:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:96:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:96:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'Reflect' is not a function. @@ -1287,7 +1288,7 @@ invalid.js:96:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:97:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:97:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'Intl' is not a function. @@ -1302,7 +1303,7 @@ invalid.js:97:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:99:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:99:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'Atomics' is not a function. @@ -1317,7 +1318,7 @@ invalid.js:99:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:100:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:100:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'JSON' is not a function. @@ -1331,7 +1332,7 @@ invalid.js:100:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:101:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:101:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'Math' is not a function. @@ -1346,7 +1347,7 @@ invalid.js:101:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:102:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:102:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'Reflect' is not a function. @@ -1361,7 +1362,7 @@ invalid.js:102:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:103:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:103:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'Intl' is not a function. @@ -1376,7 +1377,7 @@ invalid.js:103:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:105:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:105:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'Atomics' is not a function. @@ -1391,7 +1392,7 @@ invalid.js:105:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:106:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:106:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'JSON' is not a function. @@ -1405,7 +1406,7 @@ invalid.js:106:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:107:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:107:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'Math' is not a function. @@ -1420,7 +1421,7 @@ invalid.js:107:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:108:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:108:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'Reflect' is not a function. @@ -1435,7 +1436,7 @@ invalid.js:108:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━ ``` ``` -invalid.js:109:1 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:109:1 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'Intl' is not a function. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noGlobalObjectCalls/valid.js b/crates/rome_js_analyze/tests/specs/correctness/noGlobalObjectCalls/valid.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noGlobalObjectCalls/valid.js rename to crates/rome_js_analyze/tests/specs/correctness/noGlobalObjectCalls/valid.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noGlobalObjectCalls/valid.js.snap b/crates/rome_js_analyze/tests/specs/correctness/noGlobalObjectCalls/valid.js.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noGlobalObjectCalls/valid.js.snap rename to crates/rome_js_analyze/tests/specs/correctness/noGlobalObjectCalls/valid.js.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noGlobalObjectCalls/valid_import.js b/crates/rome_js_analyze/tests/specs/correctness/noGlobalObjectCalls/valid_import.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noGlobalObjectCalls/valid_import.js rename to crates/rome_js_analyze/tests/specs/correctness/noGlobalObjectCalls/valid_import.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noGlobalObjectCalls/valid_import.js.snap b/crates/rome_js_analyze/tests/specs/correctness/noGlobalObjectCalls/valid_import.js.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noGlobalObjectCalls/valid_import.js.snap rename to crates/rome_js_analyze/tests/specs/correctness/noGlobalObjectCalls/valid_import.js.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noInnerDeclarations/invalid-module.js b/crates/rome_js_analyze/tests/specs/correctness/noInnerDeclarations/invalid-module.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noInnerDeclarations/invalid-module.js rename to crates/rome_js_analyze/tests/specs/correctness/noInnerDeclarations/invalid-module.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noInnerDeclarations/invalid-module.js.snap b/crates/rome_js_analyze/tests/specs/correctness/noInnerDeclarations/invalid-module.js.snap similarity index 67% rename from crates/rome_js_analyze/tests/specs/nursery/noInnerDeclarations/invalid-module.js.snap rename to crates/rome_js_analyze/tests/specs/correctness/noInnerDeclarations/invalid-module.js.snap index 340066634c0..b611b051ed1 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noInnerDeclarations/invalid-module.js.snap +++ b/crates/rome_js_analyze/tests/specs/correctness/noInnerDeclarations/invalid-module.js.snap @@ -1,6 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs -assertion_line: 92 +assertion_line: 96 expression: invalid-module.js --- # Input @@ -15,7 +15,7 @@ export {}; # Diagnostics ``` -invalid-module.js:2:2 lint/nursery/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid-module.js:2:2 lint/correctness/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This var should be declared at the root of the module. @@ -32,7 +32,7 @@ invalid-module.js:2:2 lint/nursery/noInnerDeclarations ━━━━━━━━ ``` ``` -invalid-module.js:3:2 lint/nursery/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid-module.js:3:2 lint/correctness/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This function should be declared at the root of the module. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noInnerDeclarations/invalid.jsonc b/crates/rome_js_analyze/tests/specs/correctness/noInnerDeclarations/invalid.jsonc similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noInnerDeclarations/invalid.jsonc rename to crates/rome_js_analyze/tests/specs/correctness/noInnerDeclarations/invalid.jsonc diff --git a/crates/rome_js_analyze/tests/specs/nursery/noInnerDeclarations/invalid.jsonc.snap b/crates/rome_js_analyze/tests/specs/correctness/noInnerDeclarations/invalid.jsonc.snap similarity index 67% rename from crates/rome_js_analyze/tests/specs/nursery/noInnerDeclarations/invalid.jsonc.snap rename to crates/rome_js_analyze/tests/specs/correctness/noInnerDeclarations/invalid.jsonc.snap index 52ae6827fd9..0e43c5a23d4 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noInnerDeclarations/invalid.jsonc.snap +++ b/crates/rome_js_analyze/tests/specs/correctness/noInnerDeclarations/invalid.jsonc.snap @@ -1,6 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs -assertion_line: 92 +assertion_line: 96 expression: invalid.jsonc --- # Input @@ -10,7 +10,7 @@ if (test) { var foo; } # Diagnostics ``` -invalid.jsonc:1:13 lint/nursery/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:13 lint/correctness/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This var should be declared at the root of the script. @@ -30,7 +30,7 @@ function doSomething() { while (test) { var foo; } } # Diagnostics ``` -invalid.jsonc:1:41 lint/nursery/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:41 lint/correctness/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This var should be declared at the root of the enclosing function. @@ -50,7 +50,7 @@ if (test) { function doSomething() { } } # Diagnostics ``` -invalid.jsonc:1:13 lint/nursery/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:13 lint/correctness/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This function should be declared at the root of the script. @@ -70,7 +70,7 @@ if (foo) var a; # Diagnostics ``` -invalid.jsonc:1:10 lint/nursery/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:10 lint/correctness/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This var should be declared at the root of the script. @@ -90,7 +90,7 @@ if (foo) /* some comments */ var a; # Diagnostics ``` -invalid.jsonc:1:30 lint/nursery/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:30 lint/correctness/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This var should be declared at the root of the script. @@ -110,7 +110,7 @@ if (foo){ function f(){ if(bar){ var a; } } } # Diagnostics ``` -invalid.jsonc:1:11 lint/nursery/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:11 lint/correctness/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This function should be declared at the root of the script. @@ -124,7 +124,7 @@ invalid.jsonc:1:11 lint/nursery/noInnerDeclarations ━━━━━━━━━ ``` ``` -invalid.jsonc:1:34 lint/nursery/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:34 lint/correctness/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This var should be declared at the root of the enclosing function. @@ -144,7 +144,7 @@ if (foo) function f(){ if(bar) var a; } # Diagnostics ``` -invalid.jsonc:1:10 lint/nursery/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:10 lint/correctness/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This function should be declared at the root of the script. @@ -158,7 +158,7 @@ invalid.jsonc:1:10 lint/nursery/noInnerDeclarations ━━━━━━━━━ ``` ``` -invalid.jsonc:1:32 lint/nursery/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:32 lint/correctness/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This var should be declared at the root of the enclosing function. @@ -178,7 +178,7 @@ if (foo) { var fn = function(){} } # Diagnostics ``` -invalid.jsonc:1:12 lint/nursery/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:12 lint/correctness/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This var should be declared at the root of the script. @@ -198,7 +198,7 @@ if (foo) function f(){} # Diagnostics ``` -invalid.jsonc:1:10 lint/nursery/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:10 lint/correctness/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This function should be declared at the root of the script. @@ -218,7 +218,7 @@ function bar() { if (foo) function f(){}; } # Diagnostics ``` -invalid.jsonc:1:27 lint/nursery/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:27 lint/correctness/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This function should be declared at the root of the enclosing function. @@ -238,7 +238,7 @@ function bar() { if (foo) var a; } # Diagnostics ``` -invalid.jsonc:1:27 lint/nursery/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:27 lint/correctness/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This var should be declared at the root of the enclosing function. @@ -258,7 +258,7 @@ if (foo){ var a; } # Diagnostics ``` -invalid.jsonc:1:11 lint/nursery/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:11 lint/correctness/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This var should be declared at the root of the script. @@ -278,7 +278,7 @@ function doSomething() { do { function somethingElse() { } } while (test); } # Diagnostics ``` -invalid.jsonc:1:31 lint/nursery/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:31 lint/correctness/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This function should be declared at the root of the enclosing function. @@ -298,7 +298,7 @@ invalid.jsonc:1:31 lint/nursery/noInnerDeclarations ━━━━━━━━━ # Diagnostics ``` -invalid.jsonc:1:27 lint/nursery/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:27 lint/correctness/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This function should be declared at the root of the enclosing function. @@ -318,7 +318,7 @@ while (test) { var foo; } # Diagnostics ``` -invalid.jsonc:1:16 lint/nursery/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:16 lint/correctness/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This var should be declared at the root of the script. @@ -338,7 +338,7 @@ function doSomething() { if (test) { var foo = 42; } } # Diagnostics ``` -invalid.jsonc:1:38 lint/nursery/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:38 lint/correctness/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This var should be declared at the root of the enclosing function. @@ -358,7 +358,7 @@ invalid.jsonc:1:38 lint/nursery/noInnerDeclarations ━━━━━━━━━ # Diagnostics ``` -invalid.jsonc:1:27 lint/nursery/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:27 lint/correctness/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This var should be declared at the root of the enclosing function. @@ -378,7 +378,7 @@ const doSomething = () => { if (test) { var foo = 42; } } # Diagnostics ``` -invalid.jsonc:1:41 lint/nursery/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:41 lint/correctness/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This var should be declared at the root of the enclosing function. @@ -398,7 +398,7 @@ class C { constructor() { if(test) { var foo; } } } # Diagnostics ``` -invalid.jsonc:1:38 lint/nursery/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:38 lint/correctness/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This var should be declared at the root of the enclosing function. @@ -418,7 +418,7 @@ class C { get x() { if(test) { var foo; } } } # Diagnostics ``` -invalid.jsonc:1:32 lint/nursery/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:32 lint/correctness/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This var should be declared at the root of the enclosing function. @@ -438,7 +438,7 @@ class C { set x() { if(test) { var foo; } } } # Diagnostics ``` -invalid.jsonc:1:32 lint/nursery/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:32 lint/correctness/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This var should be declared at the root of the enclosing function. @@ -458,7 +458,7 @@ class C { method() { if(test) { var foo; } } } # Diagnostics ``` -invalid.jsonc:1:33 lint/nursery/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:33 lint/correctness/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This var should be declared at the root of the enclosing function. @@ -478,7 +478,7 @@ class C { static { if (test) { function foo() {} } } } # Diagnostics ``` -invalid.jsonc:1:32 lint/nursery/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:32 lint/correctness/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This function should be declared at the root of the static block. @@ -498,7 +498,7 @@ class C { static { if (test) { var foo; } } } # Diagnostics ``` -invalid.jsonc:1:32 lint/nursery/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:32 lint/correctness/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This var should be declared at the root of the static block. @@ -518,7 +518,7 @@ class C { static { if (test) { if (anotherTest) { var foo; } } } } # Diagnostics ``` -invalid.jsonc:1:51 lint/nursery/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:51 lint/correctness/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This var should be declared at the root of the static block. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noInnerDeclarations/valid-module.js b/crates/rome_js_analyze/tests/specs/correctness/noInnerDeclarations/valid-module.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noInnerDeclarations/valid-module.js rename to crates/rome_js_analyze/tests/specs/correctness/noInnerDeclarations/valid-module.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noInnerDeclarations/valid-module.js.snap b/crates/rome_js_analyze/tests/specs/correctness/noInnerDeclarations/valid-module.js.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noInnerDeclarations/valid-module.js.snap rename to crates/rome_js_analyze/tests/specs/correctness/noInnerDeclarations/valid-module.js.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noInnerDeclarations/valid.jsonc b/crates/rome_js_analyze/tests/specs/correctness/noInnerDeclarations/valid.jsonc similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noInnerDeclarations/valid.jsonc rename to crates/rome_js_analyze/tests/specs/correctness/noInnerDeclarations/valid.jsonc diff --git a/crates/rome_js_analyze/tests/specs/nursery/noInnerDeclarations/valid.jsonc.snap b/crates/rome_js_analyze/tests/specs/correctness/noInnerDeclarations/valid.jsonc.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noInnerDeclarations/valid.jsonc.snap rename to crates/rome_js_analyze/tests/specs/correctness/noInnerDeclarations/valid.jsonc.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noInvalidConstructorSuper/invalid.js b/crates/rome_js_analyze/tests/specs/correctness/noInvalidConstructorSuper/invalid.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noInvalidConstructorSuper/invalid.js rename to crates/rome_js_analyze/tests/specs/correctness/noInvalidConstructorSuper/invalid.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noInvalidConstructorSuper/invalid.js.snap b/crates/rome_js_analyze/tests/specs/correctness/noInvalidConstructorSuper/invalid.js.snap similarity index 80% rename from crates/rome_js_analyze/tests/specs/nursery/noInvalidConstructorSuper/invalid.js.snap rename to crates/rome_js_analyze/tests/specs/correctness/noInvalidConstructorSuper/invalid.js.snap index 2e1416a06e4..e86007639c8 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noInvalidConstructorSuper/invalid.js.snap +++ b/crates/rome_js_analyze/tests/specs/correctness/noInvalidConstructorSuper/invalid.js.snap @@ -1,5 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs +assertion_line: 96 expression: invalid.js --- # Input @@ -64,7 +65,7 @@ export default class A extends null { # Diagnostics ``` -invalid.js:14:9 lint/nursery/noInvalidConstructorSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:14:9 lint/correctness/noInvalidConstructorSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This class calls super(), but the class extends from a non-constructor. @@ -88,7 +89,7 @@ invalid.js:14:9 lint/nursery/noInvalidConstructorSuper ━━━━━━━━ ``` ``` -invalid.js:20:42 lint/nursery/noInvalidConstructorSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:20:42 lint/correctness/noInvalidConstructorSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This class calls super(), but the class extends from a non-constructor. @@ -112,7 +113,7 @@ invalid.js:20:42 lint/nursery/noInvalidConstructorSuper ━━━━━━━━ ``` ``` -invalid.js:22:39 lint/nursery/noInvalidConstructorSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:22:39 lint/correctness/noInvalidConstructorSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This class calls super(), but the class extends from a non-constructor. @@ -136,7 +137,7 @@ invalid.js:22:39 lint/nursery/noInvalidConstructorSuper ━━━━━━━━ ``` ``` -invalid.js:24:43 lint/nursery/noInvalidConstructorSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:24:43 lint/correctness/noInvalidConstructorSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This class calls super(), but the class extends from a non-constructor. @@ -160,7 +161,7 @@ invalid.js:24:43 lint/nursery/noInvalidConstructorSuper ━━━━━━━━ ``` ``` -invalid.js:26:44 lint/nursery/noInvalidConstructorSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:26:44 lint/correctness/noInvalidConstructorSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This class calls super(), but the class extends from a non-constructor. @@ -184,7 +185,7 @@ invalid.js:26:44 lint/nursery/noInvalidConstructorSuper ━━━━━━━━ ``` ``` -invalid.js:28:45 lint/nursery/noInvalidConstructorSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:28:45 lint/correctness/noInvalidConstructorSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This class calls super(), but the class extends from a non-constructor. @@ -208,7 +209,7 @@ invalid.js:28:45 lint/nursery/noInvalidConstructorSuper ━━━━━━━━ ``` ``` -invalid.js:30:44 lint/nursery/noInvalidConstructorSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:30:44 lint/correctness/noInvalidConstructorSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This class calls super(), but the class extends from a non-constructor. @@ -232,7 +233,7 @@ invalid.js:30:44 lint/nursery/noInvalidConstructorSuper ━━━━━━━━ ``` ``` -invalid.js:32:44 lint/nursery/noInvalidConstructorSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:32:44 lint/correctness/noInvalidConstructorSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This class calls super(), but the class extends from a non-constructor. @@ -256,7 +257,7 @@ invalid.js:32:44 lint/nursery/noInvalidConstructorSuper ━━━━━━━━ ``` ``` -invalid.js:34:45 lint/nursery/noInvalidConstructorSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:34:45 lint/correctness/noInvalidConstructorSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This class calls super(), but the class extends from a non-constructor. @@ -280,7 +281,7 @@ invalid.js:34:45 lint/nursery/noInvalidConstructorSuper ━━━━━━━━ ``` ``` -invalid.js:36:44 lint/nursery/noInvalidConstructorSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:36:44 lint/correctness/noInvalidConstructorSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This class calls super(), but the class extends from a non-constructor. @@ -304,7 +305,7 @@ invalid.js:36:44 lint/nursery/noInvalidConstructorSuper ━━━━━━━━ ``` ``` -invalid.js:38:45 lint/nursery/noInvalidConstructorSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:38:45 lint/correctness/noInvalidConstructorSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This class calls super(), but the class extends from a non-constructor. @@ -328,7 +329,7 @@ invalid.js:38:45 lint/nursery/noInvalidConstructorSuper ━━━━━━━━ ``` ``` -invalid.js:53:9 lint/nursery/noInvalidConstructorSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:53:9 lint/correctness/noInvalidConstructorSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This class calls super(), but the class extends from a non-constructor. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noInvalidConstructorSuper/valid.js b/crates/rome_js_analyze/tests/specs/correctness/noInvalidConstructorSuper/valid.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noInvalidConstructorSuper/valid.js rename to crates/rome_js_analyze/tests/specs/correctness/noInvalidConstructorSuper/valid.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noInvalidConstructorSuper/valid.js.snap b/crates/rome_js_analyze/tests/specs/correctness/noInvalidConstructorSuper/valid.js.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noInvalidConstructorSuper/valid.js.snap rename to crates/rome_js_analyze/tests/specs/correctness/noInvalidConstructorSuper/valid.js.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noSwitchDeclarations/invalid.jsonc b/crates/rome_js_analyze/tests/specs/correctness/noSwitchDeclarations/invalid.jsonc similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noSwitchDeclarations/invalid.jsonc rename to crates/rome_js_analyze/tests/specs/correctness/noSwitchDeclarations/invalid.jsonc diff --git a/crates/rome_js_analyze/tests/specs/nursery/noSwitchDeclarations/invalid.jsonc.snap b/crates/rome_js_analyze/tests/specs/correctness/noSwitchDeclarations/invalid.jsonc.snap similarity index 79% rename from crates/rome_js_analyze/tests/specs/nursery/noSwitchDeclarations/invalid.jsonc.snap rename to crates/rome_js_analyze/tests/specs/correctness/noSwitchDeclarations/invalid.jsonc.snap index f762df22a27..51a57f6371c 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noSwitchDeclarations/invalid.jsonc.snap +++ b/crates/rome_js_analyze/tests/specs/correctness/noSwitchDeclarations/invalid.jsonc.snap @@ -1,6 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs -assertion_line: 92 +assertion_line: 96 expression: invalid.jsonc --- # Input @@ -10,7 +10,7 @@ switch (a) { case 1: let x = 1; break; } # Diagnostics ``` -invalid.jsonc:1:22 lint/nursery/noSwitchDeclarations FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:22 lint/correctness/noSwitchDeclarations FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Other switch clauses can erroneously access this declaration. Wrap the declaration in a block to restrict its access to the switch clause. @@ -37,7 +37,7 @@ switch (a) { default: let x = 2; break; } # Diagnostics ``` -invalid.jsonc:1:23 lint/nursery/noSwitchDeclarations FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:23 lint/correctness/noSwitchDeclarations FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Other switch clauses can erroneously access this declaration. Wrap the declaration in a block to restrict its access to the switch clause. @@ -64,7 +64,7 @@ switch (a) { case 1: const x = 1; break; } # Diagnostics ``` -invalid.jsonc:1:22 lint/nursery/noSwitchDeclarations FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:22 lint/correctness/noSwitchDeclarations FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Other switch clauses can erroneously access this declaration. Wrap the declaration in a block to restrict its access to the switch clause. @@ -91,7 +91,7 @@ switch (a) { default: const x = 2; break; } # Diagnostics ``` -invalid.jsonc:1:23 lint/nursery/noSwitchDeclarations FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:23 lint/correctness/noSwitchDeclarations FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Other switch clauses can erroneously access this declaration. Wrap the declaration in a block to restrict its access to the switch clause. @@ -118,7 +118,7 @@ switch (a) { case 1: function f() {} break; } # Diagnostics ``` -invalid.jsonc:1:22 lint/nursery/noSwitchDeclarations FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:22 lint/correctness/noSwitchDeclarations FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Other switch clauses can erroneously access this declaration. Wrap the declaration in a block to restrict its access to the switch clause. @@ -145,7 +145,7 @@ switch (a) { default: function f() {} break; } # Diagnostics ``` -invalid.jsonc:1:23 lint/nursery/noSwitchDeclarations FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:23 lint/correctness/noSwitchDeclarations FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Other switch clauses can erroneously access this declaration. Wrap the declaration in a block to restrict its access to the switch clause. @@ -172,7 +172,7 @@ switch (a) { case 1: class C {} break; } # Diagnostics ``` -invalid.jsonc:1:22 lint/nursery/noSwitchDeclarations FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:22 lint/correctness/noSwitchDeclarations FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Other switch clauses can erroneously access this declaration. Wrap the declaration in a block to restrict its access to the switch clause. @@ -199,7 +199,7 @@ switch (a) { default: class C {} break; } # Diagnostics ``` -invalid.jsonc:1:23 lint/nursery/noSwitchDeclarations FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:23 lint/correctness/noSwitchDeclarations FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Other switch clauses can erroneously access this declaration. Wrap the declaration in a block to restrict its access to the switch clause. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noSwitchDeclarations/invalid.ts b/crates/rome_js_analyze/tests/specs/correctness/noSwitchDeclarations/invalid.ts similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noSwitchDeclarations/invalid.ts rename to crates/rome_js_analyze/tests/specs/correctness/noSwitchDeclarations/invalid.ts diff --git a/crates/rome_js_analyze/tests/specs/nursery/noSwitchDeclarations/invalid.ts.snap b/crates/rome_js_analyze/tests/specs/correctness/noSwitchDeclarations/invalid.ts.snap similarity index 84% rename from crates/rome_js_analyze/tests/specs/nursery/noSwitchDeclarations/invalid.ts.snap rename to crates/rome_js_analyze/tests/specs/correctness/noSwitchDeclarations/invalid.ts.snap index 822352ad59c..c401292f30b 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noSwitchDeclarations/invalid.ts.snap +++ b/crates/rome_js_analyze/tests/specs/correctness/noSwitchDeclarations/invalid.ts.snap @@ -1,6 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs -assertion_line: 92 +assertion_line: 96 expression: invalid.ts --- # Input @@ -47,7 +47,7 @@ switch (1) { # Diagnostics ``` -invalid.ts:3:3 lint/nursery/noSwitchDeclarations FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:3:3 lint/correctness/noSwitchDeclarations FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Other switch clauses can erroneously access this declaration. Wrap the declaration in a block to restrict its access to the switch clause. @@ -85,7 +85,7 @@ invalid.ts:3:3 lint/nursery/noSwitchDeclarations FIXABLE ━━━━━━━ ``` ``` -invalid.ts:9:3 lint/nursery/noSwitchDeclarations FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:9:3 lint/correctness/noSwitchDeclarations FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Other switch clauses can erroneously access this declaration. Wrap the declaration in a block to restrict its access to the switch clause. @@ -124,7 +124,7 @@ invalid.ts:9:3 lint/nursery/noSwitchDeclarations FIXABLE ━━━━━━━ ``` ``` -invalid.ts:15:3 lint/nursery/noSwitchDeclarations FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:15:3 lint/correctness/noSwitchDeclarations FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Other switch clauses can erroneously access this declaration. Wrap the declaration in a block to restrict its access to the switch clause. @@ -163,7 +163,7 @@ invalid.ts:15:3 lint/nursery/noSwitchDeclarations FIXABLE ━━━━━━ ``` ``` -invalid.ts:21:3 lint/nursery/noSwitchDeclarations FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:21:3 lint/correctness/noSwitchDeclarations FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Other switch clauses can erroneously access this declaration. Wrap the declaration in a block to restrict its access to the switch clause. @@ -206,7 +206,7 @@ invalid.ts:21:3 lint/nursery/noSwitchDeclarations FIXABLE ━━━━━━ ``` ``` -invalid.ts:29:3 lint/nursery/noSwitchDeclarations FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:29:3 lint/correctness/noSwitchDeclarations FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Other switch clauses can erroneously access this declaration. Wrap the declaration in a block to restrict its access to the switch clause. @@ -245,7 +245,7 @@ invalid.ts:29:3 lint/nursery/noSwitchDeclarations FIXABLE ━━━━━━ ``` ``` -invalid.ts:35:3 lint/nursery/noSwitchDeclarations FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:35:3 lint/correctness/noSwitchDeclarations FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Other switch clauses can erroneously access this declaration. Wrap the declaration in a block to restrict its access to the switch clause. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noSwitchDeclarations/valid.jsonc b/crates/rome_js_analyze/tests/specs/correctness/noSwitchDeclarations/valid.jsonc similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noSwitchDeclarations/valid.jsonc rename to crates/rome_js_analyze/tests/specs/correctness/noSwitchDeclarations/valid.jsonc diff --git a/crates/rome_js_analyze/tests/specs/nursery/noSwitchDeclarations/valid.jsonc.snap b/crates/rome_js_analyze/tests/specs/correctness/noSwitchDeclarations/valid.jsonc.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noSwitchDeclarations/valid.jsonc.snap rename to crates/rome_js_analyze/tests/specs/correctness/noSwitchDeclarations/valid.jsonc.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUnreachableSuper/duplicateSuper.js b/crates/rome_js_analyze/tests/specs/correctness/noUnreachableSuper/duplicateSuper.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noUnreachableSuper/duplicateSuper.js rename to crates/rome_js_analyze/tests/specs/correctness/noUnreachableSuper/duplicateSuper.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUnreachableSuper/duplicateSuper.js.snap b/crates/rome_js_analyze/tests/specs/correctness/noUnreachableSuper/duplicateSuper.js.snap similarity index 81% rename from crates/rome_js_analyze/tests/specs/nursery/noUnreachableSuper/duplicateSuper.js.snap rename to crates/rome_js_analyze/tests/specs/correctness/noUnreachableSuper/duplicateSuper.js.snap index 871f031f6d0..5b9d91b2c09 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noUnreachableSuper/duplicateSuper.js.snap +++ b/crates/rome_js_analyze/tests/specs/correctness/noUnreachableSuper/duplicateSuper.js.snap @@ -1,5 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs +assertion_line: 96 expression: duplicateSuper.js --- # Input @@ -70,7 +71,7 @@ class G extends A { # Diagnostics ``` -duplicateSuper.js:14:5 lint/nursery/noUnreachableSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +duplicateSuper.js:14:5 lint/correctness/noUnreachableSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This constructor has code paths where `super()` is called more than once. @@ -107,7 +108,7 @@ duplicateSuper.js:14:5 lint/nursery/noUnreachableSuper ━━━━━━━━ ``` ``` -duplicateSuper.js:22:5 lint/nursery/noUnreachableSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +duplicateSuper.js:22:5 lint/correctness/noUnreachableSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This constructor has code paths where `super()` is called more than once. @@ -145,7 +146,7 @@ duplicateSuper.js:22:5 lint/nursery/noUnreachableSuper ━━━━━━━━ ``` ``` -duplicateSuper.js:33:5 lint/nursery/noUnreachableSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +duplicateSuper.js:33:5 lint/correctness/noUnreachableSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This constructor calls `super()` in a loop. @@ -174,7 +175,7 @@ duplicateSuper.js:33:5 lint/nursery/noUnreachableSuper ━━━━━━━━ ``` ``` -duplicateSuper.js:42:5 lint/nursery/noUnreachableSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +duplicateSuper.js:42:5 lint/correctness/noUnreachableSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This constructor has code paths where `super()` is called more than once. @@ -212,7 +213,7 @@ duplicateSuper.js:42:5 lint/nursery/noUnreachableSuper ━━━━━━━━ ``` ``` -duplicateSuper.js:54:5 lint/nursery/noUnreachableSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +duplicateSuper.js:54:5 lint/correctness/noUnreachableSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This constructor calls `super()` in a loop. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUnreachableSuper/missingSuper.js b/crates/rome_js_analyze/tests/specs/correctness/noUnreachableSuper/missingSuper.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noUnreachableSuper/missingSuper.js rename to crates/rome_js_analyze/tests/specs/correctness/noUnreachableSuper/missingSuper.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUnreachableSuper/missingSuper.js.snap b/crates/rome_js_analyze/tests/specs/correctness/noUnreachableSuper/missingSuper.js.snap similarity index 82% rename from crates/rome_js_analyze/tests/specs/nursery/noUnreachableSuper/missingSuper.js.snap rename to crates/rome_js_analyze/tests/specs/correctness/noUnreachableSuper/missingSuper.js.snap index c619bac8d87..a5899cd112a 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noUnreachableSuper/missingSuper.js.snap +++ b/crates/rome_js_analyze/tests/specs/correctness/noUnreachableSuper/missingSuper.js.snap @@ -1,5 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs +assertion_line: 96 expression: missingSuper.js --- # Input @@ -82,7 +83,7 @@ class G extends A { # Diagnostics ``` -missingSuper.js:19:5 lint/nursery/noUnreachableSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +missingSuper.js:19:5 lint/correctness/noUnreachableSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This constructor has code paths that return without calling `super()`. @@ -104,7 +105,7 @@ missingSuper.js:19:5 lint/nursery/noUnreachableSuper ━━━━━━━━━ ``` ``` -missingSuper.js:28:5 lint/nursery/noUnreachableSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +missingSuper.js:28:5 lint/correctness/noUnreachableSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This constructor has code paths that return without calling `super()`. @@ -126,7 +127,7 @@ missingSuper.js:28:5 lint/nursery/noUnreachableSuper ━━━━━━━━━ ``` ``` -missingSuper.js:41:5 lint/nursery/noUnreachableSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +missingSuper.js:41:5 lint/correctness/noUnreachableSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This constructor has code paths that return without calling `super()` first. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUnreachableSuper/thisBeforeSuper.js b/crates/rome_js_analyze/tests/specs/correctness/noUnreachableSuper/thisBeforeSuper.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noUnreachableSuper/thisBeforeSuper.js rename to crates/rome_js_analyze/tests/specs/correctness/noUnreachableSuper/thisBeforeSuper.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUnreachableSuper/thisBeforeSuper.js.snap b/crates/rome_js_analyze/tests/specs/correctness/noUnreachableSuper/thisBeforeSuper.js.snap similarity index 83% rename from crates/rome_js_analyze/tests/specs/nursery/noUnreachableSuper/thisBeforeSuper.js.snap rename to crates/rome_js_analyze/tests/specs/correctness/noUnreachableSuper/thisBeforeSuper.js.snap index adac8f29a40..1bd924f4a36 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noUnreachableSuper/thisBeforeSuper.js.snap +++ b/crates/rome_js_analyze/tests/specs/correctness/noUnreachableSuper/thisBeforeSuper.js.snap @@ -1,5 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs +assertion_line: 96 expression: thisBeforeSuper.js --- # Input @@ -61,7 +62,7 @@ class F extends A { # Diagnostics ``` -thisBeforeSuper.js:24:5 lint/nursery/noUnreachableSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +thisBeforeSuper.js:24:5 lint/correctness/noUnreachableSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This constructor has code paths accessing `this` before `super()` is called. @@ -100,7 +101,7 @@ thisBeforeSuper.js:24:5 lint/nursery/noUnreachableSuper ━━━━━━━━ ``` ``` -thisBeforeSuper.js:32:5 lint/nursery/noUnreachableSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +thisBeforeSuper.js:32:5 lint/correctness/noUnreachableSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This constructor has code paths accessing `this` without calling `super()` first. @@ -131,7 +132,7 @@ thisBeforeSuper.js:32:5 lint/nursery/noUnreachableSuper ━━━━━━━━ ``` ``` -thisBeforeSuper.js:45:5 lint/nursery/noUnreachableSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +thisBeforeSuper.js:45:5 lint/correctness/noUnreachableSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This constructor has code paths accessing `this` without calling `super()` first. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUnsafeOptionalChaining/invalid.cjs b/crates/rome_js_analyze/tests/specs/correctness/noUnsafeOptionalChaining/invalid.cjs similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noUnsafeOptionalChaining/invalid.cjs rename to crates/rome_js_analyze/tests/specs/correctness/noUnsafeOptionalChaining/invalid.cjs diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUnsafeOptionalChaining/invalid.cjs.snap b/crates/rome_js_analyze/tests/specs/correctness/noUnsafeOptionalChaining/invalid.cjs.snap similarity index 67% rename from crates/rome_js_analyze/tests/specs/nursery/noUnsafeOptionalChaining/invalid.cjs.snap rename to crates/rome_js_analyze/tests/specs/correctness/noUnsafeOptionalChaining/invalid.cjs.snap index 14a35560de4..16ac92de4af 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noUnsafeOptionalChaining/invalid.cjs.snap +++ b/crates/rome_js_analyze/tests/specs/correctness/noUnsafeOptionalChaining/invalid.cjs.snap @@ -1,5 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs +assertion_line: 96 expression: invalid.cjs --- # Input @@ -10,7 +11,7 @@ with (obj?.foo) {}; # Diagnostics ``` -invalid.cjs:1:10 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.cjs:1:10 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUnsafeOptionalChaining/invalid.js b/crates/rome_js_analyze/tests/specs/correctness/noUnsafeOptionalChaining/invalid.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noUnsafeOptionalChaining/invalid.js rename to crates/rome_js_analyze/tests/specs/correctness/noUnsafeOptionalChaining/invalid.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUnsafeOptionalChaining/invalid.js.snap b/crates/rome_js_analyze/tests/specs/correctness/noUnsafeOptionalChaining/invalid.js.snap similarity index 81% rename from crates/rome_js_analyze/tests/specs/nursery/noUnsafeOptionalChaining/invalid.js.snap rename to crates/rome_js_analyze/tests/specs/correctness/noUnsafeOptionalChaining/invalid.js.snap index 224582ff060..76a9db2add4 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noUnsafeOptionalChaining/invalid.js.snap +++ b/crates/rome_js_analyze/tests/specs/correctness/noUnsafeOptionalChaining/invalid.js.snap @@ -1,5 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs +assertion_line: 96 expression: invalid.js --- # Input @@ -90,7 +91,7 @@ async function foo() { with ( await obj?.foo) {}; } # Diagnostics ``` -invalid.js:1:5 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:1:5 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -110,7 +111,7 @@ invalid.js:1:5 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━ ``` ``` -invalid.js:2:16 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:2:16 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -132,7 +133,7 @@ invalid.js:2:16 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:3:16 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:3:16 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -156,7 +157,7 @@ invalid.js:3:16 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:4:5 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:4:5 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -180,7 +181,7 @@ invalid.js:4:5 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━ ``` ``` -invalid.js:5:12 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:5:12 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -204,7 +205,7 @@ invalid.js:5:12 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:6:10 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:6:10 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -228,7 +229,7 @@ invalid.js:6:10 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:7:5 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:7:5 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -252,7 +253,7 @@ invalid.js:7:5 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━ ``` ``` -invalid.js:8:5 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:8:5 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -276,7 +277,7 @@ invalid.js:8:5 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━ ``` ``` -invalid.js:9:5 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:9:5 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -300,7 +301,7 @@ invalid.js:9:5 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━ ``` ``` -invalid.js:10:9 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:10:9 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -324,7 +325,7 @@ invalid.js:10:9 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:11:14 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:11:14 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -348,7 +349,7 @@ invalid.js:11:14 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:12:25 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:12:25 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -372,7 +373,7 @@ invalid.js:12:25 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:13:34 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:13:34 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -396,7 +397,7 @@ invalid.js:13:34 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:14:34 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:14:34 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -420,7 +421,7 @@ invalid.js:14:34 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:15:46 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:15:46 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -444,7 +445,7 @@ invalid.js:15:46 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:16:41 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:16:41 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -468,7 +469,7 @@ invalid.js:16:41 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:17:42 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:17:42 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -492,7 +493,7 @@ invalid.js:17:42 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:20:8 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:20:8 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -514,7 +515,7 @@ invalid.js:20:8 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:21:11 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:21:11 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -538,7 +539,7 @@ invalid.js:21:11 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:22:15 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:22:15 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -562,7 +563,7 @@ invalid.js:22:15 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:25:18 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:25:18 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -584,7 +585,7 @@ invalid.js:25:18 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:26:18 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:26:18 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -608,7 +609,7 @@ invalid.js:26:18 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:27:23 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:27:23 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -632,7 +633,7 @@ invalid.js:27:23 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:28:18 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:28:18 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -656,7 +657,7 @@ invalid.js:28:18 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:29:30 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:29:30 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -680,7 +681,7 @@ invalid.js:29:30 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:30:13 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:30:13 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -704,7 +705,7 @@ invalid.js:30:13 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:31:23 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:31:23 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -728,7 +729,7 @@ invalid.js:31:23 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:32:15 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:32:15 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -752,7 +753,7 @@ invalid.js:32:15 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:33:21 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:33:21 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -776,7 +777,7 @@ invalid.js:33:21 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:34:15 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:34:15 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -800,7 +801,7 @@ invalid.js:34:15 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:35:47 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:35:47 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -824,7 +825,7 @@ invalid.js:35:47 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:36:47 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:36:47 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -848,7 +849,7 @@ invalid.js:36:47 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:37:65 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:37:65 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -872,7 +873,7 @@ invalid.js:37:65 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:38:42 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:38:42 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -896,7 +897,7 @@ invalid.js:38:42 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:41:20 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:41:20 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -918,7 +919,7 @@ invalid.js:41:20 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:42:50 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:42:50 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -942,7 +943,7 @@ invalid.js:42:50 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:45:28 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:45:28 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -964,7 +965,7 @@ invalid.js:45:28 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:46:58 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:46:58 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -988,7 +989,7 @@ invalid.js:46:58 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:49:19 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:49:19 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -1010,7 +1011,7 @@ invalid.js:49:19 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:50:48 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:50:48 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -1034,7 +1035,7 @@ invalid.js:50:48 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:51:9 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:51:9 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -1058,7 +1059,7 @@ invalid.js:51:9 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:52:38 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:52:38 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -1082,7 +1083,7 @@ invalid.js:52:38 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:55:16 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:55:16 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -1104,7 +1105,7 @@ invalid.js:55:16 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:56:45 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:56:45 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -1128,7 +1129,7 @@ invalid.js:56:45 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:59:10 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:59:10 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -1150,7 +1151,7 @@ invalid.js:59:10 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:60:10 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:60:10 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -1174,7 +1175,7 @@ invalid.js:60:10 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:61:41 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:61:41 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -1198,7 +1199,7 @@ invalid.js:61:41 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:62:40 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:62:40 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -1222,7 +1223,7 @@ invalid.js:62:40 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:63:39 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:63:39 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -1246,7 +1247,7 @@ invalid.js:63:39 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:64:40 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:64:40 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -1270,7 +1271,7 @@ invalid.js:64:40 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:67:9 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:67:9 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -1292,7 +1293,7 @@ invalid.js:67:9 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:68:13 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:68:13 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -1316,7 +1317,7 @@ invalid.js:68:13 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:69:9 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:69:9 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -1340,7 +1341,7 @@ invalid.js:69:9 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:70:13 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:70:13 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -1364,7 +1365,7 @@ invalid.js:70:13 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:71:39 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:71:39 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -1388,7 +1389,7 @@ invalid.js:71:39 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:72:38 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:72:38 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -1412,7 +1413,7 @@ invalid.js:72:38 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:73:43 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:73:43 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -1436,7 +1437,7 @@ invalid.js:73:43 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:74:39 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:74:39 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -1460,7 +1461,7 @@ invalid.js:74:39 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:75:43 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:75:43 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -1484,7 +1485,7 @@ invalid.js:75:43 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:76:42 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:76:42 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -1508,7 +1509,7 @@ invalid.js:76:42 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:78:5 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:78:5 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -1532,7 +1533,7 @@ invalid.js:78:5 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:78:17 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:78:17 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -1556,7 +1557,7 @@ invalid.js:78:17 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:81:11 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:81:11 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. @@ -1576,7 +1577,7 @@ invalid.js:81:11 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━ ``` ``` -invalid.js:81:22 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:81:22 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unsafe usage of optional chaining. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUnsafeOptionalChaining/valid.js b/crates/rome_js_analyze/tests/specs/correctness/noUnsafeOptionalChaining/valid.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noUnsafeOptionalChaining/valid.js rename to crates/rome_js_analyze/tests/specs/correctness/noUnsafeOptionalChaining/valid.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUnsafeOptionalChaining/valid.js.snap b/crates/rome_js_analyze/tests/specs/correctness/noUnsafeOptionalChaining/valid.js.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noUnsafeOptionalChaining/valid.js.snap rename to crates/rome_js_analyze/tests/specs/correctness/noUnsafeOptionalChaining/valid.js.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUnsafeOptionalChaining/validArithmetic.js b/crates/rome_js_analyze/tests/specs/correctness/noUnsafeOptionalChaining/validArithmetic.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noUnsafeOptionalChaining/validArithmetic.js rename to crates/rome_js_analyze/tests/specs/correctness/noUnsafeOptionalChaining/validArithmetic.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUnsafeOptionalChaining/validArithmetic.js.snap b/crates/rome_js_analyze/tests/specs/correctness/noUnsafeOptionalChaining/validArithmetic.js.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noUnsafeOptionalChaining/validArithmetic.js.snap rename to crates/rome_js_analyze/tests/specs/correctness/noUnsafeOptionalChaining/validArithmetic.js.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUnusedLabels/invalid.js b/crates/rome_js_analyze/tests/specs/correctness/noUnusedLabels/invalid.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noUnusedLabels/invalid.js rename to crates/rome_js_analyze/tests/specs/correctness/noUnusedLabels/invalid.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUnusedLabels/invalid.js.snap b/crates/rome_js_analyze/tests/specs/correctness/noUnusedLabels/invalid.js.snap similarity index 66% rename from crates/rome_js_analyze/tests/specs/nursery/noUnusedLabels/invalid.js.snap rename to crates/rome_js_analyze/tests/specs/correctness/noUnusedLabels/invalid.js.snap index 1a12247d845..a2d490bc8dc 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noUnusedLabels/invalid.js.snap +++ b/crates/rome_js_analyze/tests/specs/correctness/noUnusedLabels/invalid.js.snap @@ -1,6 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs -assertion_line: 92 +assertion_line: 96 expression: invalid.js --- # Input @@ -83,7 +83,7 @@ M: { # Diagnostics ``` -invalid.js:1:12 lint/nursery/noUnusedLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:1:12 lint/correctness/noUnusedLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unused label. @@ -100,7 +100,7 @@ invalid.js:1:12 lint/nursery/noUnusedLabels FIXABLE ━━━━━━━━ ``` ``` -invalid.js:3:1 lint/nursery/noUnusedLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:3:1 lint/correctness/noUnusedLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unused label. @@ -119,7 +119,7 @@ invalid.js:3:1 lint/nursery/noUnusedLabels FIXABLE ━━━━━━━━━ ``` ``` -invalid.js:7:1 lint/nursery/noUnusedLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:7:1 lint/correctness/noUnusedLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unused label. @@ -138,7 +138,7 @@ invalid.js:7:1 lint/nursery/noUnusedLabels FIXABLE ━━━━━━━━━ ``` ``` -invalid.js:11:1 lint/nursery/noUnusedLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:11:1 lint/correctness/noUnusedLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unused label. @@ -157,7 +157,7 @@ invalid.js:11:1 lint/nursery/noUnusedLabels FIXABLE ━━━━━━━━ ``` ``` -invalid.js:13:1 lint/nursery/noUnusedLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:13:1 lint/correctness/noUnusedLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unused label. @@ -176,7 +176,7 @@ invalid.js:13:1 lint/nursery/noUnusedLabels FIXABLE ━━━━━━━━ ``` ``` -invalid.js:18:1 lint/nursery/noUnusedLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:18:1 lint/correctness/noUnusedLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unused label. @@ -195,7 +195,7 @@ invalid.js:18:1 lint/nursery/noUnusedLabels FIXABLE ━━━━━━━━ ``` ``` -invalid.js:24:1 lint/nursery/noUnusedLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:24:1 lint/correctness/noUnusedLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unused label. @@ -214,7 +214,7 @@ invalid.js:24:1 lint/nursery/noUnusedLabels FIXABLE ━━━━━━━━ ``` ``` -invalid.js:31:2 lint/nursery/noUnusedLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:31:2 lint/correctness/noUnusedLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unused label. @@ -232,7 +232,7 @@ invalid.js:31:2 lint/nursery/noUnusedLabels FIXABLE ━━━━━━━━ ``` ``` -invalid.js:34:1 lint/nursery/noUnusedLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:34:1 lint/correctness/noUnusedLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unused label. @@ -251,7 +251,7 @@ invalid.js:34:1 lint/nursery/noUnusedLabels FIXABLE ━━━━━━━━ ``` ``` -invalid.js:39:1 lint/nursery/noUnusedLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:39:1 lint/correctness/noUnusedLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unused label. @@ -270,7 +270,7 @@ invalid.js:39:1 lint/nursery/noUnusedLabels FIXABLE ━━━━━━━━ ``` ``` -invalid.js:41:1 lint/nursery/noUnusedLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:41:1 lint/correctness/noUnusedLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unused label. @@ -289,7 +289,7 @@ invalid.js:41:1 lint/nursery/noUnusedLabels FIXABLE ━━━━━━━━ ``` ``` -invalid.js:43:1 lint/nursery/noUnusedLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:43:1 lint/correctness/noUnusedLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unused label. @@ -308,7 +308,7 @@ invalid.js:43:1 lint/nursery/noUnusedLabels FIXABLE ━━━━━━━━ ``` ``` -invalid.js:51:1 lint/nursery/noUnusedLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:51:1 lint/correctness/noUnusedLabels FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unused label. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUnusedLabels/valid.js b/crates/rome_js_analyze/tests/specs/correctness/noUnusedLabels/valid.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noUnusedLabels/valid.js rename to crates/rome_js_analyze/tests/specs/correctness/noUnusedLabels/valid.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noUnusedLabels/valid.js.snap b/crates/rome_js_analyze/tests/specs/correctness/noUnusedLabels/valid.js.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noUnusedLabels/valid.js.snap rename to crates/rome_js_analyze/tests/specs/correctness/noUnusedLabels/valid.js.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/useYield/invalid.js b/crates/rome_js_analyze/tests/specs/correctness/useYield/invalid.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/useYield/invalid.js rename to crates/rome_js_analyze/tests/specs/correctness/useYield/invalid.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/useYield/invalid.js.snap b/crates/rome_js_analyze/tests/specs/correctness/useYield/invalid.js.snap similarity index 72% rename from crates/rome_js_analyze/tests/specs/nursery/useYield/invalid.js.snap rename to crates/rome_js_analyze/tests/specs/correctness/useYield/invalid.js.snap index 11edc88e8bf..1724356de2d 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/useYield/invalid.js.snap +++ b/crates/rome_js_analyze/tests/specs/correctness/useYield/invalid.js.snap @@ -1,5 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs +assertion_line: 96 expression: invalid.js --- # Input @@ -66,7 +67,7 @@ function* foo() { # Diagnostics ``` -invalid.js:1:1 lint/nursery/useYield ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:1:1 lint/correctness/useYield ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This generator function doesn't contain yield. @@ -82,7 +83,7 @@ invalid.js:1:1 lint/nursery/useYield ━━━━━━━━━━━━━━ ``` ``` -invalid.js:5:2 lint/nursery/useYield ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:5:2 lint/correctness/useYield ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This generator function doesn't contain yield. @@ -100,7 +101,7 @@ invalid.js:5:2 lint/nursery/useYield ━━━━━━━━━━━━━━ ``` ``` -invalid.js:10:2 lint/nursery/useYield ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:10:2 lint/correctness/useYield ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This generator function doesn't contain yield. @@ -117,7 +118,7 @@ invalid.js:10:2 lint/nursery/useYield ━━━━━━━━━━━━━━ ``` ``` -invalid.js:16:2 lint/nursery/useYield ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:16:2 lint/correctness/useYield ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This generator function doesn't contain yield. @@ -134,7 +135,7 @@ invalid.js:16:2 lint/nursery/useYield ━━━━━━━━━━━━━━ ``` ``` -invalid.js:21:1 lint/nursery/useYield ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:21:1 lint/correctness/useYield ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This generator function doesn't contain yield. @@ -154,7 +155,7 @@ invalid.js:21:1 lint/nursery/useYield ━━━━━━━━━━━━━━ ``` ``` -invalid.js:28:2 lint/nursery/useYield ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:28:2 lint/correctness/useYield ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This generator function doesn't contain yield. @@ -171,7 +172,7 @@ invalid.js:28:2 lint/nursery/useYield ━━━━━━━━━━━━━━ ``` ``` -invalid.js:34:1 lint/nursery/useYield ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:34:1 lint/correctness/useYield ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This generator function doesn't contain yield. @@ -192,7 +193,7 @@ invalid.js:34:1 lint/nursery/useYield ━━━━━━━━━━━━━━ ``` ``` -invalid.js:43:3 lint/nursery/useYield ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:43:3 lint/correctness/useYield ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This generator function doesn't contain yield. @@ -210,7 +211,7 @@ invalid.js:43:3 lint/nursery/useYield ━━━━━━━━━━━━━━ ``` ``` -invalid.js:49:3 lint/nursery/useYield ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:49:3 lint/correctness/useYield ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This generator function doesn't contain yield. diff --git a/crates/rome_js_analyze/tests/specs/nursery/useYield/valid.js b/crates/rome_js_analyze/tests/specs/correctness/useYield/valid.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/useYield/valid.js rename to crates/rome_js_analyze/tests/specs/correctness/useYield/valid.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/useYield/valid.js.snap b/crates/rome_js_analyze/tests/specs/correctness/useYield/valid.js.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/useYield/valid.js.snap rename to crates/rome_js_analyze/tests/specs/correctness/useYield/valid.js.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noSelfAssign/invalid.js.snap b/crates/rome_js_analyze/tests/specs/nursery/noSelfAssign/invalid.js.snap index 79d6caab868..aa9c1b4c9cc 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noSelfAssign/invalid.js.snap +++ b/crates/rome_js_analyze/tests/specs/nursery/noSelfAssign/invalid.js.snap @@ -1,6 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs -assertion_line: 91 +assertion_line: 96 expression: invalid.js --- # Input diff --git a/crates/rome_js_analyze/tests/specs/nursery/noCommaOperator/invalid.jsonc b/crates/rome_js_analyze/tests/specs/style/noCommaOperator/invalid.jsonc similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noCommaOperator/invalid.jsonc rename to crates/rome_js_analyze/tests/specs/style/noCommaOperator/invalid.jsonc diff --git a/crates/rome_js_analyze/tests/specs/nursery/noCommaOperator/invalid.jsonc.snap b/crates/rome_js_analyze/tests/specs/style/noCommaOperator/invalid.jsonc.snap similarity index 70% rename from crates/rome_js_analyze/tests/specs/nursery/noCommaOperator/invalid.jsonc.snap rename to crates/rome_js_analyze/tests/specs/style/noCommaOperator/invalid.jsonc.snap index 6df1f2ed734..25dfd2fa913 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noCommaOperator/invalid.jsonc.snap +++ b/crates/rome_js_analyze/tests/specs/style/noCommaOperator/invalid.jsonc.snap @@ -1,6 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs -assertion_line: 92 +assertion_line: 96 expression: invalid.jsonc --- # Input @@ -10,7 +10,7 @@ a = 1, 2 # Diagnostics ``` -invalid.jsonc:1:6 lint/nursery/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:6 lint/style/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The comma operator is disallowed. @@ -29,7 +29,7 @@ do {} while (doSomething(), !!test); # Diagnostics ``` -invalid.jsonc:1:27 lint/nursery/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:27 lint/style/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The comma operator is disallowed. @@ -48,7 +48,7 @@ for (; doSomething(), !!test; ); # Diagnostics ``` -invalid.jsonc:1:21 lint/nursery/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:21 lint/style/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The comma operator is disallowed. @@ -67,7 +67,7 @@ if (doSomething(), !!test); # Diagnostics ``` -invalid.jsonc:1:18 lint/nursery/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:18 lint/style/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The comma operator is disallowed. @@ -86,7 +86,7 @@ switch (doSomething(), val) {} # Diagnostics ``` -invalid.jsonc:1:22 lint/nursery/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:22 lint/style/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The comma operator is disallowed. @@ -105,7 +105,7 @@ while (doSomething(), !!test); # Diagnostics ``` -invalid.jsonc:1:21 lint/nursery/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:21 lint/style/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The comma operator is disallowed. @@ -124,7 +124,7 @@ with (doSomething(), val) {} # Diagnostics ``` -invalid.jsonc:1:20 lint/nursery/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:20 lint/style/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The comma operator is disallowed. @@ -143,7 +143,7 @@ a => (doSomething(), a) # Diagnostics ``` -invalid.jsonc:1:20 lint/nursery/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:20 lint/style/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The comma operator is disallowed. @@ -162,7 +162,7 @@ invalid.jsonc:1:20 lint/nursery/noCommaOperator ━━━━━━━━━━ # Diagnostics ``` -invalid.jsonc:1:4 lint/nursery/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:4 lint/style/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The comma operator is disallowed. @@ -181,7 +181,7 @@ invalid.jsonc:1:4 lint/nursery/noCommaOperator ━━━━━━━━━━━ # Diagnostics ``` -invalid.jsonc:1:7 lint/nursery/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:7 lint/style/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The comma operator is disallowed. @@ -200,7 +200,7 @@ while((1) , 2); # Diagnostics ``` -invalid.jsonc:1:11 lint/nursery/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:11 lint/style/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The comma operator is disallowed. @@ -219,7 +219,7 @@ var foo = (1, 2); # Diagnostics ``` -invalid.jsonc:1:13 lint/nursery/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:13 lint/style/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The comma operator is disallowed. @@ -238,7 +238,7 @@ invalid.jsonc:1:13 lint/nursery/noCommaOperator ━━━━━━━━━━ # Diagnostics ``` -invalid.jsonc:1:3 lint/nursery/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:3 lint/style/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The comma operator is disallowed. @@ -257,7 +257,7 @@ foo(a, (b, c), d); # Diagnostics ``` -invalid.jsonc:1:10 lint/nursery/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:10 lint/style/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The comma operator is disallowed. @@ -276,7 +276,7 @@ do {} while ((doSomething(), !!test)); # Diagnostics ``` -invalid.jsonc:1:28 lint/nursery/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:28 lint/style/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The comma operator is disallowed. @@ -295,7 +295,7 @@ for (; (doSomething(), !!test); ); # Diagnostics ``` -invalid.jsonc:1:22 lint/nursery/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:22 lint/style/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The comma operator is disallowed. @@ -314,7 +314,7 @@ if ((doSomething(), !!test)); # Diagnostics ``` -invalid.jsonc:1:19 lint/nursery/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:19 lint/style/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The comma operator is disallowed. @@ -333,7 +333,7 @@ switch ((doSomething(), val)) {} # Diagnostics ``` -invalid.jsonc:1:23 lint/nursery/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:23 lint/style/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The comma operator is disallowed. @@ -352,7 +352,7 @@ while ((doSomething(), !!test)); # Diagnostics ``` -invalid.jsonc:1:22 lint/nursery/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:22 lint/style/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The comma operator is disallowed. @@ -371,7 +371,7 @@ with ((doSomething(), val)) {} # Diagnostics ``` -invalid.jsonc:1:21 lint/nursery/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:21 lint/style/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The comma operator is disallowed. @@ -390,7 +390,7 @@ a => ((doSomething(), a)) # Diagnostics ``` -invalid.jsonc:1:21 lint/nursery/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:21 lint/style/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The comma operator is disallowed. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noCommaOperator/valid.jsonc b/crates/rome_js_analyze/tests/specs/style/noCommaOperator/valid.jsonc similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noCommaOperator/valid.jsonc rename to crates/rome_js_analyze/tests/specs/style/noCommaOperator/valid.jsonc diff --git a/crates/rome_js_analyze/tests/specs/nursery/noCommaOperator/valid.jsonc.snap b/crates/rome_js_analyze/tests/specs/style/noCommaOperator/valid.jsonc.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noCommaOperator/valid.jsonc.snap rename to crates/rome_js_analyze/tests/specs/style/noCommaOperator/valid.jsonc.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noInferrableTypes/invalid.ts b/crates/rome_js_analyze/tests/specs/style/noInferrableTypes/invalid.ts similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noInferrableTypes/invalid.ts rename to crates/rome_js_analyze/tests/specs/style/noInferrableTypes/invalid.ts diff --git a/crates/rome_js_analyze/tests/specs/nursery/noInferrableTypes/invalid.ts.snap b/crates/rome_js_analyze/tests/specs/style/noInferrableTypes/invalid.ts.snap similarity index 75% rename from crates/rome_js_analyze/tests/specs/nursery/noInferrableTypes/invalid.ts.snap rename to crates/rome_js_analyze/tests/specs/style/noInferrableTypes/invalid.ts.snap index a5cf7d3f3c0..1711dbe42a1 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noInferrableTypes/invalid.ts.snap +++ b/crates/rome_js_analyze/tests/specs/style/noInferrableTypes/invalid.ts.snap @@ -1,6 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs -assertion_line: 92 +assertion_line: 96 expression: invalid.ts --- # Input @@ -67,7 +67,7 @@ class X { # Diagnostics ``` -invalid.ts:2:18 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:2:18 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -85,7 +85,7 @@ invalid.ts:2:18 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━ ``` ``` -invalid.ts:4:8 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:4:8 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -104,7 +104,7 @@ invalid.ts:4:8 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━ ``` ``` -invalid.ts:5:8 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:5:8 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -122,7 +122,7 @@ invalid.ts:5:8 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━ ``` ``` -invalid.ts:6:8 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:6:8 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -141,7 +141,7 @@ invalid.ts:6:8 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━ ``` ``` -invalid.ts:7:8 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:7:8 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -160,7 +160,7 @@ invalid.ts:7:8 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━ ``` ``` -invalid.ts:8:8 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:8:8 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -179,7 +179,7 @@ invalid.ts:8:8 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━ ``` ``` -invalid.ts:9:8 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:9:8 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -198,7 +198,7 @@ invalid.ts:9:8 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━ ``` ``` -invalid.ts:10:8 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:10:8 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -217,7 +217,7 @@ invalid.ts:10:8 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━ ``` ``` -invalid.ts:11:8 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:11:8 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -236,7 +236,7 @@ invalid.ts:11:8 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━ ``` ``` -invalid.ts:12:8 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:12:8 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -255,7 +255,7 @@ invalid.ts:12:8 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━ ``` ``` -invalid.ts:13:8 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:13:8 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -274,7 +274,7 @@ invalid.ts:13:8 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━ ``` ``` -invalid.ts:14:8 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:14:8 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -293,7 +293,7 @@ invalid.ts:14:8 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━ ``` ``` -invalid.ts:15:8 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:15:8 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -312,7 +312,7 @@ invalid.ts:15:8 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━ ``` ``` -invalid.ts:17:8 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:17:8 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -331,7 +331,7 @@ invalid.ts:17:8 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━ ``` ``` -invalid.ts:18:8 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:18:8 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -350,7 +350,7 @@ invalid.ts:18:8 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━ ``` ``` -invalid.ts:19:8 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:19:8 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -369,7 +369,7 @@ invalid.ts:19:8 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━ ``` ``` -invalid.ts:20:8 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:20:8 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -388,7 +388,7 @@ invalid.ts:20:8 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━ ``` ``` -invalid.ts:23:12 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:23:12 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -406,7 +406,7 @@ invalid.ts:23:12 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━ ``` ``` -invalid.ts:27:24 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:27:24 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -424,7 +424,7 @@ invalid.ts:27:24 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━ ``` ``` -invalid.ts:31:17 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:31:17 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -442,7 +442,7 @@ invalid.ts:31:17 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━ ``` ``` -invalid.ts:33:6 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:33:6 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -461,7 +461,7 @@ invalid.ts:33:6 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━ ``` ``` -invalid.ts:34:6 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:34:6 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -479,7 +479,7 @@ invalid.ts:34:6 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━ ``` ``` -invalid.ts:35:6 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:35:6 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -498,7 +498,7 @@ invalid.ts:35:6 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━ ``` ``` -invalid.ts:36:6 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:36:6 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -517,7 +517,7 @@ invalid.ts:36:6 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━ ``` ``` -invalid.ts:37:6 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:37:6 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -536,7 +536,7 @@ invalid.ts:37:6 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━ ``` ``` -invalid.ts:38:6 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:38:6 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -555,7 +555,7 @@ invalid.ts:38:6 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━ ``` ``` -invalid.ts:39:6 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:39:6 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -574,7 +574,7 @@ invalid.ts:39:6 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━ ``` ``` -invalid.ts:40:6 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:40:6 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -593,7 +593,7 @@ invalid.ts:40:6 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━ ``` ``` -invalid.ts:41:6 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:41:6 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -612,7 +612,7 @@ invalid.ts:41:6 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━ ``` ``` -invalid.ts:43:6 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:43:6 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -631,7 +631,7 @@ invalid.ts:43:6 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━ ``` ``` -invalid.ts:44:6 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:44:6 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -650,7 +650,7 @@ invalid.ts:44:6 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━ ``` ``` -invalid.ts:45:6 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:45:6 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -669,7 +669,7 @@ invalid.ts:45:6 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━ ``` ``` -invalid.ts:46:6 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:46:6 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -688,7 +688,7 @@ invalid.ts:46:6 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━ ``` ``` -invalid.ts:47:6 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:47:6 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -707,7 +707,7 @@ invalid.ts:47:6 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━ ``` ``` -invalid.ts:49:13 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:49:13 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -726,7 +726,7 @@ invalid.ts:49:13 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━ ``` ``` -invalid.ts:52:3 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:52:3 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. @@ -744,7 +744,7 @@ invalid.ts:52:3 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━ ``` ``` -invalid.ts:56:25 lint/nursery/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:56:25 lint/style/noInferrableTypes FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This type annotation is trivially inferred from its initialization. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noInferrableTypes/valid.ts b/crates/rome_js_analyze/tests/specs/style/noInferrableTypes/valid.ts similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noInferrableTypes/valid.ts rename to crates/rome_js_analyze/tests/specs/style/noInferrableTypes/valid.ts diff --git a/crates/rome_js_analyze/tests/specs/nursery/noInferrableTypes/valid.ts.snap b/crates/rome_js_analyze/tests/specs/style/noInferrableTypes/valid.ts.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noInferrableTypes/valid.ts.snap rename to crates/rome_js_analyze/tests/specs/style/noInferrableTypes/valid.ts.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noNamespace/invalid.ts b/crates/rome_js_analyze/tests/specs/style/noNamespace/invalid.ts similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noNamespace/invalid.ts rename to crates/rome_js_analyze/tests/specs/style/noNamespace/invalid.ts diff --git a/crates/rome_js_analyze/tests/specs/nursery/noNamespace/invalid.ts.snap b/crates/rome_js_analyze/tests/specs/style/noNamespace/invalid.ts.snap similarity index 69% rename from crates/rome_js_analyze/tests/specs/nursery/noNamespace/invalid.ts.snap rename to crates/rome_js_analyze/tests/specs/style/noNamespace/invalid.ts.snap index ff2a77efb37..f8fd47dfe87 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noNamespace/invalid.ts.snap +++ b/crates/rome_js_analyze/tests/specs/style/noNamespace/invalid.ts.snap @@ -1,5 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs +assertion_line: 96 expression: invalid.ts --- # Input @@ -14,7 +15,7 @@ declare namespace foo {} # Diagnostics ``` -invalid.ts:1:1 lint/nursery/noNamespace ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:1:1 lint/style/noNamespace ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! TypeScript's namespaces are an oudated way to organize code. @@ -29,7 +30,7 @@ invalid.ts:1:1 lint/nursery/noNamespace ━━━━━━━━━━━━━ ``` ``` -invalid.ts:2:9 lint/nursery/noNamespace ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:2:9 lint/style/noNamespace ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! TypeScript's namespaces are an oudated way to organize code. @@ -45,7 +46,7 @@ invalid.ts:2:9 lint/nursery/noNamespace ━━━━━━━━━━━━━ ``` ``` -invalid.ts:4:1 lint/nursery/noNamespace ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:4:1 lint/style/noNamespace ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! TypeScript's namespaces are an oudated way to organize code. @@ -62,7 +63,7 @@ invalid.ts:4:1 lint/nursery/noNamespace ━━━━━━━━━━━━━ ``` ``` -invalid.ts:5:9 lint/nursery/noNamespace ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:5:9 lint/style/noNamespace ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! TypeScript's namespaces are an oudated way to organize code. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noNamespace/valid.ts b/crates/rome_js_analyze/tests/specs/style/noNamespace/valid.ts similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noNamespace/valid.ts rename to crates/rome_js_analyze/tests/specs/style/noNamespace/valid.ts diff --git a/crates/rome_js_analyze/tests/specs/nursery/noNamespace/valid.ts.snap b/crates/rome_js_analyze/tests/specs/style/noNamespace/valid.ts.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noNamespace/valid.ts.snap rename to crates/rome_js_analyze/tests/specs/style/noNamespace/valid.ts.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noParameterAssign/invalid.jsonc b/crates/rome_js_analyze/tests/specs/style/noParameterAssign/invalid.jsonc similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noParameterAssign/invalid.jsonc rename to crates/rome_js_analyze/tests/specs/style/noParameterAssign/invalid.jsonc diff --git a/crates/rome_js_analyze/tests/specs/nursery/noParameterAssign/invalid.jsonc.snap b/crates/rome_js_analyze/tests/specs/style/noParameterAssign/invalid.jsonc.snap similarity index 75% rename from crates/rome_js_analyze/tests/specs/nursery/noParameterAssign/invalid.jsonc.snap rename to crates/rome_js_analyze/tests/specs/style/noParameterAssign/invalid.jsonc.snap index 6bb6f62d214..20a35b60089 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noParameterAssign/invalid.jsonc.snap +++ b/crates/rome_js_analyze/tests/specs/style/noParameterAssign/invalid.jsonc.snap @@ -1,6 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs -assertion_line: 91 +assertion_line: 96 expression: invalid.jsonc --- # Input @@ -10,7 +10,7 @@ function foo(bar) { bar = 13; } # Diagnostics ``` -invalid.jsonc:1:21 lint/nursery/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:21 lint/style/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Reassigning a function parameter is confusing. @@ -34,7 +34,7 @@ function foo(bar) { bar += 13; } # Diagnostics ``` -invalid.jsonc:1:21 lint/nursery/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:21 lint/style/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Reassigning a function parameter is confusing. @@ -58,7 +58,7 @@ function foo(bar) { (function() { bar = 13; })(); } # Diagnostics ``` -invalid.jsonc:1:35 lint/nursery/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:35 lint/style/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Reassigning a function parameter is confusing. @@ -82,7 +82,7 @@ function foo(bar) { ++bar; } # Diagnostics ``` -invalid.jsonc:1:23 lint/nursery/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:23 lint/style/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Reassigning a function parameter is confusing. @@ -106,7 +106,7 @@ function foo(bar) { ++bar; } # Diagnostics ``` -invalid.jsonc:1:23 lint/nursery/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:23 lint/style/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Reassigning a function parameter is confusing. @@ -130,7 +130,7 @@ function foo(bar) { --bar; } # Diagnostics ``` -invalid.jsonc:1:23 lint/nursery/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:23 lint/style/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Reassigning a function parameter is confusing. @@ -154,7 +154,7 @@ function foo(bar) { bar--; } # Diagnostics ``` -invalid.jsonc:1:21 lint/nursery/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:21 lint/style/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Reassigning a function parameter is confusing. @@ -178,7 +178,7 @@ function foo(bar) { bar--; } # Diagnostics ``` -invalid.jsonc:1:21 lint/nursery/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:21 lint/style/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Reassigning a function parameter is confusing. @@ -202,7 +202,7 @@ function foo(bar) { bar--; } # Diagnostics ``` -invalid.jsonc:1:21 lint/nursery/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:21 lint/style/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Reassigning a function parameter is confusing. @@ -226,7 +226,7 @@ function foo(bar) { ({bar} = {}); } # Diagnostics ``` -invalid.jsonc:1:23 lint/nursery/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:23 lint/style/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Reassigning a function parameter is confusing. @@ -250,7 +250,7 @@ function foo(bar) { ({x: [, bar = 0]} = {}); } # Diagnostics ``` -invalid.jsonc:1:29 lint/nursery/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:29 lint/style/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Reassigning a function parameter is confusing. @@ -274,7 +274,7 @@ function foo(bar) { for (bar in baz); } # Diagnostics ``` -invalid.jsonc:1:26 lint/nursery/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:26 lint/style/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Reassigning a function parameter is confusing. @@ -298,7 +298,7 @@ function foo(bar) { for (bar of baz); } # Diagnostics ``` -invalid.jsonc:1:26 lint/nursery/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:26 lint/style/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Reassigning a function parameter is confusing. @@ -322,7 +322,7 @@ function foo(a) { ({a} = obj); } # Diagnostics ``` -invalid.jsonc:1:21 lint/nursery/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:21 lint/style/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Reassigning a function parameter is confusing. @@ -346,7 +346,7 @@ function foo(a) { ([...a] = obj); } # Diagnostics ``` -invalid.jsonc:1:24 lint/nursery/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:24 lint/style/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Reassigning a function parameter is confusing. @@ -370,7 +370,7 @@ function foo(a) { ({...a} = obj); } # Diagnostics ``` -invalid.jsonc:1:24 lint/nursery/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:24 lint/style/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Reassigning a function parameter is confusing. @@ -394,7 +394,7 @@ function foo(a) { a &&= b; } # Diagnostics ``` -invalid.jsonc:1:19 lint/nursery/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:19 lint/style/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Reassigning a function parameter is confusing. @@ -418,7 +418,7 @@ function foo(a) { a ||= b; } # Diagnostics ``` -invalid.jsonc:1:19 lint/nursery/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:19 lint/style/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Reassigning a function parameter is confusing. @@ -442,7 +442,7 @@ function foo(a) { a ??= b; } # Diagnostics ``` -invalid.jsonc:1:19 lint/nursery/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:19 lint/style/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Reassigning a function parameter is confusing. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noParameterAssign/valid.jsonc b/crates/rome_js_analyze/tests/specs/style/noParameterAssign/valid.jsonc similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noParameterAssign/valid.jsonc rename to crates/rome_js_analyze/tests/specs/style/noParameterAssign/valid.jsonc diff --git a/crates/rome_js_analyze/tests/specs/nursery/noParameterAssign/valid.jsonc.snap b/crates/rome_js_analyze/tests/specs/style/noParameterAssign/valid.jsonc.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noParameterAssign/valid.jsonc.snap rename to crates/rome_js_analyze/tests/specs/style/noParameterAssign/valid.jsonc.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noParameterProperties/invalid.ts b/crates/rome_js_analyze/tests/specs/style/noParameterProperties/invalid.ts similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noParameterProperties/invalid.ts rename to crates/rome_js_analyze/tests/specs/style/noParameterProperties/invalid.ts diff --git a/crates/rome_js_analyze/tests/specs/nursery/noParameterProperties/invalid.ts.snap b/crates/rome_js_analyze/tests/specs/style/noParameterProperties/invalid.ts.snap similarity index 81% rename from crates/rome_js_analyze/tests/specs/nursery/noParameterProperties/invalid.ts.snap rename to crates/rome_js_analyze/tests/specs/style/noParameterProperties/invalid.ts.snap index d686874a8cb..0a38c7e80fc 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noParameterProperties/invalid.ts.snap +++ b/crates/rome_js_analyze/tests/specs/style/noParameterProperties/invalid.ts.snap @@ -1,6 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs -assertion_line: 92 +assertion_line: 96 expression: invalid.ts --- # Input @@ -36,7 +36,7 @@ export class Foo7 { # Diagnostics ``` -invalid.ts:2:15 lint/nursery/noParameterProperties ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:2:15 lint/style/noParameterProperties ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use a more explicit class property instead of a parameter property. @@ -52,7 +52,7 @@ invalid.ts:2:15 lint/nursery/noParameterProperties ━━━━━━━━━ ``` ``` -invalid.ts:6:15 lint/nursery/noParameterProperties ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:6:15 lint/style/noParameterProperties ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use a more explicit class property instead of a parameter property. @@ -68,7 +68,7 @@ invalid.ts:6:15 lint/nursery/noParameterProperties ━━━━━━━━━ ``` ``` -invalid.ts:10:15 lint/nursery/noParameterProperties ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:10:15 lint/style/noParameterProperties ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use a more explicit class property instead of a parameter property. @@ -84,7 +84,7 @@ invalid.ts:10:15 lint/nursery/noParameterProperties ━━━━━━━━━ ``` ``` -invalid.ts:14:15 lint/nursery/noParameterProperties ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:14:15 lint/style/noParameterProperties ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use a more explicit class property instead of a parameter property. @@ -100,7 +100,7 @@ invalid.ts:14:15 lint/nursery/noParameterProperties ━━━━━━━━━ ``` ``` -invalid.ts:18:15 lint/nursery/noParameterProperties ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:18:15 lint/style/noParameterProperties ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use a more explicit class property instead of a parameter property. @@ -116,7 +116,7 @@ invalid.ts:18:15 lint/nursery/noParameterProperties ━━━━━━━━━ ``` ``` -invalid.ts:22:15 lint/nursery/noParameterProperties ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:22:15 lint/style/noParameterProperties ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use a more explicit class property instead of a parameter property. @@ -132,7 +132,7 @@ invalid.ts:22:15 lint/nursery/noParameterProperties ━━━━━━━━━ ``` ``` -invalid.ts:26:15 lint/nursery/noParameterProperties ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:26:15 lint/style/noParameterProperties ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use a more explicit class property instead of a parameter property. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noParameterProperties/valid.ts b/crates/rome_js_analyze/tests/specs/style/noParameterProperties/valid.ts similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noParameterProperties/valid.ts rename to crates/rome_js_analyze/tests/specs/style/noParameterProperties/valid.ts diff --git a/crates/rome_js_analyze/tests/specs/nursery/noParameterProperties/valid.ts.snap b/crates/rome_js_analyze/tests/specs/style/noParameterProperties/valid.ts.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noParameterProperties/valid.ts.snap rename to crates/rome_js_analyze/tests/specs/style/noParameterProperties/valid.ts.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noRestrictedGlobals/invalid.jsonc b/crates/rome_js_analyze/tests/specs/style/noRestrictedGlobals/invalid.jsonc similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noRestrictedGlobals/invalid.jsonc rename to crates/rome_js_analyze/tests/specs/style/noRestrictedGlobals/invalid.jsonc diff --git a/crates/rome_js_analyze/tests/specs/nursery/noRestrictedGlobals/invalid.jsonc.snap b/crates/rome_js_analyze/tests/specs/style/noRestrictedGlobals/invalid.jsonc.snap similarity index 68% rename from crates/rome_js_analyze/tests/specs/nursery/noRestrictedGlobals/invalid.jsonc.snap rename to crates/rome_js_analyze/tests/specs/style/noRestrictedGlobals/invalid.jsonc.snap index 616d76c7489..4f80971fc51 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noRestrictedGlobals/invalid.jsonc.snap +++ b/crates/rome_js_analyze/tests/specs/style/noRestrictedGlobals/invalid.jsonc.snap @@ -1,5 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs +assertion_line: 96 expression: invalid.jsonc --- # Input @@ -9,7 +10,7 @@ console.log(event); # Diagnostics ``` -invalid.jsonc:1:13 lint/nursery/noRestrictedGlobals ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:13 lint/style/noRestrictedGlobals ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not use the global variable event. @@ -28,7 +29,7 @@ console.log(error); # Diagnostics ``` -invalid.jsonc:1:13 lint/nursery/noRestrictedGlobals ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:13 lint/style/noRestrictedGlobals ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not use the global variable error. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noRestrictedGlobals/valid.js b/crates/rome_js_analyze/tests/specs/style/noRestrictedGlobals/valid.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noRestrictedGlobals/valid.js rename to crates/rome_js_analyze/tests/specs/style/noRestrictedGlobals/valid.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noRestrictedGlobals/valid.js.snap b/crates/rome_js_analyze/tests/specs/style/noRestrictedGlobals/valid.js.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noRestrictedGlobals/valid.js.snap rename to crates/rome_js_analyze/tests/specs/style/noRestrictedGlobals/valid.js.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noAssignInExpressions/invalid.js b/crates/rome_js_analyze/tests/specs/suspicious/noAssignInExpressions/invalid.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noAssignInExpressions/invalid.js rename to crates/rome_js_analyze/tests/specs/suspicious/noAssignInExpressions/invalid.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noAssignInExpressions/invalid.js.snap b/crates/rome_js_analyze/tests/specs/suspicious/noAssignInExpressions/invalid.js.snap similarity index 78% rename from crates/rome_js_analyze/tests/specs/nursery/noAssignInExpressions/invalid.js.snap rename to crates/rome_js_analyze/tests/specs/suspicious/noAssignInExpressions/invalid.js.snap index 55ad9d07c89..8c1de34ffbc 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noAssignInExpressions/invalid.js.snap +++ b/crates/rome_js_analyze/tests/specs/suspicious/noAssignInExpressions/invalid.js.snap @@ -1,6 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs -assertion_line: 92 +assertion_line: 96 expression: invalid.js --- # Input @@ -91,7 +91,7 @@ switch (foo) { # Diagnostics ``` -invalid.js:3:3 lint/nursery/noAssignInExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:3:3 lint/suspicious/noAssignInExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The assignment should not be in an expression. @@ -109,7 +109,7 @@ invalid.js:3:3 lint/nursery/noAssignInExpressions ━━━━━━━━━━ ``` ``` -invalid.js:8:7 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:8:7 lint/suspicious/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The assignment should not be in an expression. @@ -131,7 +131,7 @@ invalid.js:8:7 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━ ``` ``` -invalid.js:13:8 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:13:8 lint/suspicious/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The assignment should not be in an expression. @@ -153,7 +153,7 @@ invalid.js:13:8 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━ ``` ``` -invalid.js:18:7 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:18:7 lint/suspicious/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The assignment should not be in an expression. @@ -175,7 +175,7 @@ invalid.js:18:7 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━ ``` ``` -invalid.js:18:14 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:18:14 lint/suspicious/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The assignment should not be in an expression. @@ -197,7 +197,7 @@ invalid.js:18:14 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━ ``` ``` -invalid.js:23:17 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:23:17 lint/suspicious/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The assignment should not be in an expression. @@ -219,7 +219,7 @@ invalid.js:23:17 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━ ``` ``` -invalid.js:28:13 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:28:13 lint/suspicious/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The assignment should not be in an expression. @@ -241,7 +241,7 @@ invalid.js:28:13 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━ ``` ``` -invalid.js:33:18 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:33:18 lint/suspicious/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The assignment should not be in an expression. @@ -263,7 +263,7 @@ invalid.js:33:18 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━ ``` ``` -invalid.js:37:10 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:37:10 lint/suspicious/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The assignment should not be in an expression. @@ -284,7 +284,7 @@ invalid.js:37:10 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━ ``` ``` -invalid.js:40:5 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:40:5 lint/suspicious/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The assignment should not be in an expression. @@ -306,7 +306,7 @@ invalid.js:40:5 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━ ``` ``` -invalid.js:43:11 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:43:11 lint/suspicious/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The assignment should not be in an expression. @@ -328,7 +328,7 @@ invalid.js:43:11 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━ ``` ``` -invalid.js:46:5 lint/nursery/noAssignInExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:46:5 lint/suspicious/noAssignInExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The assignment should not be in an expression. @@ -346,7 +346,7 @@ invalid.js:46:5 lint/nursery/noAssignInExpressions ━━━━━━━━━ ``` ``` -invalid.js:49:9 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:49:9 lint/suspicious/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The assignment should not be in an expression. @@ -368,7 +368,7 @@ invalid.js:49:9 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━ ``` ``` -invalid.js:51:8 lint/nursery/noAssignInExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:51:8 lint/suspicious/noAssignInExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The assignment should not be in an expression. @@ -386,7 +386,7 @@ invalid.js:51:8 lint/nursery/noAssignInExpressions ━━━━━━━━━ ``` ``` -invalid.js:53:15 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:53:15 lint/suspicious/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The assignment should not be in an expression. @@ -408,7 +408,7 @@ invalid.js:53:15 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━ ``` ``` -invalid.js:55:16 lint/nursery/noAssignInExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:55:16 lint/suspicious/noAssignInExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The assignment should not be in an expression. @@ -426,7 +426,7 @@ invalid.js:55:16 lint/nursery/noAssignInExpressions ━━━━━━━━━ ``` ``` -invalid.js:57:16 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:57:16 lint/suspicious/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The assignment should not be in an expression. @@ -448,7 +448,7 @@ invalid.js:57:16 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━ ``` ``` -invalid.js:59:20 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:59:20 lint/suspicious/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The assignment should not be in an expression. @@ -470,7 +470,7 @@ invalid.js:59:20 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━ ``` ``` -invalid.js:61:18 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:61:18 lint/suspicious/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The assignment should not be in an expression. @@ -492,7 +492,7 @@ invalid.js:61:18 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━ ``` ``` -invalid.js:63:18 lint/nursery/noAssignInExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:63:18 lint/suspicious/noAssignInExpressions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The assignment should not be in an expression. @@ -510,7 +510,7 @@ invalid.js:63:18 lint/nursery/noAssignInExpressions ━━━━━━━━━ ``` ``` -invalid.js:65:41 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:65:41 lint/suspicious/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The assignment should not be in an expression. @@ -532,7 +532,7 @@ invalid.js:65:41 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━ ``` ``` -invalid.js:67:9 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:67:9 lint/suspicious/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The assignment should not be in an expression. @@ -554,7 +554,7 @@ invalid.js:67:9 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━ ``` ``` -invalid.js:69:15 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:69:15 lint/suspicious/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The assignment should not be in an expression. @@ -576,7 +576,7 @@ invalid.js:69:15 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━ ``` ``` -invalid.js:72:8 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:72:8 lint/suspicious/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The assignment should not be in an expression. @@ -597,7 +597,7 @@ invalid.js:72:8 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━ ``` ``` -invalid.js:77:14 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:77:14 lint/suspicious/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The assignment should not be in an expression. @@ -618,7 +618,7 @@ invalid.js:77:14 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━ ``` ``` -invalid.js:81:2 lint/nursery/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:81:2 lint/suspicious/noAssignInExpressions FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! The assignment should not be in an expression. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noAssignInExpressions/valid.js b/crates/rome_js_analyze/tests/specs/suspicious/noAssignInExpressions/valid.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noAssignInExpressions/valid.js rename to crates/rome_js_analyze/tests/specs/suspicious/noAssignInExpressions/valid.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noAssignInExpressions/valid.js.snap b/crates/rome_js_analyze/tests/specs/suspicious/noAssignInExpressions/valid.js.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noAssignInExpressions/valid.js.snap rename to crates/rome_js_analyze/tests/specs/suspicious/noAssignInExpressions/valid.js.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noClassAssign/invalid.js b/crates/rome_js_analyze/tests/specs/suspicious/noClassAssign/invalid.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noClassAssign/invalid.js rename to crates/rome_js_analyze/tests/specs/suspicious/noClassAssign/invalid.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noClassAssign/invalid.js.snap b/crates/rome_js_analyze/tests/specs/suspicious/noClassAssign/invalid.js.snap similarity index 84% rename from crates/rome_js_analyze/tests/specs/nursery/noClassAssign/invalid.js.snap rename to crates/rome_js_analyze/tests/specs/suspicious/noClassAssign/invalid.js.snap index 72a830cb09f..4ab541adff7 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noClassAssign/invalid.js.snap +++ b/crates/rome_js_analyze/tests/specs/suspicious/noClassAssign/invalid.js.snap @@ -1,5 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs +assertion_line: 96 expression: invalid.js --- # Input @@ -50,7 +51,7 @@ function case18() { # Diagnostics ``` -invalid.js:3:2 lint/nursery/noClassAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:3:2 lint/suspicious/noClassAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'A' is a class. @@ -73,7 +74,7 @@ invalid.js:3:2 lint/nursery/noClassAssign ━━━━━━━━━━━━ ``` ``` -invalid.js:8:4 lint/nursery/noClassAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:8:4 lint/suspicious/noClassAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'B' is a class. @@ -96,7 +97,7 @@ invalid.js:8:4 lint/nursery/noClassAssign ━━━━━━━━━━━━ ``` ``` -invalid.js:13:7 lint/nursery/noClassAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:13:7 lint/suspicious/noClassAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'C' is a class. @@ -119,7 +120,7 @@ invalid.js:13:7 lint/nursery/noClassAssign ━━━━━━━━━━━━ ``` ``` -invalid.js:17:2 lint/nursery/noClassAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:17:2 lint/suspicious/noClassAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'D' is a class. @@ -142,7 +143,7 @@ invalid.js:17:2 lint/nursery/noClassAssign ━━━━━━━━━━━━ ``` ``` -invalid.js:24:4 lint/nursery/noClassAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:24:4 lint/suspicious/noClassAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'E' is a class. @@ -165,7 +166,7 @@ invalid.js:24:4 lint/nursery/noClassAssign ━━━━━━━━━━━━ ``` ``` -invalid.js:32:4 lint/nursery/noClassAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:32:4 lint/suspicious/noClassAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'F' is a class. @@ -188,7 +189,7 @@ invalid.js:32:4 lint/nursery/noClassAssign ━━━━━━━━━━━━ ``` ``` -invalid.js:39:2 lint/nursery/noClassAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:39:2 lint/suspicious/noClassAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'G' is a class. @@ -211,7 +212,7 @@ invalid.js:39:2 lint/nursery/noClassAssign ━━━━━━━━━━━━ ``` ``` -invalid.js:40:2 lint/nursery/noClassAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:40:2 lint/suspicious/noClassAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! 'G' is a class. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noClassAssign/valid.js b/crates/rome_js_analyze/tests/specs/suspicious/noClassAssign/valid.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noClassAssign/valid.js rename to crates/rome_js_analyze/tests/specs/suspicious/noClassAssign/valid.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noClassAssign/valid.js.snap b/crates/rome_js_analyze/tests/specs/suspicious/noClassAssign/valid.js.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noClassAssign/valid.js.snap rename to crates/rome_js_analyze/tests/specs/suspicious/noClassAssign/valid.js.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noConfusingLabels/invalid.jsonc b/crates/rome_js_analyze/tests/specs/suspicious/noConfusingLabels/invalid.jsonc similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noConfusingLabels/invalid.jsonc rename to crates/rome_js_analyze/tests/specs/suspicious/noConfusingLabels/invalid.jsonc diff --git a/crates/rome_js_analyze/tests/specs/nursery/noConfusingLabels/invalid.jsonc.snap b/crates/rome_js_analyze/tests/specs/suspicious/noConfusingLabels/invalid.jsonc.snap similarity index 84% rename from crates/rome_js_analyze/tests/specs/nursery/noConfusingLabels/invalid.jsonc.snap rename to crates/rome_js_analyze/tests/specs/suspicious/noConfusingLabels/invalid.jsonc.snap index 6131ea5dc8a..13ff27e2630 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noConfusingLabels/invalid.jsonc.snap +++ b/crates/rome_js_analyze/tests/specs/suspicious/noConfusingLabels/invalid.jsonc.snap @@ -1,6 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs -assertion_line: 92 +assertion_line: 96 expression: invalid.jsonc --- # Input @@ -10,7 +10,7 @@ label: foo(); # Diagnostics ``` -invalid.jsonc:1:1 lint/nursery/noConfusingLabels ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:1 lint/suspicious/noConfusingLabels ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected label. @@ -30,7 +30,7 @@ A: const foo = 0; # Diagnostics ``` -invalid.jsonc:1:1 lint/nursery/noConfusingLabels ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:1 lint/suspicious/noConfusingLabels ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected label. @@ -50,7 +50,7 @@ A: break A = 0; # Diagnostics ``` -invalid.jsonc:1:1 lint/nursery/noConfusingLabels ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:1 lint/suspicious/noConfusingLabels ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected label. @@ -70,7 +70,7 @@ A: let foo = 0; # Diagnostics ``` -invalid.jsonc:1:1 lint/nursery/noConfusingLabels ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:1 lint/suspicious/noConfusingLabels ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected label. @@ -90,7 +90,7 @@ A: if (a) { if (foo()) { break A; } bar(); }; # Diagnostics ``` -invalid.jsonc:1:1 lint/nursery/noConfusingLabels ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:1 lint/suspicious/noConfusingLabels ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected label. @@ -110,7 +110,7 @@ A: { if (foo()) { break A; } bar(); }; # Diagnostics ``` -invalid.jsonc:1:1 lint/nursery/noConfusingLabels ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:1 lint/suspicious/noConfusingLabels ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected label. @@ -130,7 +130,7 @@ A: { if (foo()) { break A; } bar(); }; # Diagnostics ``` -invalid.jsonc:1:1 lint/nursery/noConfusingLabels ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:1 lint/suspicious/noConfusingLabels ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected label. @@ -150,7 +150,7 @@ A: { if (foo()) { break A; } bar(); }; # Diagnostics ``` -invalid.jsonc:1:1 lint/nursery/noConfusingLabels ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:1 lint/suspicious/noConfusingLabels ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected label. @@ -170,7 +170,7 @@ A: switch (a) { case 0: break A; default: break; }; # Diagnostics ``` -invalid.jsonc:1:1 lint/nursery/noConfusingLabels ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:1 lint/suspicious/noConfusingLabels ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected label. @@ -190,7 +190,7 @@ A: switch (a) { case 0: break A; default: break; }; # Diagnostics ``` -invalid.jsonc:1:1 lint/nursery/noConfusingLabels ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:1 lint/suspicious/noConfusingLabels ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected label. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noConfusingLabels/valid.jsonc b/crates/rome_js_analyze/tests/specs/suspicious/noConfusingLabels/valid.jsonc similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noConfusingLabels/valid.jsonc rename to crates/rome_js_analyze/tests/specs/suspicious/noConfusingLabels/valid.jsonc diff --git a/crates/rome_js_analyze/tests/specs/nursery/noConfusingLabels/valid.jsonc.snap b/crates/rome_js_analyze/tests/specs/suspicious/noConfusingLabels/valid.jsonc.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noConfusingLabels/valid.jsonc.snap rename to crates/rome_js_analyze/tests/specs/suspicious/noConfusingLabels/valid.jsonc.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noDuplicateCase/invalid.js b/crates/rome_js_analyze/tests/specs/suspicious/noDuplicateCase/invalid.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noDuplicateCase/invalid.js rename to crates/rome_js_analyze/tests/specs/suspicious/noDuplicateCase/invalid.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noDuplicateCase/invalid.js.snap b/crates/rome_js_analyze/tests/specs/suspicious/noDuplicateCase/invalid.js.snap similarity index 88% rename from crates/rome_js_analyze/tests/specs/nursery/noDuplicateCase/invalid.js.snap rename to crates/rome_js_analyze/tests/specs/suspicious/noDuplicateCase/invalid.js.snap index e3c2a7c256c..e9ad6aec52c 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noDuplicateCase/invalid.js.snap +++ b/crates/rome_js_analyze/tests/specs/suspicious/noDuplicateCase/invalid.js.snap @@ -1,5 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs +assertion_line: 96 expression: invalid.js --- # Input @@ -196,7 +197,7 @@ switch (a) { # Diagnostics ``` -invalid.js:5:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:5:7 lint/suspicious/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate case label. @@ -220,7 +221,7 @@ invalid.js:5:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━━ ``` ``` -invalid.js:16:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:16:7 lint/suspicious/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate case label. @@ -244,7 +245,7 @@ invalid.js:16:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━ ``` ``` -invalid.js:28:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:28:7 lint/suspicious/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate case label. @@ -268,7 +269,7 @@ invalid.js:28:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━ ``` ``` -invalid.js:40:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:40:7 lint/suspicious/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate case label. @@ -292,7 +293,7 @@ invalid.js:40:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━ ``` ``` -invalid.js:52:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:52:7 lint/suspicious/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate case label. @@ -316,7 +317,7 @@ invalid.js:52:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━ ``` ``` -invalid.js:64:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:64:7 lint/suspicious/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate case label. @@ -340,7 +341,7 @@ invalid.js:64:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━ ``` ``` -invalid.js:76:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:76:7 lint/suspicious/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate case label. @@ -364,7 +365,7 @@ invalid.js:76:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━ ``` ``` -invalid.js:88:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:88:7 lint/suspicious/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate case label. @@ -388,7 +389,7 @@ invalid.js:88:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━ ``` ``` -invalid.js:97:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:97:7 lint/suspicious/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate case label. @@ -412,7 +413,7 @@ invalid.js:97:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━ ``` ``` -invalid.js:104:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:104:7 lint/suspicious/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate case label. @@ -436,7 +437,7 @@ invalid.js:104:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━ ``` ``` -invalid.js:111:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:111:7 lint/suspicious/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate case label. @@ -460,7 +461,7 @@ invalid.js:111:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━ ``` ``` -invalid.js:115:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:115:7 lint/suspicious/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate case label. @@ -484,7 +485,7 @@ invalid.js:115:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━ ``` ``` -invalid.js:123:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:123:7 lint/suspicious/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate case label. @@ -508,7 +509,7 @@ invalid.js:123:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━ ``` ``` -invalid.js:134:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:134:7 lint/suspicious/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate case label. @@ -532,7 +533,7 @@ invalid.js:134:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━ ``` ``` -invalid.js:144:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:144:7 lint/suspicious/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate case label. @@ -556,7 +557,7 @@ invalid.js:144:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━ ``` ``` -invalid.js:154:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:154:7 lint/suspicious/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate case label. @@ -580,7 +581,7 @@ invalid.js:154:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━ ``` ``` -invalid.js:157:2 lint/nursery/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:157:2 lint/suspicious/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate case label. @@ -604,7 +605,7 @@ invalid.js:157:2 lint/nursery/noDuplicateCase ━━━━━━━━━━━ ``` ``` -invalid.js:169:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:169:7 lint/suspicious/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate case label. @@ -628,7 +629,7 @@ invalid.js:169:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━ ``` ``` -invalid.js:183:7 lint/nursery/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:183:7 lint/suspicious/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate case label. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noDuplicateCase/valid.js b/crates/rome_js_analyze/tests/specs/suspicious/noDuplicateCase/valid.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noDuplicateCase/valid.js rename to crates/rome_js_analyze/tests/specs/suspicious/noDuplicateCase/valid.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noDuplicateCase/valid.js.snap b/crates/rome_js_analyze/tests/specs/suspicious/noDuplicateCase/valid.js.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noDuplicateCase/valid.js.snap rename to crates/rome_js_analyze/tests/specs/suspicious/noDuplicateCase/valid.js.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noDuplicateClassMembers/invalid.js b/crates/rome_js_analyze/tests/specs/suspicious/noDuplicateClassMembers/invalid.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noDuplicateClassMembers/invalid.js rename to crates/rome_js_analyze/tests/specs/suspicious/noDuplicateClassMembers/invalid.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noDuplicateClassMembers/invalid.js.snap b/crates/rome_js_analyze/tests/specs/suspicious/noDuplicateClassMembers/invalid.js.snap similarity index 77% rename from crates/rome_js_analyze/tests/specs/nursery/noDuplicateClassMembers/invalid.js.snap rename to crates/rome_js_analyze/tests/specs/suspicious/noDuplicateClassMembers/invalid.js.snap index 3e30fa5cdb3..f67ee37c800 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noDuplicateClassMembers/invalid.js.snap +++ b/crates/rome_js_analyze/tests/specs/suspicious/noDuplicateClassMembers/invalid.js.snap @@ -1,5 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs +assertion_line: 96 expression: invalid.js --- # Input @@ -27,7 +28,7 @@ class A { foo() {} "foo"() {} } # Diagnostics ``` -invalid.js:1:20 lint/nursery/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:1:20 lint/suspicious/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate class member name "foo" @@ -40,7 +41,7 @@ invalid.js:1:20 lint/nursery/noDuplicateClassMembers ━━━━━━━━━ ``` ``` -invalid.js:2:21 lint/nursery/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:2:21 lint/suspicious/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate class member name "foo" @@ -54,7 +55,7 @@ invalid.js:2:21 lint/nursery/noDuplicateClassMembers ━━━━━━━━━ ``` ``` -invalid.js:3:20 lint/nursery/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:3:20 lint/suspicious/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate class member name "foo" @@ -69,7 +70,7 @@ invalid.js:3:20 lint/nursery/noDuplicateClassMembers ━━━━━━━━━ ``` ``` -invalid.js:3:29 lint/nursery/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:3:29 lint/suspicious/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate class member name "foo" @@ -84,7 +85,7 @@ invalid.js:3:29 lint/nursery/noDuplicateClassMembers ━━━━━━━━━ ``` ``` -invalid.js:4:27 lint/nursery/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:4:27 lint/suspicious/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate class member name "foo" @@ -99,7 +100,7 @@ invalid.js:4:27 lint/nursery/noDuplicateClassMembers ━━━━━━━━━ ``` ``` -invalid.js:5:20 lint/nursery/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:5:20 lint/suspicious/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate class member name "foo" @@ -114,7 +115,7 @@ invalid.js:5:20 lint/nursery/noDuplicateClassMembers ━━━━━━━━━ ``` ``` -invalid.js:6:29 lint/nursery/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:6:29 lint/suspicious/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate class member name "foo" @@ -129,7 +130,7 @@ invalid.js:6:29 lint/nursery/noDuplicateClassMembers ━━━━━━━━━ ``` ``` -invalid.js:7:16 lint/nursery/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:7:16 lint/suspicious/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate class member name "foo" @@ -144,7 +145,7 @@ invalid.js:7:16 lint/nursery/noDuplicateClassMembers ━━━━━━━━━ ``` ``` -invalid.js:8:22 lint/nursery/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:8:22 lint/suspicious/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate class member name "foo" @@ -159,7 +160,7 @@ invalid.js:8:22 lint/nursery/noDuplicateClassMembers ━━━━━━━━━ ``` ``` -invalid.js:9:20 lint/nursery/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:9:20 lint/suspicious/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate class member name "foo" @@ -174,7 +175,7 @@ invalid.js:9:20 lint/nursery/noDuplicateClassMembers ━━━━━━━━━ ``` ``` -invalid.js:10:35 lint/nursery/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:10:35 lint/suspicious/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate class member name "constructor" @@ -189,7 +190,7 @@ invalid.js:10:35 lint/nursery/noDuplicateClassMembers ━━━━━━━━ ``` ``` -invalid.js:11:16 lint/nursery/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:11:16 lint/suspicious/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate class member name "foo" @@ -204,7 +205,7 @@ invalid.js:11:16 lint/nursery/noDuplicateClassMembers ━━━━━━━━ ``` ``` -invalid.js:12:25 lint/nursery/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:12:25 lint/suspicious/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate class member name "foo" @@ -219,7 +220,7 @@ invalid.js:12:25 lint/nursery/noDuplicateClassMembers ━━━━━━━━ ``` ``` -invalid.js:13:25 lint/nursery/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:13:25 lint/suspicious/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate class member name "foo" @@ -234,7 +235,7 @@ invalid.js:13:25 lint/nursery/noDuplicateClassMembers ━━━━━━━━ ``` ``` -invalid.js:14:20 lint/nursery/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:14:20 lint/suspicious/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate class member name "foo" @@ -249,7 +250,7 @@ invalid.js:14:20 lint/nursery/noDuplicateClassMembers ━━━━━━━━ ``` ``` -invalid.js:14:38 lint/nursery/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:14:38 lint/suspicious/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate class member name "bar" @@ -264,7 +265,7 @@ invalid.js:14:38 lint/nursery/noDuplicateClassMembers ━━━━━━━━ ``` ``` -invalid.js:15:24 lint/nursery/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:15:24 lint/suspicious/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate class member name "foo" @@ -279,7 +280,7 @@ invalid.js:15:24 lint/nursery/noDuplicateClassMembers ━━━━━━━━ ``` ``` -invalid.js:16:20 lint/nursery/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:16:20 lint/suspicious/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Duplicate class member name "foo" diff --git a/crates/rome_js_analyze/tests/specs/nursery/noDuplicateClassMembers/valid.js b/crates/rome_js_analyze/tests/specs/suspicious/noDuplicateClassMembers/valid.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noDuplicateClassMembers/valid.js rename to crates/rome_js_analyze/tests/specs/suspicious/noDuplicateClassMembers/valid.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noDuplicateClassMembers/valid.js.snap b/crates/rome_js_analyze/tests/specs/suspicious/noDuplicateClassMembers/valid.js.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noDuplicateClassMembers/valid.js.snap rename to crates/rome_js_analyze/tests/specs/suspicious/noDuplicateClassMembers/valid.js.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noPrototypeBuiltins/invalid.js b/crates/rome_js_analyze/tests/specs/suspicious/noPrototypeBuiltins/invalid.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noPrototypeBuiltins/invalid.js rename to crates/rome_js_analyze/tests/specs/suspicious/noPrototypeBuiltins/invalid.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noPrototypeBuiltins/invalid.js.snap b/crates/rome_js_analyze/tests/specs/suspicious/noPrototypeBuiltins/invalid.js.snap similarity index 88% rename from crates/rome_js_analyze/tests/specs/nursery/noPrototypeBuiltins/invalid.js.snap rename to crates/rome_js_analyze/tests/specs/suspicious/noPrototypeBuiltins/invalid.js.snap index 666cb340a75..1652651157b 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noPrototypeBuiltins/invalid.js.snap +++ b/crates/rome_js_analyze/tests/specs/suspicious/noPrototypeBuiltins/invalid.js.snap @@ -1,5 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs +assertion_line: 96 expression: invalid.js --- # Input @@ -19,7 +20,7 @@ foo?.["hasOwnProperty"]("bar"); # Diagnostics ``` -invalid.js:1:5 lint/nursery/noPrototypeBuiltins ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:1:5 lint/suspicious/noPrototypeBuiltins ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not access Object.prototype method 'hasOwnProperty' from target object. @@ -36,7 +37,7 @@ invalid.js:1:5 lint/nursery/noPrototypeBuiltins ━━━━━━━━━━ ``` ``` -invalid.js:2:5 lint/nursery/noPrototypeBuiltins ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:2:5 lint/suspicious/noPrototypeBuiltins ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not access Object.prototype method 'isPrototypeOf' from target object. @@ -50,7 +51,7 @@ invalid.js:2:5 lint/nursery/noPrototypeBuiltins ━━━━━━━━━━ ``` ``` -invalid.js:3:5 lint/nursery/noPrototypeBuiltins ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:3:5 lint/suspicious/noPrototypeBuiltins ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not access Object.prototype method 'propertyIsEnumerable' from target object. @@ -65,7 +66,7 @@ invalid.js:3:5 lint/nursery/noPrototypeBuiltins ━━━━━━━━━━ ``` ``` -invalid.js:4:9 lint/nursery/noPrototypeBuiltins ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:4:9 lint/suspicious/noPrototypeBuiltins ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not access Object.prototype method 'hasOwnProperty' from target object. @@ -84,7 +85,7 @@ invalid.js:4:9 lint/nursery/noPrototypeBuiltins ━━━━━━━━━━ ``` ``` -invalid.js:5:13 lint/nursery/noPrototypeBuiltins ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:5:13 lint/suspicious/noPrototypeBuiltins ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not access Object.prototype method 'isPrototypeOf' from target object. @@ -99,7 +100,7 @@ invalid.js:5:13 lint/nursery/noPrototypeBuiltins ━━━━━━━━━━ ``` ``` -invalid.js:6:5 lint/nursery/noPrototypeBuiltins ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:6:5 lint/suspicious/noPrototypeBuiltins ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not access Object.prototype method 'hasOwnProperty' from target object. @@ -118,7 +119,7 @@ invalid.js:6:5 lint/nursery/noPrototypeBuiltins ━━━━━━━━━━ ``` ``` -invalid.js:7:6 lint/nursery/noPrototypeBuiltins ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:7:6 lint/suspicious/noPrototypeBuiltins ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not access Object.prototype method 'isPrototypeOf' from target object. @@ -133,7 +134,7 @@ invalid.js:7:6 lint/nursery/noPrototypeBuiltins ━━━━━━━━━━ ``` ``` -invalid.js:8:6 lint/nursery/noPrototypeBuiltins ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:8:6 lint/suspicious/noPrototypeBuiltins ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not access Object.prototype method 'hasOwnProperty' from target object. @@ -152,7 +153,7 @@ invalid.js:8:6 lint/nursery/noPrototypeBuiltins ━━━━━━━━━━ ``` ``` -invalid.js:9:7 lint/nursery/noPrototypeBuiltins ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:9:7 lint/suspicious/noPrototypeBuiltins ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not access Object.prototype method 'hasOwnProperty' from target object. @@ -171,7 +172,7 @@ invalid.js:9:7 lint/nursery/noPrototypeBuiltins ━━━━━━━━━━ ``` ``` -invalid.js:10:7 lint/nursery/noPrototypeBuiltins ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:10:7 lint/suspicious/noPrototypeBuiltins ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not access Object.prototype method 'hasOwnProperty' from target object. @@ -189,7 +190,7 @@ invalid.js:10:7 lint/nursery/noPrototypeBuiltins ━━━━━━━━━━ ``` ``` -invalid.js:11:9 lint/nursery/noPrototypeBuiltins ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.js:11:9 lint/suspicious/noPrototypeBuiltins ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not access Object.prototype method 'hasOwnProperty' from target object. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noPrototypeBuiltins/valid.js b/crates/rome_js_analyze/tests/specs/suspicious/noPrototypeBuiltins/valid.js similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noPrototypeBuiltins/valid.js rename to crates/rome_js_analyze/tests/specs/suspicious/noPrototypeBuiltins/valid.js diff --git a/crates/rome_js_analyze/tests/specs/nursery/noPrototypeBuiltins/valid.js.snap b/crates/rome_js_analyze/tests/specs/suspicious/noPrototypeBuiltins/valid.js.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noPrototypeBuiltins/valid.js.snap rename to crates/rome_js_analyze/tests/specs/suspicious/noPrototypeBuiltins/valid.js.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noRedeclare/invalid-declaration-merging.ts b/crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/invalid-declaration-merging.ts similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noRedeclare/invalid-declaration-merging.ts rename to crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/invalid-declaration-merging.ts diff --git a/crates/rome_js_analyze/tests/specs/nursery/noRedeclare/invalid-declaration-merging.ts.snap b/crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/invalid-declaration-merging.ts.snap similarity index 82% rename from crates/rome_js_analyze/tests/specs/nursery/noRedeclare/invalid-declaration-merging.ts.snap rename to crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/invalid-declaration-merging.ts.snap index 2c5f31c8e12..718375a9294 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noRedeclare/invalid-declaration-merging.ts.snap +++ b/crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/invalid-declaration-merging.ts.snap @@ -1,5 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs +assertion_line: 96 expression: invalid-declaration-merging.ts --- # Input @@ -25,7 +26,7 @@ enum Order { # Diagnostics ``` -invalid-declaration-merging.ts:4:11 lint/nursery/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid-declaration-merging.ts:4:11 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Shouldn't redeclare 'Order'. Consider to delete it or rename it. @@ -48,7 +49,7 @@ invalid-declaration-merging.ts:4:11 lint/nursery/noRedeclare ━━━━━━ ``` ``` -invalid-declaration-merging.ts:8:7 lint/nursery/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid-declaration-merging.ts:8:7 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Shouldn't redeclare 'Order'. Consider to delete it or rename it. @@ -71,7 +72,7 @@ invalid-declaration-merging.ts:8:7 lint/nursery/noRedeclare ━━━━━━ ``` ``` -invalid-declaration-merging.ts:12:6 lint/nursery/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid-declaration-merging.ts:12:6 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Shouldn't redeclare 'Order'. Consider to delete it or rename it. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noRedeclare/invalid.jsonc b/crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/invalid.jsonc similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noRedeclare/invalid.jsonc rename to crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/invalid.jsonc diff --git a/crates/rome_js_analyze/tests/specs/nursery/noRedeclare/invalid.jsonc.snap b/crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/invalid.jsonc.snap similarity index 84% rename from crates/rome_js_analyze/tests/specs/nursery/noRedeclare/invalid.jsonc.snap rename to crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/invalid.jsonc.snap index ba3878aeaa3..b6896691e73 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noRedeclare/invalid.jsonc.snap +++ b/crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/invalid.jsonc.snap @@ -1,5 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs +assertion_line: 96 expression: invalid.jsonc --- # Input @@ -9,7 +10,7 @@ var a = 3; var a = 10; # Diagnostics ``` -invalid.jsonc:1:16 lint/nursery/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:16 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Shouldn't redeclare 'a'. Consider to delete it or rename it. @@ -31,7 +32,7 @@ var c; { var a; var a;} # Diagnostics ``` -invalid.jsonc:1:21 lint/nursery/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:21 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Shouldn't redeclare 'a'. Consider to delete it or rename it. @@ -53,7 +54,7 @@ var a; { function a(){} } # Diagnostics ``` -invalid.jsonc:1:19 lint/nursery/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:19 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Shouldn't redeclare 'a'. Consider to delete it or rename it. @@ -76,7 +77,7 @@ case b: var b = 4} # Diagnostics ``` -invalid.jsonc:2:13 lint/nursery/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:2:13 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Shouldn't redeclare 'b'. Consider to delete it or rename it. @@ -100,7 +101,7 @@ var a = 3; var a = 10; # Diagnostics ``` -invalid.jsonc:1:16 lint/nursery/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:16 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Shouldn't redeclare 'a'. Consider to delete it or rename it. @@ -122,7 +123,7 @@ var a = {}; var a = []; # Diagnostics ``` -invalid.jsonc:1:17 lint/nursery/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:17 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Shouldn't redeclare 'a'. Consider to delete it or rename it. @@ -144,7 +145,7 @@ var a; function a() {} # Diagnostics ``` -invalid.jsonc:1:17 lint/nursery/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:17 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Shouldn't redeclare 'a'. Consider to delete it or rename it. @@ -166,7 +167,7 @@ function a() {} function a() {} # Diagnostics ``` -invalid.jsonc:1:26 lint/nursery/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:26 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Shouldn't redeclare 'a'. Consider to delete it or rename it. @@ -188,7 +189,7 @@ var a = function() { }; var a = function() { } # Diagnostics ``` -invalid.jsonc:1:29 lint/nursery/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:29 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Shouldn't redeclare 'a'. Consider to delete it or rename it. @@ -210,7 +211,7 @@ var a = function() { }; var a = new Date(); # Diagnostics ``` -invalid.jsonc:1:29 lint/nursery/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:29 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Shouldn't redeclare 'a'. Consider to delete it or rename it. @@ -232,7 +233,7 @@ var a = 3; var a = 10; var a = 15; # Diagnostics ``` -invalid.jsonc:1:16 lint/nursery/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:16 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Shouldn't redeclare 'a'. Consider to delete it or rename it. @@ -248,7 +249,7 @@ invalid.jsonc:1:16 lint/nursery/noRedeclare ━━━━━━━━━━━━ ``` ``` -invalid.jsonc:1:28 lint/nursery/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:28 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Shouldn't redeclare 'a'. Consider to delete it or rename it. @@ -270,7 +271,7 @@ var a; var a; # Diagnostics ``` -invalid.jsonc:1:12 lint/nursery/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:12 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Shouldn't redeclare 'a'. Consider to delete it or rename it. @@ -292,7 +293,7 @@ export var a; var a; # Diagnostics ``` -invalid.jsonc:1:19 lint/nursery/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:19 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Shouldn't redeclare 'a'. Consider to delete it or rename it. @@ -314,7 +315,7 @@ class C { static { var a; var a; } } # Diagnostics ``` -invalid.jsonc:1:31 lint/nursery/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:31 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Shouldn't redeclare 'a'. Consider to delete it or rename it. @@ -336,7 +337,7 @@ class C { static { var a; { var a; } } } # Diagnostics ``` -invalid.jsonc:1:33 lint/nursery/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:33 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Shouldn't redeclare 'a'. Consider to delete it or rename it. @@ -358,7 +359,7 @@ class C { static { { var a; } var a; } } # Diagnostics ``` -invalid.jsonc:1:35 lint/nursery/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:35 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Shouldn't redeclare 'a'. Consider to delete it or rename it. @@ -380,7 +381,7 @@ class C { static { { var a; } { var a; } } } # Diagnostics ``` -invalid.jsonc:1:37 lint/nursery/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:37 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Shouldn't redeclare 'a'. Consider to delete it or rename it. @@ -402,7 +403,7 @@ var a; var {a = 0, b: Object = 0} = {}; # Diagnostics ``` -invalid.jsonc:1:13 lint/nursery/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:13 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Shouldn't redeclare 'a'. Consider to delete it or rename it. @@ -424,7 +425,7 @@ var a; var {a = 0, b: globalThis = 0} = {}; # Diagnostics ``` -invalid.jsonc:1:13 lint/nursery/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:13 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Shouldn't redeclare 'a'. Consider to delete it or rename it. @@ -446,7 +447,7 @@ function f() { var a; var a; } # Diagnostics ``` -invalid.jsonc:1:27 lint/nursery/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:27 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Shouldn't redeclare 'a'. Consider to delete it or rename it. @@ -468,7 +469,7 @@ function f() { var a; if (test) { var a; } } # Diagnostics ``` -invalid.jsonc:1:39 lint/nursery/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:39 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Shouldn't redeclare 'a'. Consider to delete it or rename it. @@ -490,7 +491,7 @@ for (var a, a;;); # Diagnostics ``` -invalid.jsonc:1:13 lint/nursery/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:13 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Shouldn't redeclare 'a'. Consider to delete it or rename it. @@ -512,7 +513,7 @@ for (;;){ var a, a,;} # Diagnostics ``` -invalid.jsonc:1:18 lint/nursery/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:18 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Shouldn't redeclare 'a'. Consider to delete it or rename it. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noRedeclare/invalid.ts b/crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/invalid.ts similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noRedeclare/invalid.ts rename to crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/invalid.ts diff --git a/crates/rome_js_analyze/tests/specs/nursery/noRedeclare/invalid.ts.snap b/crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/invalid.ts.snap similarity index 85% rename from crates/rome_js_analyze/tests/specs/nursery/noRedeclare/invalid.ts.snap rename to crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/invalid.ts.snap index c720fc4bc2b..723f35b2037 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noRedeclare/invalid.ts.snap +++ b/crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/invalid.ts.snap @@ -1,5 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs +assertion_line: 96 expression: invalid.ts --- # Input @@ -15,7 +16,7 @@ class C { # Diagnostics ``` -invalid.ts:4:7 lint/nursery/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:4:7 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Shouldn't redeclare 'a'. Consider to delete it or rename it. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noRedeclare/valid-declaration-merging.ts b/crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/valid-declaration-merging.ts similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noRedeclare/valid-declaration-merging.ts rename to crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/valid-declaration-merging.ts diff --git a/crates/rome_js_analyze/tests/specs/nursery/noRedeclare/valid-declaration-merging.ts.snap b/crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/valid-declaration-merging.ts.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noRedeclare/valid-declaration-merging.ts.snap rename to crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/valid-declaration-merging.ts.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noRedeclare/valid-duplicate.ts b/crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/valid-duplicate.ts similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noRedeclare/valid-duplicate.ts rename to crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/valid-duplicate.ts diff --git a/crates/rome_js_analyze/tests/specs/nursery/noRedeclare/valid-duplicate.ts.snap b/crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/valid-duplicate.ts.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noRedeclare/valid-duplicate.ts.snap rename to crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/valid-duplicate.ts.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noRedeclare/valid.jsonc b/crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/valid.jsonc similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noRedeclare/valid.jsonc rename to crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/valid.jsonc diff --git a/crates/rome_js_analyze/tests/specs/nursery/noRedeclare/valid.jsonc.snap b/crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/valid.jsonc.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noRedeclare/valid.jsonc.snap rename to crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/valid.jsonc.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/noSelfCompare/invalid.jsonc b/crates/rome_js_analyze/tests/specs/suspicious/noSelfCompare/invalid.jsonc similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noSelfCompare/invalid.jsonc rename to crates/rome_js_analyze/tests/specs/suspicious/noSelfCompare/invalid.jsonc diff --git a/crates/rome_js_analyze/tests/specs/nursery/noSelfCompare/invalid.jsonc.snap b/crates/rome_js_analyze/tests/specs/suspicious/noSelfCompare/invalid.jsonc.snap similarity index 78% rename from crates/rome_js_analyze/tests/specs/nursery/noSelfCompare/invalid.jsonc.snap rename to crates/rome_js_analyze/tests/specs/suspicious/noSelfCompare/invalid.jsonc.snap index 77eb72367aa..12eb9291d85 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/noSelfCompare/invalid.jsonc.snap +++ b/crates/rome_js_analyze/tests/specs/suspicious/noSelfCompare/invalid.jsonc.snap @@ -1,5 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs +assertion_line: 96 expression: invalid.jsonc --- # Input @@ -9,7 +10,7 @@ if (x === x) { } # Diagnostics ``` -invalid.jsonc:1:5 lint/nursery/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:5 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Comparing to itself is potentially pointless. @@ -26,7 +27,7 @@ if (x !== x) { } # Diagnostics ``` -invalid.jsonc:1:5 lint/nursery/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:5 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Comparing to itself is potentially pointless. @@ -43,7 +44,7 @@ if (x > x) { } # Diagnostics ``` -invalid.jsonc:1:5 lint/nursery/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:5 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Comparing to itself is potentially pointless. @@ -60,7 +61,7 @@ if ('x' > 'x') { } # Diagnostics ``` -invalid.jsonc:1:5 lint/nursery/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:5 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Comparing to itself is potentially pointless. @@ -77,7 +78,7 @@ if ('x' > 'x') { } # Diagnostics ``` -invalid.jsonc:1:5 lint/nursery/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:5 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Comparing to itself is potentially pointless. @@ -94,7 +95,7 @@ do {} while (x === x) # Diagnostics ``` -invalid.jsonc:1:14 lint/nursery/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:14 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Comparing to itself is potentially pointless. @@ -111,7 +112,7 @@ x === x # Diagnostics ``` -invalid.jsonc:1:1 lint/nursery/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:1 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Comparing to itself is potentially pointless. @@ -128,7 +129,7 @@ x !== x # Diagnostics ``` -invalid.jsonc:1:1 lint/nursery/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:1 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Comparing to itself is potentially pointless. @@ -145,7 +146,7 @@ x == x # Diagnostics ``` -invalid.jsonc:1:1 lint/nursery/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:1 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Comparing to itself is potentially pointless. @@ -162,7 +163,7 @@ x != x # Diagnostics ``` -invalid.jsonc:1:1 lint/nursery/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:1 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Comparing to itself is potentially pointless. @@ -179,7 +180,7 @@ x > x # Diagnostics ``` -invalid.jsonc:1:1 lint/nursery/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:1 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Comparing to itself is potentially pointless. @@ -196,7 +197,7 @@ x < x # Diagnostics ``` -invalid.jsonc:1:1 lint/nursery/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:1 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Comparing to itself is potentially pointless. @@ -213,7 +214,7 @@ x >= x # Diagnostics ``` -invalid.jsonc:1:1 lint/nursery/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:1 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Comparing to itself is potentially pointless. @@ -230,7 +231,7 @@ x <= x # Diagnostics ``` -invalid.jsonc:1:1 lint/nursery/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:1 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Comparing to itself is potentially pointless. @@ -247,7 +248,7 @@ foo.bar().baz.qux >= foo.bar ().baz .qux # Diagnostics ``` -invalid.jsonc:1:1 lint/nursery/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:1 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Comparing to itself is potentially pointless. @@ -264,7 +265,7 @@ class C { #field; foo() { this.#field === this.#field; } } # Diagnostics ``` -invalid.jsonc:1:27 lint/nursery/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.jsonc:1:27 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Comparing to itself is potentially pointless. diff --git a/crates/rome_js_analyze/tests/specs/nursery/noSelfCompare/valid.jsonc b/crates/rome_js_analyze/tests/specs/suspicious/noSelfCompare/valid.jsonc similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noSelfCompare/valid.jsonc rename to crates/rome_js_analyze/tests/specs/suspicious/noSelfCompare/valid.jsonc diff --git a/crates/rome_js_analyze/tests/specs/nursery/noSelfCompare/valid.jsonc.snap b/crates/rome_js_analyze/tests/specs/suspicious/noSelfCompare/valid.jsonc.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/noSelfCompare/valid.jsonc.snap rename to crates/rome_js_analyze/tests/specs/suspicious/noSelfCompare/valid.jsonc.snap diff --git a/crates/rome_js_analyze/tests/specs/nursery/useNamespaceKeyword/invalid.ts b/crates/rome_js_analyze/tests/specs/suspicious/useNamespaceKeyword/invalid.ts similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/useNamespaceKeyword/invalid.ts rename to crates/rome_js_analyze/tests/specs/suspicious/useNamespaceKeyword/invalid.ts diff --git a/crates/rome_js_analyze/tests/specs/nursery/useNamespaceKeyword/invalid.ts.snap b/crates/rome_js_analyze/tests/specs/suspicious/useNamespaceKeyword/invalid.ts.snap similarity index 84% rename from crates/rome_js_analyze/tests/specs/nursery/useNamespaceKeyword/invalid.ts.snap rename to crates/rome_js_analyze/tests/specs/suspicious/useNamespaceKeyword/invalid.ts.snap index 704cb50e2bf..b8e2b3c0449 100644 --- a/crates/rome_js_analyze/tests/specs/nursery/useNamespaceKeyword/invalid.ts.snap +++ b/crates/rome_js_analyze/tests/specs/suspicious/useNamespaceKeyword/invalid.ts.snap @@ -1,6 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs -assertion_line: 91 +assertion_line: 96 expression: invalid.ts --- # Input @@ -16,7 +16,7 @@ declare module outer { # Diagnostics ``` -invalid.ts:1:11 lint/nursery/useNamespaceKeyword FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:1:11 lint/suspicious/useNamespaceKeyword FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use the namespace keyword instead of the outdated module keyword. @@ -38,7 +38,7 @@ invalid.ts:1:11 lint/nursery/useNamespaceKeyword FIXABLE ━━━━━━━ ``` ``` -invalid.ts:3:9 lint/nursery/useNamespaceKeyword FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:3:9 lint/suspicious/useNamespaceKeyword FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use the namespace keyword instead of the outdated module keyword. @@ -64,7 +64,7 @@ invalid.ts:3:9 lint/nursery/useNamespaceKeyword FIXABLE ━━━━━━━ ``` ``` -invalid.ts:5:9 lint/nursery/useNamespaceKeyword FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:5:9 lint/suspicious/useNamespaceKeyword FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use the namespace keyword instead of the outdated module keyword. @@ -90,7 +90,7 @@ invalid.ts:5:9 lint/nursery/useNamespaceKeyword FIXABLE ━━━━━━━ ``` ``` -invalid.ts:6:9 lint/nursery/useNamespaceKeyword FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:6:9 lint/suspicious/useNamespaceKeyword FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use the namespace keyword instead of the outdated module keyword. diff --git a/crates/rome_js_analyze/tests/specs/nursery/useNamespaceKeyword/valid.ts b/crates/rome_js_analyze/tests/specs/suspicious/useNamespaceKeyword/valid.ts similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/useNamespaceKeyword/valid.ts rename to crates/rome_js_analyze/tests/specs/suspicious/useNamespaceKeyword/valid.ts diff --git a/crates/rome_js_analyze/tests/specs/nursery/useNamespaceKeyword/valid.ts.snap b/crates/rome_js_analyze/tests/specs/suspicious/useNamespaceKeyword/valid.ts.snap similarity index 100% rename from crates/rome_js_analyze/tests/specs/nursery/useNamespaceKeyword/valid.ts.snap rename to crates/rome_js_analyze/tests/specs/suspicious/useNamespaceKeyword/valid.ts.snap diff --git a/crates/rome_service/src/configuration/linter/rules.rs b/crates/rome_service/src/configuration/linter/rules.rs index d7b6a3c30a3..f303ae66958 100644 --- a/crates/rome_service/src/configuration/linter/rules.rs +++ b/crates/rome_service/src/configuration/linter/rules.rs @@ -372,10 +372,27 @@ pub struct A11y { #[bpaf(long("no-header-scope"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] pub no_header_scope: Option, + #[doc = "Enforce that interactive ARIA roles are not assigned to non-interactive HTML elements."] + #[bpaf( + long("no-noninteractive-element-to-interactive-role"), + argument("on|off|warn"), + optional, + hide + )] + #[serde(skip_serializing_if = "Option::is_none")] + pub no_noninteractive_element_to_interactive_role: Option, #[doc = "Prevent the usage of positive integers on tabIndex property"] #[bpaf(long("no-positive-tabindex"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] pub no_positive_tabindex: Option, + #[doc = "Enforce img alt prop does not contain the word \"image\", \"picture\", or \"photo\"."] + #[bpaf(long("no-redundant-alt"), argument("on|off|warn"), optional, hide)] + #[serde(skip_serializing_if = "Option::is_none")] + pub no_redundant_alt: Option, + #[doc = "Enforces the usage of the title element for the svg element."] + #[bpaf(long("no-svg-without-title"), argument("on|off|warn"), optional, hide)] + #[serde(skip_serializing_if = "Option::is_none")] + pub no_svg_without_title: Option, #[doc = "Enforce that all elements that require alternative text have meaningful information to relay back to the end user."] #[bpaf(long("use-alt-text"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] @@ -384,6 +401,15 @@ pub struct A11y { #[bpaf(long("use-anchor-content"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] pub use_anchor_content: Option, + #[doc = "Enforce that elements with ARIA roles must have all required ARIA attributes for that role."] + #[bpaf( + long("use-aria-props-for-role"), + argument("on|off|warn"), + optional, + hide + )] + #[serde(skip_serializing_if = "Option::is_none")] + pub use_aria_props_for_role: Option, #[doc = "Enforces the usage of the attribute type for the element button"] #[bpaf(long("use-button-type"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] @@ -392,6 +418,10 @@ pub struct A11y { #[bpaf(long("use-html-lang"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] pub use_html_lang: Option, + #[doc = "Enforces the usage of the attribute title for the element iframe"] + #[bpaf(long("use-iframe-title"), argument("on|off|warn"), optional, hide)] + #[serde(skip_serializing_if = "Option::is_none")] + pub use_iframe_title: Option, #[doc = "Enforce onClick is accompanied by at least one of the following: onKeyUp, onKeyDown, onKeyPress."] #[bpaf( long("use-key-with-click-events"), @@ -410,43 +440,71 @@ pub struct A11y { )] #[serde(skip_serializing_if = "Option::is_none")] pub use_key_with_mouse_events: Option, + #[doc = "Enforces that audio and video elements must have a track for captions."] + #[bpaf(long("use-media-caption"), argument("on|off|warn"), optional, hide)] + #[serde(skip_serializing_if = "Option::is_none")] + pub use_media_caption: Option, #[doc = "Enforce that all anchors are valid, and they are navigable elements."] #[bpaf(long("use-valid-anchor"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] pub use_valid_anchor: Option, + #[doc = "Ensures that ARIA properties aria-* are all valid."] + #[bpaf(long("use-valid-aria-props"), argument("on|off|warn"), optional, hide)] + #[serde(skip_serializing_if = "Option::is_none")] + pub use_valid_aria_props: Option, + #[doc = "Ensure that the attribute passed to the lang attribute is a correct ISO language and/or country."] + #[bpaf(long("use-valid-lang"), argument("on|off|warn"), optional, hide)] + #[serde(skip_serializing_if = "Option::is_none")] + pub use_valid_lang: Option, } impl A11y { const GROUP_NAME: &'static str = "a11y"; - pub(crate) const GROUP_RULES: [&'static str; 13] = [ + pub(crate) const GROUP_RULES: [&'static str; 21] = [ "noAccessKey", "noAutofocus", "noBlankTarget", "noDistractingElements", "noHeaderScope", + "noNoninteractiveElementToInteractiveRole", "noPositiveTabindex", + "noRedundantAlt", + "noSvgWithoutTitle", "useAltText", "useAnchorContent", + "useAriaPropsForRole", "useButtonType", "useHtmlLang", + "useIframeTitle", "useKeyWithClickEvents", "useKeyWithMouseEvents", + "useMediaCaption", "useValidAnchor", + "useValidAriaProps", + "useValidLang", ]; - const RECOMMENDED_RULES: [&'static str; 12] = [ + const RECOMMENDED_RULES: [&'static str; 20] = [ "noAutofocus", "noBlankTarget", "noDistractingElements", "noHeaderScope", + "noNoninteractiveElementToInteractiveRole", "noPositiveTabindex", + "noRedundantAlt", + "noSvgWithoutTitle", "useAltText", "useAnchorContent", + "useAriaPropsForRole", "useButtonType", "useHtmlLang", + "useIframeTitle", "useKeyWithClickEvents", "useKeyWithMouseEvents", + "useMediaCaption", "useValidAnchor", + "useValidAriaProps", + "useValidLang", ]; - const RECOMMENDED_RULES_AS_FILTERS: [RuleFilter<'static>; 12] = [ + const RECOMMENDED_RULES_AS_FILTERS: [RuleFilter<'static>; 20] = [ 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]), @@ -459,8 +517,16 @@ impl A11y { 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]), + 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]), + RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[20]), ]; - const ALL_RULES_AS_FILTERS: [RuleFilter<'static>; 13] = [ + const ALL_RULES_AS_FILTERS: [RuleFilter<'static>; 21] = [ 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]), @@ -474,6 +540,14 @@ impl A11y { 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]), + 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]), + RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[20]), ]; pub(crate) fn is_recommended(&self) -> bool { !matches!(self.recommended, Some(false)) } pub(crate) const fn is_not_recommended(&self) -> bool { @@ -508,46 +582,86 @@ impl A11y { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[4])); } } - if let Some(rule) = self.no_positive_tabindex.as_ref() { + if let Some(rule) = self.no_noninteractive_element_to_interactive_role.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[5])); } } - if let Some(rule) = self.use_alt_text.as_ref() { + if let Some(rule) = self.no_positive_tabindex.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[6])); } } - if let Some(rule) = self.use_anchor_content.as_ref() { + if let Some(rule) = self.no_redundant_alt.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[7])); } } - if let Some(rule) = self.use_button_type.as_ref() { + if let Some(rule) = self.no_svg_without_title.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[8])); } } - if let Some(rule) = self.use_html_lang.as_ref() { + if let Some(rule) = self.use_alt_text.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9])); } } - if let Some(rule) = self.use_key_with_click_events.as_ref() { + if let Some(rule) = self.use_anchor_content.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[10])); } } - if let Some(rule) = self.use_key_with_mouse_events.as_ref() { + if let Some(rule) = self.use_aria_props_for_role.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[11])); } } - if let Some(rule) = self.use_valid_anchor.as_ref() { + if let Some(rule) = self.use_button_type.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[12])); } } + if let Some(rule) = self.use_html_lang.as_ref() { + if rule.is_enabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[13])); + } + } + if let Some(rule) = self.use_iframe_title.as_ref() { + if rule.is_enabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[14])); + } + } + if let Some(rule) = self.use_key_with_click_events.as_ref() { + if rule.is_enabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[15])); + } + } + if let Some(rule) = self.use_key_with_mouse_events.as_ref() { + if rule.is_enabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[16])); + } + } + if let Some(rule) = self.use_media_caption.as_ref() { + if rule.is_enabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[17])); + } + } + if let Some(rule) = self.use_valid_anchor.as_ref() { + if rule.is_enabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[18])); + } + } + if let Some(rule) = self.use_valid_aria_props.as_ref() { + if rule.is_enabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[19])); + } + } + if let Some(rule) = self.use_valid_lang.as_ref() { + if rule.is_enabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[20])); + } + } index_set } pub(crate) fn get_disabled_rules(&self) -> IndexSet { @@ -577,46 +691,86 @@ impl A11y { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[4])); } } - if let Some(rule) = self.no_positive_tabindex.as_ref() { + if let Some(rule) = self.no_noninteractive_element_to_interactive_role.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[5])); } } - if let Some(rule) = self.use_alt_text.as_ref() { + if let Some(rule) = self.no_positive_tabindex.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[6])); } } - if let Some(rule) = self.use_anchor_content.as_ref() { + if let Some(rule) = self.no_redundant_alt.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[7])); } } - if let Some(rule) = self.use_button_type.as_ref() { + if let Some(rule) = self.no_svg_without_title.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[8])); } } - if let Some(rule) = self.use_html_lang.as_ref() { + if let Some(rule) = self.use_alt_text.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9])); } } - if let Some(rule) = self.use_key_with_click_events.as_ref() { + if let Some(rule) = self.use_anchor_content.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[10])); } } - if let Some(rule) = self.use_key_with_mouse_events.as_ref() { + if let Some(rule) = self.use_aria_props_for_role.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[11])); } } - if let Some(rule) = self.use_valid_anchor.as_ref() { + if let Some(rule) = self.use_button_type.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[12])); } } + if let Some(rule) = self.use_html_lang.as_ref() { + if rule.is_disabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[13])); + } + } + if let Some(rule) = self.use_iframe_title.as_ref() { + if rule.is_disabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[14])); + } + } + if let Some(rule) = self.use_key_with_click_events.as_ref() { + if rule.is_disabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[15])); + } + } + if let Some(rule) = self.use_key_with_mouse_events.as_ref() { + if rule.is_disabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[16])); + } + } + if let Some(rule) = self.use_media_caption.as_ref() { + if rule.is_disabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[17])); + } + } + if let Some(rule) = self.use_valid_anchor.as_ref() { + if rule.is_disabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[18])); + } + } + if let Some(rule) = self.use_valid_aria_props.as_ref() { + if rule.is_disabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[19])); + } + } + if let Some(rule) = self.use_valid_lang.as_ref() { + if rule.is_disabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[20])); + } + } index_set } #[doc = r" Checks if, given a rule name, matches one of the rules contained in this category"] @@ -625,10 +779,10 @@ impl A11y { 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>; 20] { Self::RECOMMENDED_RULES_AS_FILTERS } - pub(crate) fn all_rules_as_filters() -> [RuleFilter<'static>; 13] { Self::ALL_RULES_AS_FILTERS } + pub(crate) fn all_rules_as_filters() -> [RuleFilter<'static>; 21] { Self::ALL_RULES_AS_FILTERS } #[doc = r" Select preset rules"] pub(crate) fn collect_preset_rules( &self, @@ -653,14 +807,24 @@ impl A11y { "noBlankTarget" => self.no_blank_target.as_ref(), "noDistractingElements" => self.no_distracting_elements.as_ref(), "noHeaderScope" => self.no_header_scope.as_ref(), + "noNoninteractiveElementToInteractiveRole" => { + self.no_noninteractive_element_to_interactive_role.as_ref() + } "noPositiveTabindex" => self.no_positive_tabindex.as_ref(), + "noRedundantAlt" => self.no_redundant_alt.as_ref(), + "noSvgWithoutTitle" => self.no_svg_without_title.as_ref(), "useAltText" => self.use_alt_text.as_ref(), "useAnchorContent" => self.use_anchor_content.as_ref(), + "useAriaPropsForRole" => self.use_aria_props_for_role.as_ref(), "useButtonType" => self.use_button_type.as_ref(), "useHtmlLang" => self.use_html_lang.as_ref(), + "useIframeTitle" => self.use_iframe_title.as_ref(), "useKeyWithClickEvents" => self.use_key_with_click_events.as_ref(), "useKeyWithMouseEvents" => self.use_key_with_mouse_events.as_ref(), + "useMediaCaption" => self.use_media_caption.as_ref(), "useValidAnchor" => self.use_valid_anchor.as_ref(), + "useValidAriaProps" => self.use_valid_aria_props.as_ref(), + "useValidLang" => self.use_valid_lang.as_ref(), _ => None, } } @@ -682,6 +846,10 @@ pub struct Complexity { #[bpaf(long("no-extra-boolean-cast"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] pub no_extra_boolean_cast: Option, + #[doc = "Typing mistakes and misunderstandings about where semicolons are required can lead to semicolons that are unnecessary. While not technically an error, extra semicolons can cause confusion when reading code."] + #[bpaf(long("no-extra-semicolon"), argument("on|off|warn"), optional, hide)] + #[serde(skip_serializing_if = "Option::is_none")] + pub no_extra_semicolon: Option, #[doc = "Disallow unclear usage of multiple space characters in regular expression literals"] #[bpaf( long("no-multiple-spaces-in-regular-expression-literals"), @@ -691,10 +859,44 @@ pub struct Complexity { )] #[serde(skip_serializing_if = "Option::is_none")] pub no_multiple_spaces_in_regular_expression_literals: Option, + #[doc = "Disallow unnecessary catch clauses."] + #[bpaf(long("no-useless-catch"), argument("on|off|warn"), optional, hide)] + #[serde(skip_serializing_if = "Option::is_none")] + pub no_useless_catch: Option, + #[doc = "Disallow unnecessary constructors."] + #[bpaf( + long("no-useless-constructor"), + argument("on|off|warn"), + optional, + hide + )] + #[serde(skip_serializing_if = "Option::is_none")] + pub no_useless_constructor: Option, #[doc = "Disallow unnecessary fragments"] #[bpaf(long("no-useless-fragments"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] pub no_useless_fragments: Option, + #[doc = "Disallow unnecessary labels."] + #[bpaf(long("no-useless-label"), argument("on|off|warn"), optional, hide)] + #[serde(skip_serializing_if = "Option::is_none")] + pub no_useless_label: Option, + #[doc = "Disallow renaming import, export, and destructured assignments to the same name."] + #[bpaf(long("no-useless-rename"), argument("on|off|warn"), optional, hide)] + #[serde(skip_serializing_if = "Option::is_none")] + pub no_useless_rename: Option, + #[doc = "Disallow useless case in switch statements."] + #[bpaf( + long("no-useless-switch-case"), + argument("on|off|warn"), + optional, + hide + )] + #[serde(skip_serializing_if = "Option::is_none")] + pub no_useless_switch_case: 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")] + pub no_with: Option, #[doc = "Promotes the use of .flatMap() when map().flat() are used together."] #[bpaf(long("use-flat-map"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] @@ -715,37 +917,65 @@ pub struct Complexity { } impl Complexity { const GROUP_NAME: &'static str = "complexity"; - pub(crate) const GROUP_RULES: [&'static str; 6] = [ + pub(crate) const GROUP_RULES: [&'static str; 13] = [ "noExtraBooleanCast", + "noExtraSemicolon", "noMultipleSpacesInRegularExpressionLiterals", + "noUselessCatch", + "noUselessConstructor", "noUselessFragments", + "noUselessLabel", + "noUselessRename", + "noUselessSwitchCase", + "noWith", "useFlatMap", "useOptionalChain", "useSimplifiedLogicExpression", ]; - const RECOMMENDED_RULES: [&'static str; 4] = [ + const RECOMMENDED_RULES: [&'static str; 11] = [ "noExtraBooleanCast", + "noExtraSemicolon", "noMultipleSpacesInRegularExpressionLiterals", + "noUselessCatch", + "noUselessConstructor", + "noUselessLabel", + "noUselessRename", + "noUselessSwitchCase", + "noWith", "useFlatMap", "useOptionalChain", ]; - const RECOMMENDED_RULES_AS_FILTERS: [RuleFilter<'static>; 4] = [ + const RECOMMENDED_RULES_AS_FILTERS: [RuleFilter<'static>; 11] = [ 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[6]), + RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[7]), + RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[8]), + RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9]), + RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[10]), + RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[11]), ]; - const ALL_RULES_AS_FILTERS: [RuleFilter<'static>; 6] = [ + const ALL_RULES_AS_FILTERS: [RuleFilter<'static>; 13] = [ 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]), - ]; - pub(crate) fn is_recommended(&self) -> bool { !matches!(self.recommended, Some(false)) } - pub(crate) const fn is_not_recommended(&self) -> bool { - matches!(self.recommended, Some(false)) + 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[8]), + RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9]), + 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]), + ]; + pub(crate) fn is_recommended(&self) -> bool { !matches!(self.recommended, Some(false)) } + pub(crate) const fn is_not_recommended(&self) -> bool { + matches!(self.recommended, Some(false)) } pub(crate) fn is_all(&self) -> bool { matches!(self.all, Some(true)) } pub(crate) fn is_not_all(&self) -> bool { matches!(self.all, Some(false)) } @@ -756,32 +986,67 @@ impl Complexity { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[0])); } } + if let Some(rule) = self.no_extra_semicolon.as_ref() { + if rule.is_enabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[1])); + } + } 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[1])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[2])); + } + } + 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[3])); + } + } + 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[4])); } } 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[2])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[5])); + } + } + 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[6])); + } + } + 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[7])); + } + } + 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[8])); + } + } + if let Some(rule) = self.no_with.as_ref() { + if rule.is_enabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9])); } } 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[3])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[10])); } } 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[4])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[11])); } } 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[5])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[12])); } } index_set @@ -793,32 +1058,67 @@ impl Complexity { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[0])); } } + if let Some(rule) = self.no_extra_semicolon.as_ref() { + if rule.is_disabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[1])); + } + } 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[1])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[2])); + } + } + 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[3])); + } + } + 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[4])); } } 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[2])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[5])); + } + } + 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[6])); + } + } + 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[7])); + } + } + 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[8])); + } + } + if let Some(rule) = self.no_with.as_ref() { + if rule.is_disabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9])); } } 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[3])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[10])); } } 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[4])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[11])); } } 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[5])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[12])); } } index_set @@ -829,10 +1129,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>; 4] { + pub(crate) fn recommended_rules_as_filters() -> [RuleFilter<'static>; 11] { Self::RECOMMENDED_RULES_AS_FILTERS } - pub(crate) fn all_rules_as_filters() -> [RuleFilter<'static>; 6] { Self::ALL_RULES_AS_FILTERS } + pub(crate) fn all_rules_as_filters() -> [RuleFilter<'static>; 13] { Self::ALL_RULES_AS_FILTERS } #[doc = r" Select preset rules"] pub(crate) fn collect_preset_rules( &self, @@ -853,10 +1153,17 @@ impl Complexity { pub(crate) fn get_rule_configuration(&self, rule_name: &str) -> Option<&RuleConfiguration> { match rule_name { "noExtraBooleanCast" => self.no_extra_boolean_cast.as_ref(), + "noExtraSemicolon" => self.no_extra_semicolon.as_ref(), "noMultipleSpacesInRegularExpressionLiterals" => self .no_multiple_spaces_in_regular_expression_literals .as_ref(), + "noUselessCatch" => self.no_useless_catch.as_ref(), + "noUselessConstructor" => self.no_useless_constructor.as_ref(), "noUselessFragments" => self.no_useless_fragments.as_ref(), + "noUselessLabel" => self.no_useless_label.as_ref(), + "noUselessRename" => self.no_useless_rename.as_ref(), + "noUselessSwitchCase" => self.no_useless_switch_case.as_ref(), + "noWith" => self.no_with.as_ref(), "useFlatMap" => self.use_flat_map.as_ref(), "useOptionalChain" => self.use_optional_chain.as_ref(), "useSimplifiedLogicExpression" => self.use_simplified_logic_expression.as_ref(), @@ -893,6 +1200,28 @@ pub struct Correctness { #[bpaf(long("no-empty-pattern"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] pub no_empty_pattern: Option, + #[doc = "Disallow calling global object properties as functions"] + #[bpaf( + long("no-global-object-calls"), + argument("on|off|warn"), + optional, + hide + )] + #[serde(skip_serializing_if = "Option::is_none")] + pub no_global_object_calls: Option, + #[doc = "Disallow function and var declarations in nested blocks."] + #[bpaf(long("no-inner-declarations"), argument("on|off|warn"), optional, hide)] + #[serde(skip_serializing_if = "Option::is_none")] + pub no_inner_declarations: Option, + #[doc = "Prevents the incorrect use of super() inside classes. It also checks whether a call super() is missing from classes that extends other constructors."] + #[bpaf( + long("no-invalid-constructor-super"), + argument("on|off|warn"), + optional, + hide + )] + #[serde(skip_serializing_if = "Option::is_none")] + pub no_invalid_constructor_super: Option, #[doc = "Disallow new operators with the Symbol object"] #[bpaf(long("no-new-symbol"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] @@ -923,6 +1252,15 @@ pub struct Correctness { )] #[serde(skip_serializing_if = "Option::is_none")] pub no_string_case_mismatch: Option, + #[doc = "Disallow lexical declarations in switch clauses."] + #[bpaf( + long("no-switch-declarations"), + argument("on|off|warn"), + optional, + hide + )] + #[serde(skip_serializing_if = "Option::is_none")] + pub no_switch_declarations: Option, #[doc = "Prevents the usage of variables that haven't been declared inside the document"] #[bpaf( long("no-undeclared-variables"), @@ -945,10 +1283,27 @@ pub struct Correctness { #[bpaf(long("no-unreachable"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] pub no_unreachable: Option, + #[doc = "Ensures the super() constructor is called exactly once on every code path in a class constructor before this is accessed if the class has a superclass"] + #[bpaf(long("no-unreachable-super"), argument("on|off|warn"), optional, hide)] + #[serde(skip_serializing_if = "Option::is_none")] + pub no_unreachable_super: Option, #[doc = "Disallow control flow statements in finally blocks."] #[bpaf(long("no-unsafe-finally"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] pub no_unsafe_finally: Option, + #[doc = "Disallow the use of optional chaining in contexts where the undefined value is not allowed."] + #[bpaf( + long("no-unsafe-optional-chaining"), + argument("on|off|warn"), + optional, + hide + )] + #[serde(skip_serializing_if = "Option::is_none")] + pub no_unsafe_optional_chaining: Option, + #[doc = "Disallow unused labels."] + #[bpaf(long("no-unused-labels"), argument("on|off|warn"), optional, hide)] + #[serde(skip_serializing_if = "Option::is_none")] + pub no_unused_labels: Option, #[doc = "Disallow unused variables."] #[bpaf(long("no-unused-variables"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] @@ -975,46 +1330,66 @@ pub struct Correctness { )] #[serde(skip_serializing_if = "Option::is_none")] pub use_valid_for_direction: Option, + #[doc = "Require generator functions to contain yield."] + #[bpaf(long("use-yield"), argument("on|off|warn"), optional, hide)] + #[serde(skip_serializing_if = "Option::is_none")] + pub use_yield: Option, } impl Correctness { const GROUP_NAME: &'static str = "correctness"; - pub(crate) const GROUP_RULES: [&'static str; 17] = [ + pub(crate) const GROUP_RULES: [&'static str; 25] = [ "noChildrenProp", "noConstAssign", "noConstructorReturn", "noEmptyPattern", + "noGlobalObjectCalls", + "noInnerDeclarations", + "noInvalidConstructorSuper", "noNewSymbol", "noPrecisionLoss", "noRenderReturnValue", "noSetterReturn", "noStringCaseMismatch", + "noSwitchDeclarations", "noUndeclaredVariables", "noUnnecessaryContinue", "noUnreachable", + "noUnreachableSuper", "noUnsafeFinally", + "noUnsafeOptionalChaining", + "noUnusedLabels", "noUnusedVariables", "noVoidElementsWithChildren", "noVoidTypeReturn", "useValidForDirection", + "useYield", ]; - const RECOMMENDED_RULES: [&'static str; 15] = [ + const RECOMMENDED_RULES: [&'static str; 23] = [ "noChildrenProp", "noConstAssign", "noConstructorReturn", "noEmptyPattern", + "noGlobalObjectCalls", + "noInnerDeclarations", + "noInvalidConstructorSuper", "noNewSymbol", "noPrecisionLoss", "noRenderReturnValue", "noSetterReturn", "noStringCaseMismatch", + "noSwitchDeclarations", "noUnnecessaryContinue", "noUnreachable", + "noUnreachableSuper", "noUnsafeFinally", + "noUnsafeOptionalChaining", + "noUnusedLabels", "noVoidElementsWithChildren", "noVoidTypeReturn", "useValidForDirection", + "useYield", ]; - const RECOMMENDED_RULES_AS_FILTERS: [RuleFilter<'static>; 15] = [ + const RECOMMENDED_RULES_AS_FILTERS: [RuleFilter<'static>; 23] = [ 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]), @@ -1024,14 +1399,22 @@ impl Correctness { 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[8]), + RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9]), 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]), 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[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]), ]; - const ALL_RULES_AS_FILTERS: [RuleFilter<'static>; 17] = [ + const ALL_RULES_AS_FILTERS: [RuleFilter<'static>; 25] = [ 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]), @@ -1049,6 +1432,14 @@ impl Correctness { 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]), ]; pub(crate) fn is_recommended(&self) -> bool { !matches!(self.recommended, Some(false)) } pub(crate) const fn is_not_recommended(&self) -> bool { @@ -1078,71 +1469,111 @@ impl Correctness { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[3])); } } - if let Some(rule) = self.no_new_symbol.as_ref() { + if let Some(rule) = self.no_global_object_calls.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[4])); } } - if let Some(rule) = self.no_precision_loss.as_ref() { + if let Some(rule) = self.no_inner_declarations.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[5])); } } - if let Some(rule) = self.no_render_return_value.as_ref() { + if let Some(rule) = self.no_invalid_constructor_super.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[6])); } } - if let Some(rule) = self.no_setter_return.as_ref() { + if let Some(rule) = self.no_new_symbol.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[7])); } } - if let Some(rule) = self.no_string_case_mismatch.as_ref() { + if let Some(rule) = self.no_precision_loss.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[8])); } } - if let Some(rule) = self.no_undeclared_variables.as_ref() { + if let Some(rule) = self.no_render_return_value.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9])); } } - if let Some(rule) = self.no_unnecessary_continue.as_ref() { + if let Some(rule) = self.no_setter_return.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[10])); } } - if let Some(rule) = self.no_unreachable.as_ref() { + if let Some(rule) = self.no_string_case_mismatch.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[11])); } } - if let Some(rule) = self.no_unsafe_finally.as_ref() { + if let Some(rule) = self.no_switch_declarations.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[12])); } } - if let Some(rule) = self.no_unused_variables.as_ref() { + if let Some(rule) = self.no_undeclared_variables.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[13])); } } - if let Some(rule) = self.no_void_elements_with_children.as_ref() { + if let Some(rule) = self.no_unnecessary_continue.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[14])); } } - if let Some(rule) = self.no_void_type_return.as_ref() { + if let Some(rule) = self.no_unreachable.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[15])); } } - if let Some(rule) = self.use_valid_for_direction.as_ref() { + if let Some(rule) = self.no_unreachable_super.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[16])); } } + if let Some(rule) = self.no_unsafe_finally.as_ref() { + if rule.is_enabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[17])); + } + } + if let Some(rule) = self.no_unsafe_optional_chaining.as_ref() { + if rule.is_enabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[18])); + } + } + if let Some(rule) = self.no_unused_labels.as_ref() { + if rule.is_enabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[19])); + } + } + if let Some(rule) = self.no_unused_variables.as_ref() { + if rule.is_enabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[20])); + } + } + if let Some(rule) = self.no_void_elements_with_children.as_ref() { + if rule.is_enabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[21])); + } + } + if let Some(rule) = self.no_void_type_return.as_ref() { + if rule.is_enabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[22])); + } + } + 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[23])); + } + } + if let Some(rule) = self.use_yield.as_ref() { + if rule.is_enabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[24])); + } + } index_set } pub(crate) fn get_disabled_rules(&self) -> IndexSet { @@ -1167,71 +1598,111 @@ impl Correctness { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[3])); } } - if let Some(rule) = self.no_new_symbol.as_ref() { + if let Some(rule) = self.no_global_object_calls.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[4])); } } - if let Some(rule) = self.no_precision_loss.as_ref() { + if let Some(rule) = self.no_inner_declarations.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[5])); } } - if let Some(rule) = self.no_render_return_value.as_ref() { + if let Some(rule) = self.no_invalid_constructor_super.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[6])); } } - if let Some(rule) = self.no_setter_return.as_ref() { + if let Some(rule) = self.no_new_symbol.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[7])); } } - if let Some(rule) = self.no_string_case_mismatch.as_ref() { + if let Some(rule) = self.no_precision_loss.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[8])); } } - if let Some(rule) = self.no_undeclared_variables.as_ref() { + if let Some(rule) = self.no_render_return_value.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9])); } } - if let Some(rule) = self.no_unnecessary_continue.as_ref() { + if let Some(rule) = self.no_setter_return.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[10])); } } - if let Some(rule) = self.no_unreachable.as_ref() { + if let Some(rule) = self.no_string_case_mismatch.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[11])); } } - if let Some(rule) = self.no_unsafe_finally.as_ref() { + if let Some(rule) = self.no_switch_declarations.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[12])); } } - if let Some(rule) = self.no_unused_variables.as_ref() { + if let Some(rule) = self.no_undeclared_variables.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[13])); } } - if let Some(rule) = self.no_void_elements_with_children.as_ref() { + if let Some(rule) = self.no_unnecessary_continue.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[14])); } } - if let Some(rule) = self.no_void_type_return.as_ref() { + if let Some(rule) = self.no_unreachable.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[15])); } } - if let Some(rule) = self.use_valid_for_direction.as_ref() { + if let Some(rule) = self.no_unreachable_super.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[16])); } } + if let Some(rule) = self.no_unsafe_finally.as_ref() { + if rule.is_disabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[17])); + } + } + if let Some(rule) = self.no_unsafe_optional_chaining.as_ref() { + if rule.is_disabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[18])); + } + } + if let Some(rule) = self.no_unused_labels.as_ref() { + if rule.is_disabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[19])); + } + } + if let Some(rule) = self.no_unused_variables.as_ref() { + if rule.is_disabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[20])); + } + } + if let Some(rule) = self.no_void_elements_with_children.as_ref() { + if rule.is_disabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[21])); + } + } + if let Some(rule) = self.no_void_type_return.as_ref() { + if rule.is_disabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[22])); + } + } + 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[23])); + } + } + if let Some(rule) = self.use_yield.as_ref() { + if rule.is_disabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[24])); + } + } index_set } #[doc = r" Checks if, given a rule name, matches one of the rules contained in this category"] @@ -1240,10 +1711,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>; 15] { + pub(crate) fn recommended_rules_as_filters() -> [RuleFilter<'static>; 23] { Self::RECOMMENDED_RULES_AS_FILTERS } - pub(crate) fn all_rules_as_filters() -> [RuleFilter<'static>; 17] { Self::ALL_RULES_AS_FILTERS } + pub(crate) fn all_rules_as_filters() -> [RuleFilter<'static>; 25] { Self::ALL_RULES_AS_FILTERS } #[doc = r" Select preset rules"] pub(crate) fn collect_preset_rules( &self, @@ -1267,19 +1738,27 @@ impl Correctness { "noConstAssign" => self.no_const_assign.as_ref(), "noConstructorReturn" => self.no_constructor_return.as_ref(), "noEmptyPattern" => self.no_empty_pattern.as_ref(), + "noGlobalObjectCalls" => self.no_global_object_calls.as_ref(), + "noInnerDeclarations" => self.no_inner_declarations.as_ref(), + "noInvalidConstructorSuper" => self.no_invalid_constructor_super.as_ref(), "noNewSymbol" => self.no_new_symbol.as_ref(), "noPrecisionLoss" => self.no_precision_loss.as_ref(), "noRenderReturnValue" => self.no_render_return_value.as_ref(), "noSetterReturn" => self.no_setter_return.as_ref(), "noStringCaseMismatch" => self.no_string_case_mismatch.as_ref(), + "noSwitchDeclarations" => self.no_switch_declarations.as_ref(), "noUndeclaredVariables" => self.no_undeclared_variables.as_ref(), "noUnnecessaryContinue" => self.no_unnecessary_continue.as_ref(), "noUnreachable" => self.no_unreachable.as_ref(), + "noUnreachableSuper" => self.no_unreachable_super.as_ref(), "noUnsafeFinally" => self.no_unsafe_finally.as_ref(), + "noUnsafeOptionalChaining" => self.no_unsafe_optional_chaining.as_ref(), + "noUnusedLabels" => self.no_unused_labels.as_ref(), "noUnusedVariables" => self.no_unused_variables.as_ref(), "noVoidElementsWithChildren" => self.no_void_elements_with_children.as_ref(), "noVoidTypeReturn" => self.no_void_type_return.as_ref(), "useValidForDirection" => self.use_valid_for_direction.as_ref(), + "useYield" => self.use_yield.as_ref(), _ => None, } } @@ -1315,35 +1794,14 @@ pub struct Nursery { )] #[serde(skip_serializing_if = "Option::is_none")] pub no_aria_unsupported_elements: Option, - #[doc = "Disallow assignments in expressions."] - #[bpaf( - long("no-assign-in-expressions"), - argument("on|off|warn"), - optional, - hide - )] - #[serde(skip_serializing_if = "Option::is_none")] - pub no_assign_in_expressions: Option, #[doc = "Disallow certain types."] #[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 reassigning class members."] - #[bpaf(long("no-class-assign"), argument("on|off|warn"), optional, hide)] - #[serde(skip_serializing_if = "Option::is_none")] - pub no_class_assign: Option, - #[doc = "Disallow comma operator."] - #[bpaf(long("no-comma-operator"), argument("on|off|warn"), optional, hide)] - #[serde(skip_serializing_if = "Option::is_none")] - pub no_comma_operator: Option, #[doc = "Disallow arrow functions where they could be confused with comparisons."] #[bpaf(long("no-confusing-arrow"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] pub no_confusing_arrow: Option, - #[doc = "Disallow labeled statements that are not loops."] - #[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 the use of console.log"] #[bpaf(long("no-console-log"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] @@ -1352,19 +1810,6 @@ pub struct Nursery { #[bpaf(long("no-constant-condition"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] pub no_constant_condition: Option, - #[doc = "Disallow duplicate case labels. If a switch statement has duplicate test expressions in case clauses, it is likely that a programmer copied a case clause but forgot to change the test expression."] - #[bpaf(long("no-duplicate-case"), argument("on|off|warn"), optional, hide)] - #[serde(skip_serializing_if = "Option::is_none")] - pub no_duplicate_case: Option, - #[doc = "Disallow duplicate class members."] - #[bpaf( - long("no-duplicate-class-members"), - argument("on|off|warn"), - optional, - hide - )] - #[serde(skip_serializing_if = "Option::is_none")] - pub no_duplicate_class_members: Option, #[doc = "Prevents JSX properties to be assigned multiple times."] #[bpaf( long("no-duplicate-jsx-props"), @@ -1374,57 +1819,10 @@ pub struct Nursery { )] #[serde(skip_serializing_if = "Option::is_none")] pub no_duplicate_jsx_props: Option, - #[doc = "Disallow unnecessary labels."] - #[bpaf(long("no-extra-labels"), argument("on|off|warn"), optional, hide)] - #[serde(skip_serializing_if = "Option::is_none")] - pub no_extra_labels: Option, - #[doc = "Typing mistakes and misunderstandings about where semicolons are required can lead to semicolons that are unnecessary. While not technically an error, extra semicolons can cause confusion when reading code."] - #[bpaf(long("no-extra-semicolons"), argument("on|off|warn"), optional, hide)] - #[serde(skip_serializing_if = "Option::is_none")] - pub no_extra_semicolons: Option, #[doc = "Prefer for...of statement instead of Array.forEach."] #[bpaf(long("no-for-each"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] pub no_for_each: Option, - #[doc = "Disallow calling global object properties as functions"] - #[bpaf( - long("no-global-object-calls"), - argument("on|off|warn"), - optional, - hide - )] - #[serde(skip_serializing_if = "Option::is_none")] - pub no_global_object_calls: Option, - #[doc = "Disallow type annotations for variables, parameters, and class properties initialized with a literal expression."] - #[bpaf(long("no-inferrable-types"), argument("on|off|warn"), optional, hide)] - #[serde(skip_serializing_if = "Option::is_none")] - pub no_inferrable_types: Option, - #[doc = "Disallow function and var declarations in nested blocks."] - #[bpaf(long("no-inner-declarations"), argument("on|off|warn"), optional, hide)] - #[serde(skip_serializing_if = "Option::is_none")] - pub no_inner_declarations: Option, - #[doc = "Prevents the incorrect use of super() inside classes. It also checks whether a call super() is missing from classes that extends other constructors."] - #[bpaf( - long("no-invalid-constructor-super"), - argument("on|off|warn"), - optional, - hide - )] - #[serde(skip_serializing_if = "Option::is_none")] - pub no_invalid_constructor_super: Option, - #[doc = "Disallow the use of TypeScript's namespaces."] - #[bpaf(long("no-namespace"), argument("on|off|warn"), optional, hide)] - #[serde(skip_serializing_if = "Option::is_none")] - pub no_namespace: Option, - #[doc = "Enforce that interactive ARIA roles are not assigned to non-interactive HTML elements."] - #[bpaf( - long("no-noninteractive-element-to-interactive-role"), - argument("on|off|warn"), - optional, - hide - )] - #[serde(skip_serializing_if = "Option::is_none")] - pub no_noninteractive_element_to_interactive_role: Option, #[doc = "Enforce that tabIndex is not assigned to non-interactive HTML elements."] #[bpaf( long("no-noninteractive-tabindex"), @@ -1434,120 +1832,18 @@ pub struct Nursery { )] #[serde(skip_serializing_if = "Option::is_none")] pub no_noninteractive_tabindex: Option, - #[doc = "Disallow reassigning function parameters."] - #[bpaf(long("no-parameter-assign"), argument("on|off|warn"), optional, hide)] - #[serde(skip_serializing_if = "Option::is_none")] - pub no_parameter_assign: Option, - #[doc = "Disallow the use of parameter properties in class constructors."] - #[bpaf( - long("no-parameter-properties"), - argument("on|off|warn"), - optional, - hide - )] - #[serde(skip_serializing_if = "Option::is_none")] - pub no_parameter_properties: Option, - #[doc = "Disallow direct use of Object.prototype builtins."] - #[bpaf(long("no-prototype-builtins"), argument("on|off|warn"), optional, hide)] - #[serde(skip_serializing_if = "Option::is_none")] - pub no_prototype_builtins: Option, - #[doc = "Disallow variable, function, class, and type redeclarations in the same scope."] - #[bpaf(long("no-redeclare"), argument("on|off|warn"), optional, hide)] - #[serde(skip_serializing_if = "Option::is_none")] - pub no_redeclare: Option, - #[doc = "Enforce img alt prop does not contain the word \"image\", \"picture\", or \"photo\"."] - #[bpaf(long("no-redundant-alt"), argument("on|off|warn"), optional, hide)] - #[serde(skip_serializing_if = "Option::is_none")] - pub no_redundant_alt: Option, #[doc = "Enforce explicit role property is not the same as implicit/default role property on an element."] #[bpaf(long("no-redundant-roles"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] pub no_redundant_roles: Option, - #[doc = "This rule allows you to specify global variable names that you don’t want to use in your application."] - #[bpaf(long("no-restricted-globals"), argument("on|off|warn"), optional, hide)] - #[serde(skip_serializing_if = "Option::is_none")] - pub no_restricted_globals: Option, #[doc = "Disallow assignments where both sides are exactly the same."] #[bpaf(long("no-self-assign"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] pub no_self_assign: Option, - #[doc = "Disallow comparisons where both sides are exactly the same."] - #[bpaf(long("no-self-compare"), argument("on|off|warn"), optional, hide)] - #[serde(skip_serializing_if = "Option::is_none")] - pub no_self_compare: Option, - #[doc = "Enforces the usage of the title element for the svg element."] - #[bpaf(long("no-svg-without-title"), argument("on|off|warn"), optional, hide)] - #[serde(skip_serializing_if = "Option::is_none")] - pub no_svg_without_title: Option, - #[doc = "Disallow lexical declarations in switch clauses."] - #[bpaf( - long("no-switch-declarations"), - argument("on|off|warn"), - optional, - hide - )] - #[serde(skip_serializing_if = "Option::is_none")] - pub no_switch_declarations: Option, - #[doc = "Ensures the super() constructor is called exactly once on every code path in a class constructor before this is accessed if the class has a superclass"] - #[bpaf(long("no-unreachable-super"), argument("on|off|warn"), optional, hide)] - #[serde(skip_serializing_if = "Option::is_none")] - pub no_unreachable_super: Option, - #[doc = "Disallow the use of optional chaining in contexts where the undefined value is not allowed."] - #[bpaf( - long("no-unsafe-optional-chaining"), - argument("on|off|warn"), - optional, - hide - )] - #[serde(skip_serializing_if = "Option::is_none")] - pub no_unsafe_optional_chaining: Option, - #[doc = "Disallow unused labels."] - #[bpaf(long("no-unused-labels"), argument("on|off|warn"), optional, hide)] - #[serde(skip_serializing_if = "Option::is_none")] - pub no_unused_labels: Option, - #[doc = "Disallow unnecessary catch clauses."] - #[bpaf(long("no-useless-catch"), argument("on|off|warn"), optional, hide)] - #[serde(skip_serializing_if = "Option::is_none")] - pub no_useless_catch: Option, - #[doc = "Disallow unnecessary constructors."] - #[bpaf( - long("no-useless-constructor"), - argument("on|off|warn"), - optional, - hide - )] - #[serde(skip_serializing_if = "Option::is_none")] - pub no_useless_constructor: Option, - #[doc = "Disallow renaming import, export, and destructured assignments to the same name."] - #[bpaf(long("no-useless-rename"), argument("on|off|warn"), optional, hide)] - #[serde(skip_serializing_if = "Option::is_none")] - pub no_useless_rename: Option, - #[doc = "Disallow useless case in switch statements."] - #[bpaf( - long("no-useless-switch-case"), - argument("on|off|warn"), - optional, - hide - )] - #[serde(skip_serializing_if = "Option::is_none")] - pub no_useless_switch_case: 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")] - pub no_with: Option, #[doc = "Enforce that ARIA state and property values are valid."] #[bpaf(long("use-aria-prop-types"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] pub use_aria_prop_types: Option, - #[doc = "Enforce that elements with ARIA roles must have all required ARIA attributes for that role."] - #[bpaf( - long("use-aria-props-for-role"), - argument("on|off|warn"), - optional, - hide - )] - #[serde(skip_serializing_if = "Option::is_none")] - pub use_aria_props_for_role: Option, #[doc = "Enforce camel case naming convention."] #[bpaf(long("use-camel-case"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] @@ -1578,10 +1874,6 @@ pub struct Nursery { #[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 = "Enforces the usage of the attribute title for the element iframe"] - #[bpaf(long("use-iframe-title"), argument("on|off|warn"), optional, hide)] - #[serde(skip_serializing_if = "Option::is_none")] - pub use_iframe_title: 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")] @@ -1599,184 +1891,58 @@ pub struct Nursery { #[bpaf(long("use-literal-keys"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] pub use_literal_keys: Option, - #[doc = "Enforces that audio and video elements must have a track for captions."] - #[bpaf(long("use-media-caption"), argument("on|off|warn"), optional, hide)] - #[serde(skip_serializing_if = "Option::is_none")] - pub use_media_caption: 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")] - pub use_namespace_keyword: Option, - #[doc = "Ensures that ARIA properties aria-* are all valid."] - #[bpaf(long("use-valid-aria-props"), argument("on|off|warn"), optional, hide)] - #[serde(skip_serializing_if = "Option::is_none")] - pub use_valid_aria_props: Option, - #[doc = "Ensure that the attribute passed to the lang attribute is a correct ISO language and/or country."] - #[bpaf(long("use-valid-lang"), argument("on|off|warn"), optional, hide)] - #[serde(skip_serializing_if = "Option::is_none")] - pub use_valid_lang: Option, - #[doc = "Require generator functions to contain yield."] - #[bpaf(long("use-yield"), argument("on|off|warn"), optional, hide)] - #[serde(skip_serializing_if = "Option::is_none")] - pub use_yield: Option, } impl Nursery { const GROUP_NAME: &'static str = "nursery"; - pub(crate) const GROUP_RULES: [&'static str; 58] = [ + pub(crate) const GROUP_RULES: [&'static str; 20] = [ "noAccumulatingSpread", "noAriaUnsupportedElements", - "noAssignInExpressions", "noBannedTypes", - "noClassAssign", - "noCommaOperator", "noConfusingArrow", - "noConfusingLabels", "noConsoleLog", "noConstantCondition", - "noDuplicateCase", - "noDuplicateClassMembers", "noDuplicateJsxProps", - "noExtraLabels", - "noExtraSemicolons", "noForEach", - "noGlobalObjectCalls", - "noInferrableTypes", - "noInnerDeclarations", - "noInvalidConstructorSuper", - "noNamespace", - "noNoninteractiveElementToInteractiveRole", "noNoninteractiveTabindex", - "noParameterAssign", - "noParameterProperties", - "noPrototypeBuiltins", - "noRedeclare", - "noRedundantAlt", "noRedundantRoles", - "noRestrictedGlobals", "noSelfAssign", - "noSelfCompare", - "noSvgWithoutTitle", - "noSwitchDeclarations", - "noUnreachableSuper", - "noUnsafeOptionalChaining", - "noUnusedLabels", - "noUselessCatch", - "noUselessConstructor", - "noUselessRename", - "noUselessSwitchCase", - "noWith", "useAriaPropTypes", - "useAriaPropsForRole", "useCamelCase", "useExhaustiveDependencies", "useGroupedTypeImport", "useHeadingContent", "useHookAtTopLevel", - "useIframeTitle", "useIsNan", "useLiteralEnumMembers", "useLiteralKeys", - "useMediaCaption", - "useNamespaceKeyword", - "useValidAriaProps", - "useValidLang", - "useYield", ]; - const RECOMMENDED_RULES: [&'static str; 45] = [ + const RECOMMENDED_RULES: [&'static str; 11] = [ "noAriaUnsupportedElements", - "noAssignInExpressions", "noBannedTypes", - "noClassAssign", - "noCommaOperator", - "noConfusingLabels", "noConstantCondition", - "noDuplicateCase", - "noDuplicateClassMembers", "noDuplicateJsxProps", - "noExtraLabels", - "noExtraSemicolons", - "noGlobalObjectCalls", - "noInferrableTypes", - "noInnerDeclarations", - "noInvalidConstructorSuper", - "noNamespace", - "noNoninteractiveElementToInteractiveRole", - "noParameterAssign", - "noRedeclare", - "noRedundantAlt", "noRedundantRoles", "noSelfAssign", - "noSelfCompare", - "noSvgWithoutTitle", - "noSwitchDeclarations", - "noUnreachableSuper", - "noUnsafeOptionalChaining", - "noUnusedLabels", - "noUselessCatch", - "noUselessConstructor", - "noUselessRename", - "noUselessSwitchCase", - "noWith", - "useAriaPropsForRole", "useExhaustiveDependencies", "useGroupedTypeImport", - "useIframeTitle", "useIsNan", "useLiteralEnumMembers", "useLiteralKeys", - "useMediaCaption", - "useValidAriaProps", - "useValidLang", - "useYield", ]; - const RECOMMENDED_RULES_AS_FILTERS: [RuleFilter<'static>; 45] = [ + const RECOMMENDED_RULES_AS_FILTERS: [RuleFilter<'static>; 11] = [ 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]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[7]), + 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[10]), - 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[13]), RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[14]), - 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[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]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[30]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[31]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[32]), - 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]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[41]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[43]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[45]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[46]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[49]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[50]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[51]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[52]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[53]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[55]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[56]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[57]), ]; - const ALL_RULES_AS_FILTERS: [RuleFilter<'static>; 58] = [ + const ALL_RULES_AS_FILTERS: [RuleFilter<'static>; 20] = [ 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]), @@ -1797,44 +1963,6 @@ impl Nursery { 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]), - 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]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[31]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[32]), - 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]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[41]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[42]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[43]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[44]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[45]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[46]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[47]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[48]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[49]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[50]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[51]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[52]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[53]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[54]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[55]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[56]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[57]), ]; pub(crate) fn is_recommended(&self) -> bool { !matches!(self.recommended, Some(false)) } pub(crate) const fn is_not_recommended(&self) -> bool { @@ -1854,284 +1982,94 @@ impl Nursery { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[1])); } } - if let Some(rule) = self.no_assign_in_expressions.as_ref() { - if rule.is_enabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[2])); - } - } if let Some(rule) = self.no_banned_types.as_ref() { if rule.is_enabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[3])); - } - } - if let Some(rule) = self.no_class_assign.as_ref() { - if rule.is_enabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[4])); - } - } - if let Some(rule) = self.no_comma_operator.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[2])); } } if let Some(rule) = self.no_confusing_arrow.as_ref() { if rule.is_enabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[6])); - } - } - if let Some(rule) = self.no_confusing_labels.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[3])); } } 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[8])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[4])); } } if let Some(rule) = self.no_constant_condition.as_ref() { if rule.is_enabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9])); - } - } - 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[10])); - } - } - 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[11])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[5])); } } 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[12])); - } - } - if let Some(rule) = self.no_extra_labels.as_ref() { - if rule.is_enabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[13])); - } - } - if let Some(rule) = self.no_extra_semicolons.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[6])); } } 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[15])); - } - } - if let Some(rule) = self.no_global_object_calls.as_ref() { - if rule.is_enabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[16])); - } - } - if let Some(rule) = self.no_inferrable_types.as_ref() { - if rule.is_enabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[17])); - } - } - if let Some(rule) = self.no_inner_declarations.as_ref() { - if rule.is_enabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[18])); - } - } - if let Some(rule) = self.no_invalid_constructor_super.as_ref() { - if rule.is_enabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[19])); - } - } - if let Some(rule) = self.no_namespace.as_ref() { - if rule.is_enabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[20])); - } - } - if let Some(rule) = self.no_noninteractive_element_to_interactive_role.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[7])); } } if let Some(rule) = self.no_noninteractive_tabindex.as_ref() { if rule.is_enabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[22])); - } - } - if let Some(rule) = self.no_parameter_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_parameter_properties.as_ref() { - if rule.is_enabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[24])); - } - } - 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[25])); - } - } - if let Some(rule) = self.no_redeclare.as_ref() { - if rule.is_enabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[26])); - } - } - if let Some(rule) = self.no_redundant_alt.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[8])); } } if let Some(rule) = self.no_redundant_roles.as_ref() { if rule.is_enabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[28])); - } - } - if let Some(rule) = self.no_restricted_globals.as_ref() { - if rule.is_enabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[29])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9])); } } if let Some(rule) = self.no_self_assign.as_ref() { if rule.is_enabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[30])); - } - } - 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.no_svg_without_title.as_ref() { - if rule.is_enabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[32])); - } - } - if let Some(rule) = self.no_switch_declarations.as_ref() { - if rule.is_enabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[33])); - } - } - if let Some(rule) = self.no_unreachable_super.as_ref() { - if rule.is_enabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[34])); - } - } - if let Some(rule) = self.no_unsafe_optional_chaining.as_ref() { - if rule.is_enabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[35])); - } - } - if let Some(rule) = self.no_unused_labels.as_ref() { - if rule.is_enabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[36])); - } - } - 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[37])); - } - } - 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[38])); - } - } - 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[39])); - } - } - 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[40])); - } - } - if let Some(rule) = self.no_with.as_ref() { - if rule.is_enabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[41])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[10])); } } if let Some(rule) = self.use_aria_prop_types.as_ref() { if rule.is_enabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[42])); - } - } - if let Some(rule) = self.use_aria_props_for_role.as_ref() { - if rule.is_enabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[43])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[11])); } } if let Some(rule) = self.use_camel_case.as_ref() { if rule.is_enabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[44])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[12])); } } 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[45])); + 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[46])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[14])); } } if let Some(rule) = self.use_heading_content.as_ref() { if rule.is_enabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[47])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[15])); } } 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[48])); - } - } - if let Some(rule) = self.use_iframe_title.as_ref() { - if rule.is_enabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[49])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[16])); } } 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[50])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[17])); } } 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[51])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[18])); } } 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[52])); - } - } - if let Some(rule) = self.use_media_caption.as_ref() { - if rule.is_enabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[53])); - } - } - 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[54])); - } - } - if let Some(rule) = self.use_valid_aria_props.as_ref() { - if rule.is_enabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[55])); - } - } - if let Some(rule) = self.use_valid_lang.as_ref() { - if rule.is_enabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[56])); - } - } - if let Some(rule) = self.use_yield.as_ref() { - if rule.is_enabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[57])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[19])); } } index_set @@ -2148,284 +2086,94 @@ impl Nursery { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[1])); } } - if let Some(rule) = self.no_assign_in_expressions.as_ref() { - if rule.is_disabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[2])); - } - } if let Some(rule) = self.no_banned_types.as_ref() { if rule.is_disabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[3])); - } - } - if let Some(rule) = self.no_class_assign.as_ref() { - if rule.is_disabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[4])); - } - } - if let Some(rule) = self.no_comma_operator.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[2])); } } if let Some(rule) = self.no_confusing_arrow.as_ref() { if rule.is_disabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[6])); - } - } - if let Some(rule) = self.no_confusing_labels.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[3])); } } 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[8])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[4])); } } if let Some(rule) = self.no_constant_condition.as_ref() { if rule.is_disabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9])); - } - } - 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[10])); - } - } - 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[11])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[5])); } } 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[12])); - } - } - if let Some(rule) = self.no_extra_labels.as_ref() { - if rule.is_disabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[13])); - } - } - if let Some(rule) = self.no_extra_semicolons.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[6])); } } 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[15])); - } - } - if let Some(rule) = self.no_global_object_calls.as_ref() { - if rule.is_disabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[16])); - } - } - if let Some(rule) = self.no_inferrable_types.as_ref() { - if rule.is_disabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[17])); - } - } - if let Some(rule) = self.no_inner_declarations.as_ref() { - if rule.is_disabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[18])); - } - } - if let Some(rule) = self.no_invalid_constructor_super.as_ref() { - if rule.is_disabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[19])); - } - } - if let Some(rule) = self.no_namespace.as_ref() { - if rule.is_disabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[20])); - } - } - if let Some(rule) = self.no_noninteractive_element_to_interactive_role.as_ref() { - if rule.is_disabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[21])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[7])); } } if let Some(rule) = self.no_noninteractive_tabindex.as_ref() { if rule.is_disabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[22])); - } - } - if let Some(rule) = self.no_parameter_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_parameter_properties.as_ref() { - if rule.is_disabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[24])); - } - } - 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[25])); - } - } - if let Some(rule) = self.no_redeclare.as_ref() { - if rule.is_disabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[26])); - } - } - if let Some(rule) = self.no_redundant_alt.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[8])); } } if let Some(rule) = self.no_redundant_roles.as_ref() { if rule.is_disabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[28])); - } - } - if let Some(rule) = self.no_restricted_globals.as_ref() { - if rule.is_disabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[29])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9])); } } if let Some(rule) = self.no_self_assign.as_ref() { if rule.is_disabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[30])); - } - } - 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.no_svg_without_title.as_ref() { - if rule.is_disabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[32])); - } - } - if let Some(rule) = self.no_switch_declarations.as_ref() { - if rule.is_disabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[33])); - } - } - if let Some(rule) = self.no_unreachable_super.as_ref() { - if rule.is_disabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[34])); - } - } - if let Some(rule) = self.no_unsafe_optional_chaining.as_ref() { - if rule.is_disabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[35])); - } - } - if let Some(rule) = self.no_unused_labels.as_ref() { - if rule.is_disabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[36])); - } - } - 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[37])); - } - } - 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[38])); - } - } - 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[39])); - } - } - 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[40])); - } - } - if let Some(rule) = self.no_with.as_ref() { - if rule.is_disabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[41])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[10])); } } if let Some(rule) = self.use_aria_prop_types.as_ref() { if rule.is_disabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[42])); - } - } - if let Some(rule) = self.use_aria_props_for_role.as_ref() { - if rule.is_disabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[43])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[11])); } } if let Some(rule) = self.use_camel_case.as_ref() { if rule.is_disabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[44])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[12])); } } 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[45])); + 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[46])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[14])); } } if let Some(rule) = self.use_heading_content.as_ref() { if rule.is_disabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[47])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[15])); } } 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[48])); - } - } - if let Some(rule) = self.use_iframe_title.as_ref() { - if rule.is_disabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[49])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[16])); } } 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[50])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[17])); } } 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[51])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[18])); } } 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[52])); - } - } - if let Some(rule) = self.use_media_caption.as_ref() { - if rule.is_disabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[53])); - } - } - 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[54])); - } - } - if let Some(rule) = self.use_valid_aria_props.as_ref() { - if rule.is_disabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[55])); - } - } - if let Some(rule) = self.use_valid_lang.as_ref() { - if rule.is_disabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[56])); - } - } - if let Some(rule) = self.use_yield.as_ref() { - if rule.is_disabled() { - index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[57])); + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[19])); } } index_set @@ -2436,10 +2184,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>; 45] { + pub(crate) fn recommended_rules_as_filters() -> [RuleFilter<'static>; 11] { Self::RECOMMENDED_RULES_AS_FILTERS } - pub(crate) fn all_rules_as_filters() -> [RuleFilter<'static>; 58] { Self::ALL_RULES_AS_FILTERS } + pub(crate) fn all_rules_as_filters() -> [RuleFilter<'static>; 20] { Self::ALL_RULES_AS_FILTERS } #[doc = r" Select preset rules"] pub(crate) fn collect_preset_rules( &self, @@ -2461,64 +2209,24 @@ impl Nursery { match rule_name { "noAccumulatingSpread" => self.no_accumulating_spread.as_ref(), "noAriaUnsupportedElements" => self.no_aria_unsupported_elements.as_ref(), - "noAssignInExpressions" => self.no_assign_in_expressions.as_ref(), "noBannedTypes" => self.no_banned_types.as_ref(), - "noClassAssign" => self.no_class_assign.as_ref(), - "noCommaOperator" => self.no_comma_operator.as_ref(), "noConfusingArrow" => self.no_confusing_arrow.as_ref(), - "noConfusingLabels" => self.no_confusing_labels.as_ref(), "noConsoleLog" => self.no_console_log.as_ref(), "noConstantCondition" => self.no_constant_condition.as_ref(), - "noDuplicateCase" => self.no_duplicate_case.as_ref(), - "noDuplicateClassMembers" => self.no_duplicate_class_members.as_ref(), "noDuplicateJsxProps" => self.no_duplicate_jsx_props.as_ref(), - "noExtraLabels" => self.no_extra_labels.as_ref(), - "noExtraSemicolons" => self.no_extra_semicolons.as_ref(), "noForEach" => self.no_for_each.as_ref(), - "noGlobalObjectCalls" => self.no_global_object_calls.as_ref(), - "noInferrableTypes" => self.no_inferrable_types.as_ref(), - "noInnerDeclarations" => self.no_inner_declarations.as_ref(), - "noInvalidConstructorSuper" => self.no_invalid_constructor_super.as_ref(), - "noNamespace" => self.no_namespace.as_ref(), - "noNoninteractiveElementToInteractiveRole" => { - self.no_noninteractive_element_to_interactive_role.as_ref() - } "noNoninteractiveTabindex" => self.no_noninteractive_tabindex.as_ref(), - "noParameterAssign" => self.no_parameter_assign.as_ref(), - "noParameterProperties" => self.no_parameter_properties.as_ref(), - "noPrototypeBuiltins" => self.no_prototype_builtins.as_ref(), - "noRedeclare" => self.no_redeclare.as_ref(), - "noRedundantAlt" => self.no_redundant_alt.as_ref(), "noRedundantRoles" => self.no_redundant_roles.as_ref(), - "noRestrictedGlobals" => self.no_restricted_globals.as_ref(), "noSelfAssign" => self.no_self_assign.as_ref(), - "noSelfCompare" => self.no_self_compare.as_ref(), - "noSvgWithoutTitle" => self.no_svg_without_title.as_ref(), - "noSwitchDeclarations" => self.no_switch_declarations.as_ref(), - "noUnreachableSuper" => self.no_unreachable_super.as_ref(), - "noUnsafeOptionalChaining" => self.no_unsafe_optional_chaining.as_ref(), - "noUnusedLabels" => self.no_unused_labels.as_ref(), - "noUselessCatch" => self.no_useless_catch.as_ref(), - "noUselessConstructor" => self.no_useless_constructor.as_ref(), - "noUselessRename" => self.no_useless_rename.as_ref(), - "noUselessSwitchCase" => self.no_useless_switch_case.as_ref(), - "noWith" => self.no_with.as_ref(), "useAriaPropTypes" => self.use_aria_prop_types.as_ref(), - "useAriaPropsForRole" => self.use_aria_props_for_role.as_ref(), "useCamelCase" => self.use_camel_case.as_ref(), "useExhaustiveDependencies" => self.use_exhaustive_dependencies.as_ref(), "useGroupedTypeImport" => self.use_grouped_type_import.as_ref(), "useHeadingContent" => self.use_heading_content.as_ref(), "useHookAtTopLevel" => self.use_hook_at_top_level.as_ref(), - "useIframeTitle" => self.use_iframe_title.as_ref(), "useIsNan" => self.use_is_nan.as_ref(), "useLiteralEnumMembers" => self.use_literal_enum_members.as_ref(), "useLiteralKeys" => self.use_literal_keys.as_ref(), - "useMediaCaption" => self.use_media_caption.as_ref(), - "useNamespaceKeyword" => self.use_namespace_keyword.as_ref(), - "useValidAriaProps" => self.use_valid_aria_props.as_ref(), - "useValidLang" => self.use_valid_lang.as_ref(), - "useYield" => self.use_yield.as_ref(), _ => None, } } @@ -2745,10 +2453,22 @@ pub struct Style { #[bpaf(long("no-arguments"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] pub no_arguments: Option, + #[doc = "Disallow comma operator."] + #[bpaf(long("no-comma-operator"), argument("on|off|warn"), optional, hide)] + #[serde(skip_serializing_if = "Option::is_none")] + pub no_comma_operator: Option, #[doc = "Disallow implicit true values on JSX boolean attributes"] #[bpaf(long("no-implicit-boolean"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] pub no_implicit_boolean: Option, + #[doc = "Disallow type annotations for variables, parameters, and class properties initialized with a literal expression."] + #[bpaf(long("no-inferrable-types"), argument("on|off|warn"), optional, hide)] + #[serde(skip_serializing_if = "Option::is_none")] + pub no_inferrable_types: Option, + #[doc = "Disallow the use of TypeScript's namespaces."] + #[bpaf(long("no-namespace"), argument("on|off|warn"), optional, hide)] + #[serde(skip_serializing_if = "Option::is_none")] + pub no_namespace: Option, #[doc = "Disallow negation in the condition of an if statement if it has an else clause"] #[bpaf(long("no-negation-else"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] @@ -2757,6 +2477,23 @@ pub struct Style { #[bpaf(long("no-non-null-assertion"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] pub no_non_null_assertion: Option, + #[doc = "Disallow reassigning function parameters."] + #[bpaf(long("no-parameter-assign"), argument("on|off|warn"), optional, hide)] + #[serde(skip_serializing_if = "Option::is_none")] + pub no_parameter_assign: Option, + #[doc = "Disallow the use of parameter properties in class constructors."] + #[bpaf( + long("no-parameter-properties"), + argument("on|off|warn"), + optional, + hide + )] + #[serde(skip_serializing_if = "Option::is_none")] + pub no_parameter_properties: Option, + #[doc = "This rule allows you to specify global variable names that you don’t want to use in your application."] + #[bpaf(long("no-restricted-globals"), argument("on|off|warn"), optional, hide)] + #[serde(skip_serializing_if = "Option::is_none")] + pub no_restricted_globals: Option, #[doc = "Disallow the use of constants which its value is the upper-case version of its name."] #[bpaf(long("no-shouty-constants"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] @@ -2859,11 +2596,17 @@ pub struct Style { } impl Style { const GROUP_NAME: &'static str = "style"; - pub(crate) const GROUP_RULES: [&'static str; 20] = [ + pub(crate) const GROUP_RULES: [&'static str; 26] = [ "noArguments", + "noCommaOperator", "noImplicitBoolean", + "noInferrableTypes", + "noNamespace", "noNegationElse", "noNonNullAssertion", + "noParameterAssign", + "noParameterProperties", + "noRestrictedGlobals", "noShoutyConstants", "noUnusedTemplateLiteral", "noVar", @@ -2881,9 +2624,12 @@ impl Style { "useTemplate", "useWhile", ]; - const RECOMMENDED_RULES: [&'static str; 12] = [ + const RECOMMENDED_RULES: [&'static str; 15] = [ "noArguments", + "noCommaOperator", + "noInferrableTypes", "noNonNullAssertion", + "noParameterAssign", "noUnusedTemplateLiteral", "noVar", "useConst", @@ -2895,21 +2641,24 @@ impl Style { "useTemplate", "useWhile", ]; - const RECOMMENDED_RULES_AS_FILTERS: [RuleFilter<'static>; 12] = [ + const RECOMMENDED_RULES_AS_FILTERS: [RuleFilter<'static>; 15] = [ 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[3]), - 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[8]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[10]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[13]), + 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[17]), - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[18]), + 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[19]), + RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[20]), + 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]), ]; - const ALL_RULES_AS_FILTERS: [RuleFilter<'static>; 20] = [ + const ALL_RULES_AS_FILTERS: [RuleFilter<'static>; 26] = [ 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]), @@ -2930,6 +2679,12 @@ impl Style { 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]), ]; pub(crate) fn is_recommended(&self) -> bool { !matches!(self.recommended, Some(false)) } pub(crate) const fn is_not_recommended(&self) -> bool { @@ -2944,101 +2699,131 @@ impl Style { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[0])); } } - if let Some(rule) = self.no_implicit_boolean.as_ref() { + if let Some(rule) = self.no_comma_operator.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[1])); } } - if let Some(rule) = self.no_negation_else.as_ref() { + if let Some(rule) = self.no_implicit_boolean.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[2])); } } - if let Some(rule) = self.no_non_null_assertion.as_ref() { + if let Some(rule) = self.no_inferrable_types.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[3])); } } - if let Some(rule) = self.no_shouty_constants.as_ref() { + if let Some(rule) = self.no_namespace.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[4])); } } - if let Some(rule) = self.no_unused_template_literal.as_ref() { + if let Some(rule) = self.no_negation_else.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[5])); } } - if let Some(rule) = self.no_var.as_ref() { + if let Some(rule) = self.no_non_null_assertion.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[6])); } } - if let Some(rule) = self.use_block_statements.as_ref() { + if let Some(rule) = self.no_parameter_assign.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[7])); } } - if let Some(rule) = self.use_const.as_ref() { + if let Some(rule) = self.no_parameter_properties.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[8])); } } - if let Some(rule) = self.use_default_parameter_last.as_ref() { + if let Some(rule) = self.no_restricted_globals.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9])); } } - if let Some(rule) = self.use_enum_initializers.as_ref() { + if let Some(rule) = self.no_shouty_constants.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[10])); } } - if let Some(rule) = self.use_exponentiation_operator.as_ref() { + if let Some(rule) = self.no_unused_template_literal.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[11])); } } - if let Some(rule) = self.use_fragment_syntax.as_ref() { + if let Some(rule) = self.no_var.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[12])); } } - if let Some(rule) = self.use_numeric_literals.as_ref() { + if let Some(rule) = self.use_block_statements.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[13])); } } - if let Some(rule) = self.use_self_closing_elements.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[14])); } } - if let Some(rule) = self.use_shorthand_array_type.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[15])); } } - if let Some(rule) = self.use_single_case_statement.as_ref() { + 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[16])); } } - if let Some(rule) = self.use_single_var_declarator.as_ref() { + 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])); } } - if let Some(rule) = self.use_template.as_ref() { + 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])); } } - if let Some(rule) = self.use_while.as_ref() { + 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[19])); } } + 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[20])); + } + } + 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[21])); + } + } + 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[22])); + } + } + 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[23])); + } + } + if let Some(rule) = self.use_template.as_ref() { + if rule.is_enabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[24])); + } + } + if let Some(rule) = self.use_while.as_ref() { + if rule.is_enabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[25])); + } + } index_set } pub(crate) fn get_disabled_rules(&self) -> IndexSet { @@ -3048,101 +2833,131 @@ impl Style { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[0])); } } - if let Some(rule) = self.no_implicit_boolean.as_ref() { + if let Some(rule) = self.no_comma_operator.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[1])); } } - if let Some(rule) = self.no_negation_else.as_ref() { + if let Some(rule) = self.no_implicit_boolean.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[2])); } } - if let Some(rule) = self.no_non_null_assertion.as_ref() { + if let Some(rule) = self.no_inferrable_types.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[3])); } } - if let Some(rule) = self.no_shouty_constants.as_ref() { + if let Some(rule) = self.no_namespace.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[4])); } } - if let Some(rule) = self.no_unused_template_literal.as_ref() { + if let Some(rule) = self.no_negation_else.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[5])); } } - if let Some(rule) = self.no_var.as_ref() { + if let Some(rule) = self.no_non_null_assertion.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[6])); } } - if let Some(rule) = self.use_block_statements.as_ref() { + if let Some(rule) = self.no_parameter_assign.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[7])); } } - if let Some(rule) = self.use_const.as_ref() { + if let Some(rule) = self.no_parameter_properties.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[8])); } } - if let Some(rule) = self.use_default_parameter_last.as_ref() { + if let Some(rule) = self.no_restricted_globals.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9])); } } - if let Some(rule) = self.use_enum_initializers.as_ref() { + if let Some(rule) = self.no_shouty_constants.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[10])); } } - if let Some(rule) = self.use_exponentiation_operator.as_ref() { + if let Some(rule) = self.no_unused_template_literal.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[11])); } } - if let Some(rule) = self.use_fragment_syntax.as_ref() { + if let Some(rule) = self.no_var.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[12])); } } - if let Some(rule) = self.use_numeric_literals.as_ref() { + if let Some(rule) = self.use_block_statements.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[13])); } } - if let Some(rule) = self.use_self_closing_elements.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[14])); } } - if let Some(rule) = self.use_shorthand_array_type.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[15])); } } - if let Some(rule) = self.use_single_case_statement.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[16])); } } - if let Some(rule) = self.use_single_var_declarator.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[17])); } } - if let Some(rule) = self.use_template.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[18])); } } - if let Some(rule) = self.use_while.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[19])); } } + 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[20])); + } + } + 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[21])); + } + } + 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[22])); + } + } + 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[23])); + } + } + if let Some(rule) = self.use_template.as_ref() { + if rule.is_disabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[24])); + } + } + if let Some(rule) = self.use_while.as_ref() { + if rule.is_disabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[25])); + } + } index_set } #[doc = r" Checks if, given a rule name, matches one of the rules contained in this category"] @@ -3151,10 +2966,10 @@ impl Style { 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>; 15] { Self::RECOMMENDED_RULES_AS_FILTERS } - pub(crate) fn all_rules_as_filters() -> [RuleFilter<'static>; 20] { Self::ALL_RULES_AS_FILTERS } + pub(crate) fn all_rules_as_filters() -> [RuleFilter<'static>; 26] { Self::ALL_RULES_AS_FILTERS } #[doc = r" Select preset rules"] pub(crate) fn collect_preset_rules( &self, @@ -3175,9 +2990,15 @@ impl Style { pub(crate) fn get_rule_configuration(&self, rule_name: &str) -> Option<&RuleConfiguration> { match rule_name { "noArguments" => self.no_arguments.as_ref(), + "noCommaOperator" => self.no_comma_operator.as_ref(), "noImplicitBoolean" => self.no_implicit_boolean.as_ref(), + "noInferrableTypes" => self.no_inferrable_types.as_ref(), + "noNamespace" => self.no_namespace.as_ref(), "noNegationElse" => self.no_negation_else.as_ref(), "noNonNullAssertion" => self.no_non_null_assertion.as_ref(), + "noParameterAssign" => self.no_parameter_assign.as_ref(), + "noParameterProperties" => self.no_parameter_properties.as_ref(), + "noRestrictedGlobals" => self.no_restricted_globals.as_ref(), "noShoutyConstants" => self.no_shouty_constants.as_ref(), "noUnusedTemplateLiteral" => self.no_unused_template_literal.as_ref(), "noVar" => self.no_var.as_ref(), @@ -3215,6 +3036,15 @@ pub struct Suspicious { #[bpaf(long("no-array-index-key"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] pub no_array_index_key: Option, + #[doc = "Disallow assignments in expressions."] + #[bpaf( + long("no-assign-in-expressions"), + argument("on|off|warn"), + optional, + hide + )] + #[serde(skip_serializing_if = "Option::is_none")] + pub no_assign_in_expressions: Option, #[doc = "Disallows using an async function as a Promise executor."] #[bpaf( long("no-async-promise-executor"), @@ -3228,6 +3058,10 @@ pub struct Suspicious { #[bpaf(long("no-catch-assign"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] pub no_catch_assign: Option, + #[doc = "Disallow reassigning class members."] + #[bpaf(long("no-class-assign"), argument("on|off|warn"), optional, hide)] + #[serde(skip_serializing_if = "Option::is_none")] + pub no_class_assign: Option, #[doc = "Prevent comments from being inserted as text nodes"] #[bpaf(long("no-comment-text"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] @@ -3236,6 +3070,10 @@ pub struct Suspicious { #[bpaf(long("no-compare-neg-zero"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] pub no_compare_neg_zero: Option, + #[doc = "Disallow labeled statements that are not loops."] + #[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 TypeScript const enum"] #[bpaf(long("no-const-enum"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] @@ -3248,6 +3086,19 @@ pub struct Suspicious { #[bpaf(long("no-double-equals"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] pub no_double_equals: Option, + #[doc = "Disallow duplicate case labels. If a switch statement has duplicate test expressions in case clauses, it is likely that a programmer copied a case clause but forgot to change the test expression."] + #[bpaf(long("no-duplicate-case"), argument("on|off|warn"), optional, hide)] + #[serde(skip_serializing_if = "Option::is_none")] + pub no_duplicate_case: Option, + #[doc = "Disallow duplicate class members."] + #[bpaf( + long("no-duplicate-class-members"), + argument("on|off|warn"), + optional, + hide + )] + #[serde(skip_serializing_if = "Option::is_none")] + pub no_duplicate_class_members: Option, #[doc = "Prevents object literals having more than one property declaration for the same name. If an object property with the same name is defined multiple times (except when combining a getter with a setter), only the last definition makes it into the object and previous definitions are ignored, which is likely a mistake."] #[bpaf( long("no-duplicate-object-keys"), @@ -3295,6 +3146,14 @@ pub struct Suspicious { #[bpaf(long("no-label-var"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] pub no_label_var: Option, + #[doc = "Disallow direct use of Object.prototype builtins."] + #[bpaf(long("no-prototype-builtins"), argument("on|off|warn"), optional, hide)] + #[serde(skip_serializing_if = "Option::is_none")] + pub no_prototype_builtins: Option, + #[doc = "Disallow variable, function, class, and type redeclarations in the same scope."] + #[bpaf(long("no-redeclare"), argument("on|off|warn"), optional, hide)] + #[serde(skip_serializing_if = "Option::is_none")] + pub no_redeclare: Option, #[doc = "Prevents from having redundant \"use strict\"."] #[bpaf( long("no-redundant-use-strict"), @@ -3304,6 +3163,10 @@ pub struct Suspicious { )] #[serde(skip_serializing_if = "Option::is_none")] pub no_redundant_use_strict: Option, + #[doc = "Disallow comparisons where both sides are exactly the same."] + #[bpaf(long("no-self-compare"), argument("on|off|warn"), optional, hide)] + #[serde(skip_serializing_if = "Option::is_none")] + pub no_self_compare: Option, #[doc = "Disallow identifiers from shadowing restricted names."] #[bpaf( long("no-shadow-restricted-names"), @@ -3330,6 +3193,10 @@ pub struct Suspicious { )] #[serde(skip_serializing_if = "Option::is_none")] pub use_default_switch_clause_last: 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")] + pub use_namespace_keyword: Option, #[doc = "This rule verifies the result of typeof $expr unary expressions is being compared to valid values, either string literals containing valid type names or other typeof expressions"] #[bpaf(long("use-valid-typeof"), argument("on|off|warn"), optional, hide)] #[serde(skip_serializing_if = "Option::is_none")] @@ -3337,15 +3204,20 @@ pub struct Suspicious { } impl Suspicious { const GROUP_NAME: &'static str = "suspicious"; - pub(crate) const GROUP_RULES: [&'static str; 22] = [ + pub(crate) const GROUP_RULES: [&'static str; 31] = [ "noArrayIndexKey", + "noAssignInExpressions", "noAsyncPromiseExecutor", "noCatchAssign", + "noClassAssign", "noCommentText", "noCompareNegZero", + "noConfusingLabels", "noConstEnum", "noDebugger", "noDoubleEquals", + "noDuplicateCase", + "noDuplicateClassMembers", "noDuplicateObjectKeys", "noDuplicateParameters", "noEmptyInterface", @@ -3354,22 +3226,31 @@ impl Suspicious { "noFunctionAssign", "noImportAssign", "noLabelVar", + "noPrototypeBuiltins", + "noRedeclare", "noRedundantUseStrict", + "noSelfCompare", "noShadowRestrictedNames", "noSparseArray", "noUnsafeNegation", "useDefaultSwitchClauseLast", + "useNamespaceKeyword", "useValidTypeof", ]; - const RECOMMENDED_RULES: [&'static str; 21] = [ + const RECOMMENDED_RULES: [&'static str; 30] = [ "noArrayIndexKey", + "noAssignInExpressions", "noAsyncPromiseExecutor", "noCatchAssign", + "noClassAssign", "noCommentText", "noCompareNegZero", + "noConfusingLabels", "noConstEnum", "noDebugger", "noDoubleEquals", + "noDuplicateCase", + "noDuplicateClassMembers", "noDuplicateObjectKeys", "noDuplicateParameters", "noEmptyInterface", @@ -3378,13 +3259,17 @@ impl Suspicious { "noFunctionAssign", "noImportAssign", "noLabelVar", + "noPrototypeBuiltins", + "noRedeclare", + "noSelfCompare", "noShadowRestrictedNames", "noSparseArray", "noUnsafeNegation", "useDefaultSwitchClauseLast", + "useNamespaceKeyword", "useValidTypeof", ]; - const RECOMMENDED_RULES_AS_FILTERS: [RuleFilter<'static>; 21] = [ + const RECOMMENDED_RULES_AS_FILTERS: [RuleFilter<'static>; 30] = [ 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]), @@ -3401,13 +3286,22 @@ impl Suspicious { 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]), 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[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>; 22] = [ + 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]), @@ -3430,6 +3324,15 @@ impl Suspicious { 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]), + 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]), ]; pub(crate) fn is_recommended(&self) -> bool { !matches!(self.recommended, Some(false)) } pub(crate) const fn is_not_recommended(&self) -> bool { @@ -3444,111 +3347,156 @@ impl Suspicious { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[0])); } } - if let Some(rule) = self.no_async_promise_executor.as_ref() { + if let Some(rule) = self.no_assign_in_expressions.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[1])); } } - if let Some(rule) = self.no_catch_assign.as_ref() { + if let Some(rule) = self.no_async_promise_executor.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[2])); } } - if let Some(rule) = self.no_comment_text.as_ref() { + if let Some(rule) = self.no_catch_assign.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[3])); } } - if let Some(rule) = self.no_compare_neg_zero.as_ref() { + if let Some(rule) = self.no_class_assign.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[4])); } } - if let Some(rule) = self.no_const_enum.as_ref() { + if let Some(rule) = self.no_comment_text.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[5])); } } - if let Some(rule) = self.no_debugger.as_ref() { + if let Some(rule) = self.no_compare_neg_zero.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[6])); } } - if let Some(rule) = self.no_double_equals.as_ref() { + if let Some(rule) = self.no_confusing_labels.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[7])); } } - if let Some(rule) = self.no_duplicate_object_keys.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[8])); } } - if let Some(rule) = self.no_duplicate_parameters.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[9])); } } - if let Some(rule) = self.no_empty_interface.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[10])); } } - if let Some(rule) = self.no_explicit_any.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[11])); } } - if let Some(rule) = self.no_extra_non_null_assertion.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[12])); } } - if let Some(rule) = self.no_function_assign.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[13])); } } - if let Some(rule) = self.no_import_assign.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[14])); } } - if let Some(rule) = self.no_label_var.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[15])); } } - if let Some(rule) = self.no_redundant_use_strict.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[16])); } } - if let Some(rule) = self.no_shadow_restricted_names.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[17])); } } - if let Some(rule) = self.no_sparse_array.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[18])); } } - if let Some(rule) = self.no_unsafe_negation.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[19])); } } - if let Some(rule) = self.use_default_switch_clause_last.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[20])); } } - if let Some(rule) = self.use_valid_typeof.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[21])); } } + if let Some(rule) = self.no_redeclare.as_ref() { + if rule.is_enabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[22])); + } + } + 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[23])); + } + } + 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[24])); + } + } + 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[25])); + } + } + 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[26])); + } + } + 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[27])); + } + } + 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[28])); + } + } + 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[29])); + } + } + 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[30])); + } + } index_set } pub(crate) fn get_disabled_rules(&self) -> IndexSet { @@ -3558,111 +3506,156 @@ impl Suspicious { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[0])); } } - if let Some(rule) = self.no_async_promise_executor.as_ref() { + if let Some(rule) = self.no_assign_in_expressions.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[1])); } } - if let Some(rule) = self.no_catch_assign.as_ref() { + if let Some(rule) = self.no_async_promise_executor.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[2])); } } - if let Some(rule) = self.no_comment_text.as_ref() { + if let Some(rule) = self.no_catch_assign.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[3])); } } - if let Some(rule) = self.no_compare_neg_zero.as_ref() { + if let Some(rule) = self.no_class_assign.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[4])); } } - if let Some(rule) = self.no_const_enum.as_ref() { + if let Some(rule) = self.no_comment_text.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[5])); } } - if let Some(rule) = self.no_debugger.as_ref() { + if let Some(rule) = self.no_compare_neg_zero.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[6])); } } - if let Some(rule) = self.no_double_equals.as_ref() { + if let Some(rule) = self.no_confusing_labels.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[7])); } } - if let Some(rule) = self.no_duplicate_object_keys.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[8])); } } - if let Some(rule) = self.no_duplicate_parameters.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[9])); } } - if let Some(rule) = self.no_empty_interface.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[10])); } } - if let Some(rule) = self.no_explicit_any.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[11])); } } - if let Some(rule) = self.no_extra_non_null_assertion.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[12])); } } - if let Some(rule) = self.no_function_assign.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[13])); } } - if let Some(rule) = self.no_import_assign.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[14])); } } - if let Some(rule) = self.no_label_var.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[15])); } } - if let Some(rule) = self.no_redundant_use_strict.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[16])); } } - if let Some(rule) = self.no_shadow_restricted_names.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[17])); } } - if let Some(rule) = self.no_sparse_array.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[18])); } } - if let Some(rule) = self.no_unsafe_negation.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[19])); } } - if let Some(rule) = self.use_default_switch_clause_last.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[20])); } } - if let Some(rule) = self.use_valid_typeof.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[21])); } } + if let Some(rule) = self.no_redeclare.as_ref() { + if rule.is_disabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[22])); + } + } + 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[23])); + } + } + 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[24])); + } + } + 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[25])); + } + } + 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[26])); + } + } + 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[27])); + } + } + 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[28])); + } + } + 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[29])); + } + } + 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[30])); + } + } index_set } #[doc = r" Checks if, given a rule name, matches one of the rules contained in this category"] @@ -3671,10 +3664,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>; 21] { + pub(crate) fn recommended_rules_as_filters() -> [RuleFilter<'static>; 30] { Self::RECOMMENDED_RULES_AS_FILTERS } - pub(crate) fn all_rules_as_filters() -> [RuleFilter<'static>; 22] { Self::ALL_RULES_AS_FILTERS } + pub(crate) fn all_rules_as_filters() -> [RuleFilter<'static>; 31] { Self::ALL_RULES_AS_FILTERS } #[doc = r" Select preset rules"] pub(crate) fn collect_preset_rules( &self, @@ -3695,13 +3688,18 @@ impl Suspicious { pub(crate) fn get_rule_configuration(&self, rule_name: &str) -> Option<&RuleConfiguration> { match rule_name { "noArrayIndexKey" => self.no_array_index_key.as_ref(), + "noAssignInExpressions" => self.no_assign_in_expressions.as_ref(), "noAsyncPromiseExecutor" => self.no_async_promise_executor.as_ref(), "noCatchAssign" => self.no_catch_assign.as_ref(), + "noClassAssign" => self.no_class_assign.as_ref(), "noCommentText" => self.no_comment_text.as_ref(), "noCompareNegZero" => self.no_compare_neg_zero.as_ref(), + "noConfusingLabels" => self.no_confusing_labels.as_ref(), "noConstEnum" => self.no_const_enum.as_ref(), "noDebugger" => self.no_debugger.as_ref(), "noDoubleEquals" => self.no_double_equals.as_ref(), + "noDuplicateCase" => self.no_duplicate_case.as_ref(), + "noDuplicateClassMembers" => self.no_duplicate_class_members.as_ref(), "noDuplicateObjectKeys" => self.no_duplicate_object_keys.as_ref(), "noDuplicateParameters" => self.no_duplicate_parameters.as_ref(), "noEmptyInterface" => self.no_empty_interface.as_ref(), @@ -3710,11 +3708,15 @@ impl Suspicious { "noFunctionAssign" => self.no_function_assign.as_ref(), "noImportAssign" => self.no_import_assign.as_ref(), "noLabelVar" => self.no_label_var.as_ref(), + "noPrototypeBuiltins" => self.no_prototype_builtins.as_ref(), + "noRedeclare" => self.no_redeclare.as_ref(), "noRedundantUseStrict" => self.no_redundant_use_strict.as_ref(), + "noSelfCompare" => self.no_self_compare.as_ref(), "noShadowRestrictedNames" => self.no_shadow_restricted_names.as_ref(), "noSparseArray" => self.no_sparse_array.as_ref(), "noUnsafeNegation" => self.no_unsafe_negation.as_ref(), "useDefaultSwitchClauseLast" => self.use_default_switch_clause_last.as_ref(), + "useNamespaceKeyword" => self.use_namespace_keyword.as_ref(), "useValidTypeof" => self.use_valid_typeof.as_ref(), _ => None, } diff --git a/crates/rome_service/src/configuration/parse/json/rules.rs b/crates/rome_service/src/configuration/parse/json/rules.rs index ebbccb7ad4f..a06ad34c77c 100644 --- a/crates/rome_service/src/configuration/parse/json/rules.rs +++ b/crates/rome_service/src/configuration/parse/json/rules.rs @@ -124,14 +124,22 @@ impl VisitNode for A11y { "noBlankTarget", "noDistractingElements", "noHeaderScope", + "noNoninteractiveElementToInteractiveRole", "noPositiveTabindex", + "noRedundantAlt", + "noSvgWithoutTitle", "useAltText", "useAnchorContent", + "useAriaPropsForRole", "useButtonType", "useHtmlLang", + "useIframeTitle", "useKeyWithClickEvents", "useKeyWithMouseEvents", + "useMediaCaption", "useValidAnchor", + "useValidAriaProps", + "useValidLang", ], diagnostics, ) @@ -241,6 +249,24 @@ impl VisitNode for A11y { )); } }, + "noNoninteractiveElementToInteractiveRole" => match value { + AnyJsonValue::JsonStringValue(_) => { + let mut configuration = RuleConfiguration::default(); + self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; + self.no_noninteractive_element_to_interactive_role = Some(configuration); + } + AnyJsonValue::JsonObjectValue(_) => { + let mut configuration = RuleConfiguration::default(); + self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; + self.no_noninteractive_element_to_interactive_role = Some(configuration); + } + _ => { + diagnostics.push(DeserializationDiagnostic::new_incorrect_type( + "object or string", + value.range(), + )); + } + }, "noPositiveTabindex" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); @@ -259,16 +285,16 @@ impl VisitNode for A11y { )); } }, - "useAltText" => match value { + "noRedundantAlt" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.use_alt_text = Some(configuration); + self.no_redundant_alt = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.use_alt_text = Some(configuration); + self.no_redundant_alt = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -277,16 +303,16 @@ impl VisitNode for A11y { )); } }, - "useAnchorContent" => match value { + "noSvgWithoutTitle" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.use_anchor_content = Some(configuration); + self.no_svg_without_title = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.use_anchor_content = Some(configuration); + self.no_svg_without_title = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -295,16 +321,16 @@ impl VisitNode for A11y { )); } }, - "useButtonType" => match value { + "useAltText" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.use_button_type = Some(configuration); + self.use_alt_text = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.use_button_type = Some(configuration); + self.use_alt_text = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -313,16 +339,16 @@ impl VisitNode for A11y { )); } }, - "useHtmlLang" => match value { + "useAnchorContent" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.use_html_lang = Some(configuration); + self.use_anchor_content = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.use_html_lang = Some(configuration); + self.use_anchor_content = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -331,16 +357,16 @@ impl VisitNode for A11y { )); } }, - "useKeyWithClickEvents" => match value { + "useAriaPropsForRole" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.use_key_with_click_events = Some(configuration); + self.use_aria_props_for_role = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.use_key_with_click_events = Some(configuration); + self.use_aria_props_for_role = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -349,16 +375,16 @@ impl VisitNode for A11y { )); } }, - "useKeyWithMouseEvents" => match value { + "useButtonType" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.use_key_with_mouse_events = Some(configuration); + self.use_button_type = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.use_key_with_mouse_events = Some(configuration); + self.use_button_type = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -367,16 +393,16 @@ impl VisitNode for A11y { )); } }, - "useValidAnchor" => match value { + "useHtmlLang" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.use_valid_anchor = Some(configuration); + self.use_html_lang = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.use_valid_anchor = Some(configuration); + self.use_html_lang = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -385,58 +411,16 @@ impl VisitNode for A11y { )); } }, - _ => {} - } - Some(()) - } -} -impl VisitJsonNode for Complexity {} -impl VisitNode for Complexity { - fn visit_member_name( - &mut self, - node: &SyntaxNode, - diagnostics: &mut Vec, - ) -> Option<()> { - has_only_known_keys( - node, - &[ - "recommended", - "all", - "noExtraBooleanCast", - "noMultipleSpacesInRegularExpressionLiterals", - "noUselessFragments", - "useFlatMap", - "useOptionalChain", - "useSimplifiedLogicExpression", - ], - diagnostics, - ) - } - fn visit_map( - &mut self, - key: &SyntaxNode, - value: &SyntaxNode, - diagnostics: &mut Vec, - ) -> Option<()> { - let (name, value) = self.get_key_and_value(key, value, diagnostics)?; - let name_text = name.text(); - match name_text { - "recommended" => { - self.recommended = Some(self.map_to_boolean(&value, name_text, diagnostics)?); - } - "all" => { - self.all = Some(self.map_to_boolean(&value, name_text, diagnostics)?); - } - "noExtraBooleanCast" => match value { + "useIframeTitle" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_extra_boolean_cast = Some(configuration); + self.use_iframe_title = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_extra_boolean_cast = Some(configuration); + self.use_iframe_title = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -445,16 +429,16 @@ impl VisitNode for Complexity { )); } }, - "noMultipleSpacesInRegularExpressionLiterals" => match value { + "useKeyWithClickEvents" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_multiple_spaces_in_regular_expression_literals = Some(configuration); + self.use_key_with_click_events = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_multiple_spaces_in_regular_expression_literals = Some(configuration); + self.use_key_with_click_events = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -463,16 +447,16 @@ impl VisitNode for Complexity { )); } }, - "noUselessFragments" => match value { + "useKeyWithMouseEvents" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_useless_fragments = Some(configuration); + self.use_key_with_mouse_events = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_useless_fragments = Some(configuration); + self.use_key_with_mouse_events = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -481,16 +465,16 @@ impl VisitNode for Complexity { )); } }, - "useFlatMap" => match value { + "useMediaCaption" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.use_flat_map = Some(configuration); + self.use_media_caption = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.use_flat_map = Some(configuration); + self.use_media_caption = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -499,16 +483,16 @@ impl VisitNode for Complexity { )); } }, - "useOptionalChain" => match value { + "useValidAnchor" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.use_optional_chain = Some(configuration); + self.use_valid_anchor = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.use_optional_chain = Some(configuration); + self.use_valid_anchor = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -517,16 +501,34 @@ impl VisitNode for Complexity { )); } }, - "useSimplifiedLogicExpression" => match value { + "useValidAriaProps" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.use_simplified_logic_expression = Some(configuration); + self.use_valid_aria_props = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.use_simplified_logic_expression = Some(configuration); + self.use_valid_aria_props = Some(configuration); + } + _ => { + diagnostics.push(DeserializationDiagnostic::new_incorrect_type( + "object or string", + value.range(), + )); + } + }, + "useValidLang" => match value { + AnyJsonValue::JsonStringValue(_) => { + let mut configuration = RuleConfiguration::default(); + self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; + self.use_valid_lang = Some(configuration); + } + AnyJsonValue::JsonObjectValue(_) => { + let mut configuration = RuleConfiguration::default(); + self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; + self.use_valid_lang = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -540,8 +542,8 @@ impl VisitNode for Complexity { Some(()) } } -impl VisitJsonNode for Correctness {} -impl VisitNode for Correctness { +impl VisitJsonNode for Complexity {} +impl VisitNode for Complexity { fn visit_member_name( &mut self, node: &SyntaxNode, @@ -552,23 +554,19 @@ impl VisitNode for Correctness { &[ "recommended", "all", - "noChildrenProp", - "noConstAssign", - "noConstructorReturn", - "noEmptyPattern", - "noNewSymbol", - "noPrecisionLoss", - "noRenderReturnValue", - "noSetterReturn", - "noStringCaseMismatch", - "noUndeclaredVariables", - "noUnnecessaryContinue", - "noUnreachable", - "noUnsafeFinally", - "noUnusedVariables", - "noVoidElementsWithChildren", - "noVoidTypeReturn", - "useValidForDirection", + "noExtraBooleanCast", + "noExtraSemicolon", + "noMultipleSpacesInRegularExpressionLiterals", + "noUselessCatch", + "noUselessConstructor", + "noUselessFragments", + "noUselessLabel", + "noUselessRename", + "noUselessSwitchCase", + "noWith", + "useFlatMap", + "useOptionalChain", + "useSimplifiedLogicExpression", ], diagnostics, ) @@ -588,16 +586,16 @@ impl VisitNode for Correctness { "all" => { self.all = Some(self.map_to_boolean(&value, name_text, diagnostics)?); } - "noChildrenProp" => match value { + "noExtraBooleanCast" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_children_prop = Some(configuration); + self.no_extra_boolean_cast = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_children_prop = Some(configuration); + self.no_extra_boolean_cast = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -606,16 +604,16 @@ impl VisitNode for Correctness { )); } }, - "noConstAssign" => match value { + "noExtraSemicolon" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_const_assign = Some(configuration); + self.no_extra_semicolon = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_const_assign = Some(configuration); + self.no_extra_semicolon = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -624,16 +622,16 @@ impl VisitNode for Correctness { )); } }, - "noConstructorReturn" => match value { + "noMultipleSpacesInRegularExpressionLiterals" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_constructor_return = Some(configuration); + self.no_multiple_spaces_in_regular_expression_literals = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_constructor_return = Some(configuration); + self.no_multiple_spaces_in_regular_expression_literals = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -642,16 +640,16 @@ impl VisitNode for Correctness { )); } }, - "noEmptyPattern" => match value { + "noUselessCatch" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_empty_pattern = Some(configuration); + self.no_useless_catch = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_empty_pattern = Some(configuration); + self.no_useless_catch = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -660,16 +658,16 @@ impl VisitNode for Correctness { )); } }, - "noNewSymbol" => match value { + "noUselessConstructor" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_new_symbol = Some(configuration); + self.no_useless_constructor = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_new_symbol = Some(configuration); + self.no_useless_constructor = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -678,16 +676,16 @@ impl VisitNode for Correctness { )); } }, - "noPrecisionLoss" => match value { + "noUselessFragments" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_precision_loss = Some(configuration); + self.no_useless_fragments = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_precision_loss = Some(configuration); + self.no_useless_fragments = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -696,16 +694,16 @@ impl VisitNode for Correctness { )); } }, - "noRenderReturnValue" => match value { + "noUselessLabel" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_render_return_value = Some(configuration); + self.no_useless_label = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_render_return_value = Some(configuration); + self.no_useless_label = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -714,16 +712,16 @@ impl VisitNode for Correctness { )); } }, - "noSetterReturn" => match value { + "noUselessRename" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_setter_return = Some(configuration); + self.no_useless_rename = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_setter_return = Some(configuration); + self.no_useless_rename = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -732,16 +730,16 @@ impl VisitNode for Correctness { )); } }, - "noStringCaseMismatch" => match value { + "noUselessSwitchCase" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_string_case_mismatch = Some(configuration); + self.no_useless_switch_case = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_string_case_mismatch = Some(configuration); + self.no_useless_switch_case = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -750,16 +748,16 @@ impl VisitNode for Correctness { )); } }, - "noUndeclaredVariables" => match value { + "noWith" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_undeclared_variables = Some(configuration); + self.no_with = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_undeclared_variables = Some(configuration); + self.no_with = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -768,16 +766,16 @@ impl VisitNode for Correctness { )); } }, - "noUnnecessaryContinue" => match value { + "useFlatMap" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_unnecessary_continue = Some(configuration); + self.use_flat_map = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_unnecessary_continue = Some(configuration); + self.use_flat_map = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -786,88 +784,16 @@ impl VisitNode for Correctness { )); } }, - "noUnreachable" => match value { - AnyJsonValue::JsonStringValue(_) => { - let mut configuration = RuleConfiguration::default(); - self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_unreachable = Some(configuration); - } - AnyJsonValue::JsonObjectValue(_) => { - let mut configuration = RuleConfiguration::default(); - self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_unreachable = Some(configuration); - } - _ => { - diagnostics.push(DeserializationDiagnostic::new_incorrect_type( - "object or string", - value.range(), - )); - } - }, - "noUnsafeFinally" => match value { - AnyJsonValue::JsonStringValue(_) => { - let mut configuration = RuleConfiguration::default(); - self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_unsafe_finally = Some(configuration); - } - AnyJsonValue::JsonObjectValue(_) => { - let mut configuration = RuleConfiguration::default(); - self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_unsafe_finally = Some(configuration); - } - _ => { - diagnostics.push(DeserializationDiagnostic::new_incorrect_type( - "object or string", - value.range(), - )); - } - }, - "noUnusedVariables" => match value { - AnyJsonValue::JsonStringValue(_) => { - let mut configuration = RuleConfiguration::default(); - self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_unused_variables = Some(configuration); - } - AnyJsonValue::JsonObjectValue(_) => { - let mut configuration = RuleConfiguration::default(); - self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_unused_variables = Some(configuration); - } - _ => { - diagnostics.push(DeserializationDiagnostic::new_incorrect_type( - "object or string", - value.range(), - )); - } - }, - "noVoidElementsWithChildren" => match value { - AnyJsonValue::JsonStringValue(_) => { - let mut configuration = RuleConfiguration::default(); - self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_void_elements_with_children = Some(configuration); - } - AnyJsonValue::JsonObjectValue(_) => { - let mut configuration = RuleConfiguration::default(); - self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_void_elements_with_children = Some(configuration); - } - _ => { - diagnostics.push(DeserializationDiagnostic::new_incorrect_type( - "object or string", - value.range(), - )); - } - }, - "noVoidTypeReturn" => match value { + "useOptionalChain" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_void_type_return = Some(configuration); + self.use_optional_chain = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_void_type_return = Some(configuration); + self.use_optional_chain = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -876,16 +802,16 @@ impl VisitNode for Correctness { )); } }, - "useValidForDirection" => match value { + "useSimplifiedLogicExpression" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.use_valid_for_direction = Some(configuration); + self.use_simplified_logic_expression = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.use_valid_for_direction = Some(configuration); + self.use_simplified_logic_expression = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -899,8 +825,8 @@ impl VisitNode for Correctness { Some(()) } } -impl VisitJsonNode for Nursery {} -impl VisitNode for Nursery { +impl VisitJsonNode for Correctness {} +impl VisitNode for Correctness { fn visit_member_name( &mut self, node: &SyntaxNode, @@ -911,63 +837,30 @@ impl VisitNode for Nursery { &[ "recommended", "all", - "noAccumulatingSpread", - "noAriaUnsupportedElements", - "noAssignInExpressions", - "noBannedTypes", - "noClassAssign", - "noCommaOperator", - "noConfusingArrow", - "noConfusingLabels", - "noConsoleLog", - "noConstantCondition", - "noDuplicateCase", - "noDuplicateClassMembers", - "noDuplicateJsxProps", - "noExtraLabels", - "noExtraSemicolons", - "noForEach", + "noChildrenProp", + "noConstAssign", + "noConstructorReturn", + "noEmptyPattern", "noGlobalObjectCalls", - "noInferrableTypes", "noInnerDeclarations", "noInvalidConstructorSuper", - "noNamespace", - "noNoninteractiveElementToInteractiveRole", - "noNoninteractiveTabindex", - "noParameterAssign", - "noParameterProperties", - "noPrototypeBuiltins", - "noRedeclare", - "noRedundantAlt", - "noRedundantRoles", - "noRestrictedGlobals", - "noSelfAssign", - "noSelfCompare", - "noSvgWithoutTitle", + "noNewSymbol", + "noPrecisionLoss", + "noRenderReturnValue", + "noSetterReturn", + "noStringCaseMismatch", "noSwitchDeclarations", + "noUndeclaredVariables", + "noUnnecessaryContinue", + "noUnreachable", "noUnreachableSuper", + "noUnsafeFinally", "noUnsafeOptionalChaining", "noUnusedLabels", - "noUselessCatch", - "noUselessConstructor", - "noUselessRename", - "noUselessSwitchCase", - "noWith", - "useAriaPropTypes", - "useAriaPropsForRole", - "useCamelCase", - "useExhaustiveDependencies", - "useGroupedTypeImport", - "useHeadingContent", - "useHookAtTopLevel", - "useIframeTitle", - "useIsNan", - "useLiteralEnumMembers", - "useLiteralKeys", - "useMediaCaption", - "useNamespaceKeyword", - "useValidAriaProps", - "useValidLang", + "noUnusedVariables", + "noVoidElementsWithChildren", + "noVoidTypeReturn", + "useValidForDirection", "useYield", ], diagnostics, @@ -988,16 +881,16 @@ impl VisitNode for Nursery { "all" => { self.all = Some(self.map_to_boolean(&value, name_text, diagnostics)?); } - "noAccumulatingSpread" => match value { + "noChildrenProp" => 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); + self.no_children_prop = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_accumulating_spread = Some(configuration); + self.no_children_prop = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1006,16 +899,16 @@ impl VisitNode for Nursery { )); } }, - "noAriaUnsupportedElements" => match value { + "noConstAssign" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_aria_unsupported_elements = Some(configuration); + self.no_const_assign = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_aria_unsupported_elements = Some(configuration); + self.no_const_assign = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1024,16 +917,16 @@ impl VisitNode for Nursery { )); } }, - "noAssignInExpressions" => match value { + "noConstructorReturn" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_assign_in_expressions = Some(configuration); + self.no_constructor_return = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_assign_in_expressions = Some(configuration); + self.no_constructor_return = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1042,16 +935,16 @@ impl VisitNode for Nursery { )); } }, - "noBannedTypes" => match value { + "noEmptyPattern" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_banned_types = Some(configuration); + self.no_empty_pattern = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_banned_types = Some(configuration); + self.no_empty_pattern = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1060,16 +953,16 @@ impl VisitNode for Nursery { )); } }, - "noClassAssign" => match value { + "noGlobalObjectCalls" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_class_assign = Some(configuration); + self.no_global_object_calls = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_class_assign = Some(configuration); + self.no_global_object_calls = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1078,16 +971,16 @@ impl VisitNode for Nursery { )); } }, - "noCommaOperator" => match value { + "noInnerDeclarations" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_comma_operator = Some(configuration); + self.no_inner_declarations = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_comma_operator = Some(configuration); + self.no_inner_declarations = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1096,16 +989,16 @@ impl VisitNode for Nursery { )); } }, - "noConfusingArrow" => match value { + "noInvalidConstructorSuper" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_confusing_arrow = Some(configuration); + self.no_invalid_constructor_super = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_confusing_arrow = Some(configuration); + self.no_invalid_constructor_super = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1114,16 +1007,16 @@ impl VisitNode for Nursery { )); } }, - "noConfusingLabels" => match value { + "noNewSymbol" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_confusing_labels = Some(configuration); + self.no_new_symbol = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_confusing_labels = Some(configuration); + self.no_new_symbol = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1132,16 +1025,16 @@ impl VisitNode for Nursery { )); } }, - "noConsoleLog" => match value { + "noPrecisionLoss" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_console_log = Some(configuration); + self.no_precision_loss = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_console_log = Some(configuration); + self.no_precision_loss = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1150,16 +1043,16 @@ impl VisitNode for Nursery { )); } }, - "noConstantCondition" => match value { + "noRenderReturnValue" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_constant_condition = Some(configuration); + self.no_render_return_value = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_constant_condition = Some(configuration); + self.no_render_return_value = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1168,16 +1061,16 @@ impl VisitNode for Nursery { )); } }, - "noDuplicateCase" => match value { + "noSetterReturn" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_duplicate_case = Some(configuration); + self.no_setter_return = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_duplicate_case = Some(configuration); + self.no_setter_return = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1186,16 +1079,16 @@ impl VisitNode for Nursery { )); } }, - "noDuplicateClassMembers" => match value { + "noStringCaseMismatch" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_duplicate_class_members = Some(configuration); + self.no_string_case_mismatch = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_duplicate_class_members = Some(configuration); + self.no_string_case_mismatch = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1204,16 +1097,16 @@ impl VisitNode for Nursery { )); } }, - "noDuplicateJsxProps" => match value { + "noSwitchDeclarations" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_duplicate_jsx_props = Some(configuration); + self.no_switch_declarations = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_duplicate_jsx_props = Some(configuration); + self.no_switch_declarations = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1222,16 +1115,16 @@ impl VisitNode for Nursery { )); } }, - "noExtraLabels" => match value { + "noUndeclaredVariables" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_extra_labels = Some(configuration); + self.no_undeclared_variables = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_extra_labels = Some(configuration); + self.no_undeclared_variables = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1240,16 +1133,16 @@ impl VisitNode for Nursery { )); } }, - "noExtraSemicolons" => match value { + "noUnnecessaryContinue" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_extra_semicolons = Some(configuration); + self.no_unnecessary_continue = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_extra_semicolons = Some(configuration); + self.no_unnecessary_continue = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1258,16 +1151,16 @@ impl VisitNode for Nursery { )); } }, - "noForEach" => match value { + "noUnreachable" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_for_each = Some(configuration); + self.no_unreachable = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_for_each = Some(configuration); + self.no_unreachable = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1276,16 +1169,16 @@ impl VisitNode for Nursery { )); } }, - "noGlobalObjectCalls" => match value { + "noUnreachableSuper" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_global_object_calls = Some(configuration); + self.no_unreachable_super = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_global_object_calls = Some(configuration); + self.no_unreachable_super = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1294,16 +1187,16 @@ impl VisitNode for Nursery { )); } }, - "noInferrableTypes" => match value { + "noUnsafeFinally" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_inferrable_types = Some(configuration); + self.no_unsafe_finally = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_inferrable_types = Some(configuration); + self.no_unsafe_finally = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1312,16 +1205,16 @@ impl VisitNode for Nursery { )); } }, - "noInnerDeclarations" => match value { + "noUnsafeOptionalChaining" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_inner_declarations = Some(configuration); + self.no_unsafe_optional_chaining = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_inner_declarations = Some(configuration); + self.no_unsafe_optional_chaining = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1330,16 +1223,16 @@ impl VisitNode for Nursery { )); } }, - "noInvalidConstructorSuper" => match value { + "noUnusedLabels" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_invalid_constructor_super = Some(configuration); + self.no_unused_labels = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_invalid_constructor_super = Some(configuration); + self.no_unused_labels = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1348,16 +1241,16 @@ impl VisitNode for Nursery { )); } }, - "noNamespace" => match value { + "noUnusedVariables" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_namespace = Some(configuration); + self.no_unused_variables = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_namespace = Some(configuration); + self.no_unused_variables = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1366,16 +1259,16 @@ impl VisitNode for Nursery { )); } }, - "noNoninteractiveElementToInteractiveRole" => match value { + "noVoidElementsWithChildren" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_noninteractive_element_to_interactive_role = Some(configuration); + self.no_void_elements_with_children = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_noninteractive_element_to_interactive_role = Some(configuration); + self.no_void_elements_with_children = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1384,16 +1277,16 @@ impl VisitNode for Nursery { )); } }, - "noNoninteractiveTabindex" => match value { + "noVoidTypeReturn" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_noninteractive_tabindex = Some(configuration); + self.no_void_type_return = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_noninteractive_tabindex = Some(configuration); + self.no_void_type_return = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1402,16 +1295,16 @@ impl VisitNode for Nursery { )); } }, - "noParameterAssign" => match value { + "useValidForDirection" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_parameter_assign = Some(configuration); + self.use_valid_for_direction = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_parameter_assign = Some(configuration); + self.use_valid_for_direction = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1420,16 +1313,16 @@ impl VisitNode for Nursery { )); } }, - "noParameterProperties" => match value { + "useYield" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_parameter_properties = Some(configuration); + self.use_yield = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_parameter_properties = Some(configuration); + self.use_yield = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1438,16 +1331,72 @@ impl VisitNode for Nursery { )); } }, - "noPrototypeBuiltins" => match value { + _ => {} + } + Some(()) + } +} +impl VisitJsonNode for Nursery {} +impl VisitNode for Nursery { + fn visit_member_name( + &mut self, + node: &SyntaxNode, + diagnostics: &mut Vec, + ) -> Option<()> { + has_only_known_keys( + node, + &[ + "recommended", + "all", + "noAccumulatingSpread", + "noAriaUnsupportedElements", + "noBannedTypes", + "noConfusingArrow", + "noConsoleLog", + "noConstantCondition", + "noDuplicateJsxProps", + "noForEach", + "noNoninteractiveTabindex", + "noRedundantRoles", + "noSelfAssign", + "useAriaPropTypes", + "useCamelCase", + "useExhaustiveDependencies", + "useGroupedTypeImport", + "useHeadingContent", + "useHookAtTopLevel", + "useIsNan", + "useLiteralEnumMembers", + "useLiteralKeys", + ], + diagnostics, + ) + } + fn visit_map( + &mut self, + key: &SyntaxNode, + value: &SyntaxNode, + diagnostics: &mut Vec, + ) -> Option<()> { + let (name, value) = self.get_key_and_value(key, value, diagnostics)?; + let name_text = name.text(); + match name_text { + "recommended" => { + self.recommended = Some(self.map_to_boolean(&value, name_text, diagnostics)?); + } + "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_prototype_builtins = Some(configuration); + self.no_accumulating_spread = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_prototype_builtins = Some(configuration); + self.no_accumulating_spread = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1456,16 +1405,16 @@ impl VisitNode for Nursery { )); } }, - "noRedeclare" => match value { + "noAriaUnsupportedElements" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_redeclare = Some(configuration); + self.no_aria_unsupported_elements = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_redeclare = Some(configuration); + self.no_aria_unsupported_elements = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1474,16 +1423,16 @@ impl VisitNode for Nursery { )); } }, - "noRedundantAlt" => match value { + "noBannedTypes" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_redundant_alt = Some(configuration); + self.no_banned_types = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_redundant_alt = Some(configuration); + self.no_banned_types = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1492,16 +1441,16 @@ impl VisitNode for Nursery { )); } }, - "noRedundantRoles" => match value { + "noConfusingArrow" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_redundant_roles = Some(configuration); + self.no_confusing_arrow = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_redundant_roles = Some(configuration); + self.no_confusing_arrow = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1510,16 +1459,16 @@ impl VisitNode for Nursery { )); } }, - "noRestrictedGlobals" => match value { + "noConsoleLog" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_restricted_globals = Some(configuration); + self.no_console_log = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_restricted_globals = Some(configuration); + self.no_console_log = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1528,16 +1477,16 @@ impl VisitNode for Nursery { )); } }, - "noSelfAssign" => match value { + "noConstantCondition" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_self_assign = Some(configuration); + self.no_constant_condition = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_self_assign = Some(configuration); + self.no_constant_condition = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1546,16 +1495,16 @@ impl VisitNode for Nursery { )); } }, - "noSelfCompare" => match value { + "noDuplicateJsxProps" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_self_compare = Some(configuration); + self.no_duplicate_jsx_props = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_self_compare = Some(configuration); + self.no_duplicate_jsx_props = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1564,16 +1513,16 @@ impl VisitNode for Nursery { )); } }, - "noSvgWithoutTitle" => match value { + "noForEach" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_svg_without_title = Some(configuration); + self.no_for_each = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_svg_without_title = Some(configuration); + self.no_for_each = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1582,16 +1531,16 @@ impl VisitNode for Nursery { )); } }, - "noSwitchDeclarations" => match value { + "noNoninteractiveTabindex" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_switch_declarations = Some(configuration); + self.no_noninteractive_tabindex = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_switch_declarations = Some(configuration); + self.no_noninteractive_tabindex = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1600,16 +1549,16 @@ impl VisitNode for Nursery { )); } }, - "noUnreachableSuper" => match value { + "noRedundantRoles" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_unreachable_super = Some(configuration); + self.no_redundant_roles = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_unreachable_super = Some(configuration); + self.no_redundant_roles = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1618,16 +1567,16 @@ impl VisitNode for Nursery { )); } }, - "noUnsafeOptionalChaining" => match value { + "noSelfAssign" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_unsafe_optional_chaining = Some(configuration); + self.no_self_assign = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_unsafe_optional_chaining = Some(configuration); + self.no_self_assign = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1636,16 +1585,16 @@ impl VisitNode for Nursery { )); } }, - "noUnusedLabels" => match value { + "useAriaPropTypes" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_unused_labels = Some(configuration); + self.use_aria_prop_types = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_unused_labels = Some(configuration); + self.use_aria_prop_types = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1654,16 +1603,16 @@ impl VisitNode for Nursery { )); } }, - "noUselessCatch" => match value { + "useCamelCase" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_useless_catch = Some(configuration); + self.use_camel_case = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_useless_catch = Some(configuration); + self.use_camel_case = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1672,16 +1621,16 @@ impl VisitNode for Nursery { )); } }, - "noUselessConstructor" => match value { + "useExhaustiveDependencies" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_useless_constructor = Some(configuration); + self.use_exhaustive_dependencies = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_useless_constructor = Some(configuration); + self.use_exhaustive_dependencies = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1690,16 +1639,16 @@ impl VisitNode for Nursery { )); } }, - "noUselessRename" => match value { + "useGroupedTypeImport" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_useless_rename = Some(configuration); + self.use_grouped_type_import = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_useless_rename = Some(configuration); + self.use_grouped_type_import = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1708,16 +1657,16 @@ impl VisitNode for Nursery { )); } }, - "noUselessSwitchCase" => match value { + "useHeadingContent" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_useless_switch_case = Some(configuration); + self.use_heading_content = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_useless_switch_case = Some(configuration); + self.use_heading_content = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1726,16 +1675,16 @@ impl VisitNode for Nursery { )); } }, - "noWith" => match value { + "useHookAtTopLevel" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_with = Some(configuration); + self.use_hook_at_top_level = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_with = Some(configuration); + self.use_hook_at_top_level = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1744,16 +1693,16 @@ impl VisitNode for Nursery { )); } }, - "useAriaPropTypes" => match value { + "useIsNan" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.use_aria_prop_types = Some(configuration); + self.use_is_nan = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.use_aria_prop_types = Some(configuration); + self.use_is_nan = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1762,16 +1711,16 @@ impl VisitNode for Nursery { )); } }, - "useAriaPropsForRole" => match value { + "useLiteralEnumMembers" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.use_aria_props_for_role = Some(configuration); + self.use_literal_enum_members = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.use_aria_props_for_role = Some(configuration); + self.use_literal_enum_members = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1780,16 +1729,16 @@ impl VisitNode for Nursery { )); } }, - "useCamelCase" => match value { + "useLiteralKeys" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.use_camel_case = Some(configuration); + self.use_literal_keys = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.use_camel_case = Some(configuration); + self.use_literal_keys = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1798,16 +1747,45 @@ impl VisitNode for Nursery { )); } }, - "useExhaustiveDependencies" => match value { + _ => {} + } + Some(()) + } +} +impl VisitJsonNode for Performance {} +impl VisitNode for Performance { + fn visit_member_name( + &mut self, + node: &SyntaxNode, + diagnostics: &mut Vec, + ) -> Option<()> { + has_only_known_keys(node, &["recommended", "all", "noDelete"], diagnostics) + } + fn visit_map( + &mut self, + key: &SyntaxNode, + value: &SyntaxNode, + diagnostics: &mut Vec, + ) -> Option<()> { + let (name, value) = self.get_key_and_value(key, value, diagnostics)?; + let name_text = name.text(); + match name_text { + "recommended" => { + self.recommended = Some(self.map_to_boolean(&value, name_text, diagnostics)?); + } + "all" => { + self.all = Some(self.map_to_boolean(&value, name_text, diagnostics)?); + } + "noDelete" => 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); + self.no_delete = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.use_exhaustive_dependencies = Some(configuration); + self.no_delete = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1816,142 +1794,54 @@ impl VisitNode for Nursery { )); } }, - "useGroupedTypeImport" => match value { - AnyJsonValue::JsonStringValue(_) => { - let mut configuration = RuleConfiguration::default(); - self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.use_grouped_type_import = Some(configuration); - } - AnyJsonValue::JsonObjectValue(_) => { - let mut configuration = RuleConfiguration::default(); - self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.use_grouped_type_import = Some(configuration); - } - _ => { - diagnostics.push(DeserializationDiagnostic::new_incorrect_type( - "object or string", - value.range(), - )); - } - }, - "useHeadingContent" => match value { - AnyJsonValue::JsonStringValue(_) => { - let mut configuration = RuleConfiguration::default(); - self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.use_heading_content = Some(configuration); - } - AnyJsonValue::JsonObjectValue(_) => { - let mut configuration = RuleConfiguration::default(); - self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.use_heading_content = Some(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 configuration = RuleConfiguration::default(); - self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.use_hook_at_top_level = Some(configuration); - } - _ => { - diagnostics.push(DeserializationDiagnostic::new_incorrect_type( - "object or string", - value.range(), - )); - } - }, - "useIframeTitle" => match value { - AnyJsonValue::JsonStringValue(_) => { - let mut configuration = RuleConfiguration::default(); - self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.use_iframe_title = Some(configuration); - } - AnyJsonValue::JsonObjectValue(_) => { - let mut configuration = RuleConfiguration::default(); - self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.use_iframe_title = Some(configuration); - } - _ => { - diagnostics.push(DeserializationDiagnostic::new_incorrect_type( - "object or string", - value.range(), - )); - } - }, - "useIsNan" => match value { - AnyJsonValue::JsonStringValue(_) => { - let mut configuration = RuleConfiguration::default(); - self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.use_is_nan = Some(configuration); - } - AnyJsonValue::JsonObjectValue(_) => { - let mut configuration = RuleConfiguration::default(); - self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.use_is_nan = Some(configuration); - } - _ => { - diagnostics.push(DeserializationDiagnostic::new_incorrect_type( - "object or string", - value.range(), - )); - } - }, - "useLiteralEnumMembers" => match value { - AnyJsonValue::JsonStringValue(_) => { - let mut configuration = RuleConfiguration::default(); - self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.use_literal_enum_members = Some(configuration); - } - AnyJsonValue::JsonObjectValue(_) => { - let mut configuration = RuleConfiguration::default(); - self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.use_literal_enum_members = Some(configuration); - } - _ => { - diagnostics.push(DeserializationDiagnostic::new_incorrect_type( - "object or string", - value.range(), - )); - } - }, - "useLiteralKeys" => match value { - AnyJsonValue::JsonStringValue(_) => { - let mut configuration = RuleConfiguration::default(); - self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.use_literal_keys = Some(configuration); - } - AnyJsonValue::JsonObjectValue(_) => { - let mut configuration = RuleConfiguration::default(); - self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.use_literal_keys = Some(configuration); - } - _ => { - diagnostics.push(DeserializationDiagnostic::new_incorrect_type( - "object or string", - value.range(), - )); - } - }, - "useMediaCaption" => match value { + _ => {} + } + Some(()) + } +} +impl VisitJsonNode for Security {} +impl VisitNode for Security { + fn visit_member_name( + &mut self, + node: &SyntaxNode, + diagnostics: &mut Vec, + ) -> Option<()> { + has_only_known_keys( + node, + &[ + "recommended", + "all", + "noDangerouslySetInnerHtml", + "noDangerouslySetInnerHtmlWithChildren", + ], + diagnostics, + ) + } + fn visit_map( + &mut self, + key: &SyntaxNode, + value: &SyntaxNode, + diagnostics: &mut Vec, + ) -> Option<()> { + let (name, value) = self.get_key_and_value(key, value, diagnostics)?; + let name_text = name.text(); + match name_text { + "recommended" => { + self.recommended = Some(self.map_to_boolean(&value, name_text, diagnostics)?); + } + "all" => { + self.all = Some(self.map_to_boolean(&value, name_text, diagnostics)?); + } + "noDangerouslySetInnerHtml" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.use_media_caption = Some(configuration); + self.no_dangerously_set_inner_html = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.use_media_caption = Some(configuration); + self.no_dangerously_set_inner_html = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1960,16 +1850,16 @@ impl VisitNode for Nursery { )); } }, - "useNamespaceKeyword" => match value { + "noDangerouslySetInnerHtmlWithChildren" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.use_namespace_keyword = Some(configuration); + self.no_dangerously_set_inner_html_with_children = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.use_namespace_keyword = Some(configuration); + self.no_dangerously_set_inner_html_with_children = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1978,16 +1868,78 @@ impl VisitNode for Nursery { )); } }, - "useValidAriaProps" => match value { + _ => {} + } + Some(()) + } +} +impl VisitJsonNode for Style {} +impl VisitNode for Style { + fn visit_member_name( + &mut self, + node: &SyntaxNode, + diagnostics: &mut Vec, + ) -> Option<()> { + has_only_known_keys( + node, + &[ + "recommended", + "all", + "noArguments", + "noCommaOperator", + "noImplicitBoolean", + "noInferrableTypes", + "noNamespace", + "noNegationElse", + "noNonNullAssertion", + "noParameterAssign", + "noParameterProperties", + "noRestrictedGlobals", + "noShoutyConstants", + "noUnusedTemplateLiteral", + "noVar", + "useBlockStatements", + "useConst", + "useDefaultParameterLast", + "useEnumInitializers", + "useExponentiationOperator", + "useFragmentSyntax", + "useNumericLiterals", + "useSelfClosingElements", + "useShorthandArrayType", + "useSingleCaseStatement", + "useSingleVarDeclarator", + "useTemplate", + "useWhile", + ], + diagnostics, + ) + } + fn visit_map( + &mut self, + key: &SyntaxNode, + value: &SyntaxNode, + diagnostics: &mut Vec, + ) -> Option<()> { + let (name, value) = self.get_key_and_value(key, value, diagnostics)?; + let name_text = name.text(); + match name_text { + "recommended" => { + self.recommended = Some(self.map_to_boolean(&value, name_text, diagnostics)?); + } + "all" => { + self.all = Some(self.map_to_boolean(&value, name_text, diagnostics)?); + } + "noArguments" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.use_valid_aria_props = Some(configuration); + self.no_arguments = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.use_valid_aria_props = Some(configuration); + self.no_arguments = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -1996,16 +1948,16 @@ impl VisitNode for Nursery { )); } }, - "useValidLang" => match value { + "noCommaOperator" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.use_valid_lang = Some(configuration); + self.no_comma_operator = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.use_valid_lang = Some(configuration); + self.no_comma_operator = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -2014,16 +1966,16 @@ impl VisitNode for Nursery { )); } }, - "useYield" => match value { + "noImplicitBoolean" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.use_yield = Some(configuration); + self.no_implicit_boolean = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.use_yield = Some(configuration); + self.no_implicit_boolean = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -2032,45 +1984,16 @@ impl VisitNode for Nursery { )); } }, - _ => {} - } - Some(()) - } -} -impl VisitJsonNode for Performance {} -impl VisitNode for Performance { - fn visit_member_name( - &mut self, - node: &SyntaxNode, - diagnostics: &mut Vec, - ) -> Option<()> { - has_only_known_keys(node, &["recommended", "all", "noDelete"], diagnostics) - } - fn visit_map( - &mut self, - key: &SyntaxNode, - value: &SyntaxNode, - diagnostics: &mut Vec, - ) -> Option<()> { - let (name, value) = self.get_key_and_value(key, value, diagnostics)?; - let name_text = name.text(); - match name_text { - "recommended" => { - self.recommended = Some(self.map_to_boolean(&value, name_text, diagnostics)?); - } - "all" => { - self.all = Some(self.map_to_boolean(&value, name_text, diagnostics)?); - } - "noDelete" => match value { + "noInferrableTypes" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_delete = Some(configuration); + self.no_inferrable_types = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_delete = Some(configuration); + self.no_inferrable_types = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -2079,54 +2002,16 @@ impl VisitNode for Performance { )); } }, - _ => {} - } - Some(()) - } -} -impl VisitJsonNode for Security {} -impl VisitNode for Security { - fn visit_member_name( - &mut self, - node: &SyntaxNode, - diagnostics: &mut Vec, - ) -> Option<()> { - has_only_known_keys( - node, - &[ - "recommended", - "all", - "noDangerouslySetInnerHtml", - "noDangerouslySetInnerHtmlWithChildren", - ], - diagnostics, - ) - } - fn visit_map( - &mut self, - key: &SyntaxNode, - value: &SyntaxNode, - diagnostics: &mut Vec, - ) -> Option<()> { - let (name, value) = self.get_key_and_value(key, value, diagnostics)?; - let name_text = name.text(); - match name_text { - "recommended" => { - self.recommended = Some(self.map_to_boolean(&value, name_text, diagnostics)?); - } - "all" => { - self.all = Some(self.map_to_boolean(&value, name_text, diagnostics)?); - } - "noDangerouslySetInnerHtml" => match value { + "noNamespace" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_dangerously_set_inner_html = Some(configuration); + self.no_namespace = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_dangerously_set_inner_html = Some(configuration); + self.no_namespace = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -2135,16 +2020,16 @@ impl VisitNode for Security { )); } }, - "noDangerouslySetInnerHtmlWithChildren" => match value { + "noNegationElse" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_dangerously_set_inner_html_with_children = Some(configuration); + self.no_negation_else = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_dangerously_set_inner_html_with_children = Some(configuration); + self.no_negation_else = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -2153,72 +2038,16 @@ impl VisitNode for Security { )); } }, - _ => {} - } - Some(()) - } -} -impl VisitJsonNode for Style {} -impl VisitNode for Style { - fn visit_member_name( - &mut self, - node: &SyntaxNode, - diagnostics: &mut Vec, - ) -> Option<()> { - has_only_known_keys( - node, - &[ - "recommended", - "all", - "noArguments", - "noImplicitBoolean", - "noNegationElse", - "noNonNullAssertion", - "noShoutyConstants", - "noUnusedTemplateLiteral", - "noVar", - "useBlockStatements", - "useConst", - "useDefaultParameterLast", - "useEnumInitializers", - "useExponentiationOperator", - "useFragmentSyntax", - "useNumericLiterals", - "useSelfClosingElements", - "useShorthandArrayType", - "useSingleCaseStatement", - "useSingleVarDeclarator", - "useTemplate", - "useWhile", - ], - diagnostics, - ) - } - fn visit_map( - &mut self, - key: &SyntaxNode, - value: &SyntaxNode, - diagnostics: &mut Vec, - ) -> Option<()> { - let (name, value) = self.get_key_and_value(key, value, diagnostics)?; - let name_text = name.text(); - match name_text { - "recommended" => { - self.recommended = Some(self.map_to_boolean(&value, name_text, diagnostics)?); - } - "all" => { - self.all = Some(self.map_to_boolean(&value, name_text, diagnostics)?); - } - "noArguments" => match value { + "noNonNullAssertion" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_arguments = Some(configuration); + self.no_non_null_assertion = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_arguments = Some(configuration); + self.no_non_null_assertion = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -2227,16 +2056,16 @@ impl VisitNode for Style { )); } }, - "noImplicitBoolean" => match value { + "noParameterAssign" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_implicit_boolean = Some(configuration); + self.no_parameter_assign = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_implicit_boolean = Some(configuration); + self.no_parameter_assign = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -2245,16 +2074,16 @@ impl VisitNode for Style { )); } }, - "noNegationElse" => match value { + "noParameterProperties" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_negation_else = Some(configuration); + self.no_parameter_properties = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_negation_else = Some(configuration); + self.no_parameter_properties = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -2263,16 +2092,16 @@ impl VisitNode for Style { )); } }, - "noNonNullAssertion" => match value { + "noRestrictedGlobals" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; - self.no_non_null_assertion = Some(configuration); + self.no_restricted_globals = Some(configuration); } AnyJsonValue::JsonObjectValue(_) => { let mut configuration = RuleConfiguration::default(); self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; - self.no_non_null_assertion = Some(configuration); + self.no_restricted_globals = Some(configuration); } _ => { diagnostics.push(DeserializationDiagnostic::new_incorrect_type( @@ -2587,13 +2416,18 @@ impl VisitNode for Suspicious { "recommended", "all", "noArrayIndexKey", + "noAssignInExpressions", "noAsyncPromiseExecutor", "noCatchAssign", + "noClassAssign", "noCommentText", "noCompareNegZero", + "noConfusingLabels", "noConstEnum", "noDebugger", "noDoubleEquals", + "noDuplicateCase", + "noDuplicateClassMembers", "noDuplicateObjectKeys", "noDuplicateParameters", "noEmptyInterface", @@ -2602,11 +2436,15 @@ impl VisitNode for Suspicious { "noFunctionAssign", "noImportAssign", "noLabelVar", + "noPrototypeBuiltins", + "noRedeclare", "noRedundantUseStrict", + "noSelfCompare", "noShadowRestrictedNames", "noSparseArray", "noUnsafeNegation", "useDefaultSwitchClauseLast", + "useNamespaceKeyword", "useValidTypeof", ], diagnostics, @@ -2645,6 +2483,24 @@ impl VisitNode for Suspicious { )); } }, + "noAssignInExpressions" => match value { + AnyJsonValue::JsonStringValue(_) => { + let mut configuration = RuleConfiguration::default(); + self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; + self.no_assign_in_expressions = Some(configuration); + } + AnyJsonValue::JsonObjectValue(_) => { + let mut configuration = RuleConfiguration::default(); + self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; + self.no_assign_in_expressions = Some(configuration); + } + _ => { + diagnostics.push(DeserializationDiagnostic::new_incorrect_type( + "object or string", + value.range(), + )); + } + }, "noAsyncPromiseExecutor" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); @@ -2681,6 +2537,24 @@ impl VisitNode for Suspicious { )); } }, + "noClassAssign" => match value { + AnyJsonValue::JsonStringValue(_) => { + let mut configuration = RuleConfiguration::default(); + self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; + self.no_class_assign = Some(configuration); + } + AnyJsonValue::JsonObjectValue(_) => { + let mut configuration = RuleConfiguration::default(); + self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; + self.no_class_assign = Some(configuration); + } + _ => { + diagnostics.push(DeserializationDiagnostic::new_incorrect_type( + "object or string", + value.range(), + )); + } + }, "noCommentText" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); @@ -2717,6 +2591,24 @@ impl VisitNode for Suspicious { )); } }, + "noConfusingLabels" => match value { + AnyJsonValue::JsonStringValue(_) => { + let mut configuration = RuleConfiguration::default(); + self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; + self.no_confusing_labels = Some(configuration); + } + AnyJsonValue::JsonObjectValue(_) => { + let mut configuration = RuleConfiguration::default(); + self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; + self.no_confusing_labels = Some(configuration); + } + _ => { + diagnostics.push(DeserializationDiagnostic::new_incorrect_type( + "object or string", + value.range(), + )); + } + }, "noConstEnum" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); @@ -2771,6 +2663,42 @@ impl VisitNode for Suspicious { )); } }, + "noDuplicateCase" => match value { + AnyJsonValue::JsonStringValue(_) => { + let mut configuration = RuleConfiguration::default(); + self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; + self.no_duplicate_case = Some(configuration); + } + AnyJsonValue::JsonObjectValue(_) => { + let mut configuration = RuleConfiguration::default(); + self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; + self.no_duplicate_case = Some(configuration); + } + _ => { + diagnostics.push(DeserializationDiagnostic::new_incorrect_type( + "object or string", + value.range(), + )); + } + }, + "noDuplicateClassMembers" => match value { + AnyJsonValue::JsonStringValue(_) => { + let mut configuration = RuleConfiguration::default(); + self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; + self.no_duplicate_class_members = Some(configuration); + } + AnyJsonValue::JsonObjectValue(_) => { + let mut configuration = RuleConfiguration::default(); + self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; + self.no_duplicate_class_members = Some(configuration); + } + _ => { + diagnostics.push(DeserializationDiagnostic::new_incorrect_type( + "object or string", + value.range(), + )); + } + }, "noDuplicateObjectKeys" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); @@ -2915,6 +2843,42 @@ impl VisitNode for Suspicious { )); } }, + "noPrototypeBuiltins" => match value { + AnyJsonValue::JsonStringValue(_) => { + let mut configuration = RuleConfiguration::default(); + self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; + self.no_prototype_builtins = Some(configuration); + } + AnyJsonValue::JsonObjectValue(_) => { + let mut configuration = RuleConfiguration::default(); + self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; + self.no_prototype_builtins = Some(configuration); + } + _ => { + diagnostics.push(DeserializationDiagnostic::new_incorrect_type( + "object or string", + value.range(), + )); + } + }, + "noRedeclare" => match value { + AnyJsonValue::JsonStringValue(_) => { + let mut configuration = RuleConfiguration::default(); + self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; + self.no_redeclare = Some(configuration); + } + AnyJsonValue::JsonObjectValue(_) => { + let mut configuration = RuleConfiguration::default(); + self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; + self.no_redeclare = Some(configuration); + } + _ => { + diagnostics.push(DeserializationDiagnostic::new_incorrect_type( + "object or string", + value.range(), + )); + } + }, "noRedundantUseStrict" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); @@ -2933,6 +2897,24 @@ impl VisitNode for Suspicious { )); } }, + "noSelfCompare" => match value { + AnyJsonValue::JsonStringValue(_) => { + let mut configuration = RuleConfiguration::default(); + self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; + self.no_self_compare = Some(configuration); + } + AnyJsonValue::JsonObjectValue(_) => { + let mut configuration = RuleConfiguration::default(); + self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; + self.no_self_compare = Some(configuration); + } + _ => { + diagnostics.push(DeserializationDiagnostic::new_incorrect_type( + "object or string", + value.range(), + )); + } + }, "noShadowRestrictedNames" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); @@ -3005,6 +2987,24 @@ impl VisitNode for Suspicious { )); } }, + "useNamespaceKeyword" => match value { + AnyJsonValue::JsonStringValue(_) => { + let mut configuration = RuleConfiguration::default(); + self.map_to_known_string(&value, name_text, &mut configuration, diagnostics)?; + self.use_namespace_keyword = Some(configuration); + } + AnyJsonValue::JsonObjectValue(_) => { + let mut configuration = RuleConfiguration::default(); + self.map_to_object(&value, name_text, &mut configuration, diagnostics)?; + self.use_namespace_keyword = Some(configuration); + } + _ => { + diagnostics.push(DeserializationDiagnostic::new_incorrect_type( + "object or string", + value.range(), + )); + } + }, "useValidTypeof" => match value { AnyJsonValue::JsonStringValue(_) => { let mut configuration = RuleConfiguration::default(); diff --git a/editors/vscode/configuration_schema.json b/editors/vscode/configuration_schema.json index a6670a69e9b..d11c88c2166 100644 --- a/editors/vscode/configuration_schema.json +++ b/editors/vscode/configuration_schema.json @@ -93,6 +93,13 @@ { "type": "null" } ] }, + "noNoninteractiveElementToInteractiveRole": { + "description": "Enforce that interactive ARIA roles are not assigned to non-interactive HTML elements.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noPositiveTabindex": { "description": "Prevent the usage of positive integers on tabIndex property", "anyOf": [ @@ -100,6 +107,20 @@ { "type": "null" } ] }, + "noRedundantAlt": { + "description": "Enforce img alt prop does not contain the word \"image\", \"picture\", or \"photo\".", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, + "noSvgWithoutTitle": { + "description": "Enforces the usage of the title element for the svg element.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "recommended": { "description": "It enables the recommended rules for this group", "type": ["boolean", "null"] @@ -118,6 +139,13 @@ { "type": "null" } ] }, + "useAriaPropsForRole": { + "description": "Enforce that elements with ARIA roles must have all required ARIA attributes for that role.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "useButtonType": { "description": "Enforces the usage of the attribute type for the element button", "anyOf": [ @@ -132,6 +160,13 @@ { "type": "null" } ] }, + "useIframeTitle": { + "description": "Enforces the usage of the attribute title for the element iframe", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "useKeyWithClickEvents": { "description": "Enforce onClick is accompanied by at least one of the following: onKeyUp, onKeyDown, onKeyPress.", "anyOf": [ @@ -146,12 +181,33 @@ { "type": "null" } ] }, + "useMediaCaption": { + "description": "Enforces that audio and video elements must have a track for captions.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "useValidAnchor": { "description": "Enforce that all anchors are valid, and they are navigable elements.", "anyOf": [ { "$ref": "#/definitions/RuleConfiguration" }, { "type": "null" } ] + }, + "useValidAriaProps": { + "description": "Ensures that ARIA properties aria-* are all valid.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, + "useValidLang": { + "description": "Ensure that the attribute passed to the lang attribute is a correct ISO language and/or country.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] } } }, @@ -170,6 +226,13 @@ { "type": "null" } ] }, + "noExtraSemicolon": { + "description": "Typing mistakes and misunderstandings about where semicolons are required can lead to semicolons that are unnecessary. While not technically an error, extra semicolons can cause confusion when reading code.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noMultipleSpacesInRegularExpressionLiterals": { "description": "Disallow unclear usage of multiple space characters in regular expression literals", "anyOf": [ @@ -177,6 +240,20 @@ { "type": "null" } ] }, + "noUselessCatch": { + "description": "Disallow unnecessary catch clauses.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, + "noUselessConstructor": { + "description": "Disallow unnecessary constructors.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noUselessFragments": { "description": "Disallow unnecessary fragments", "anyOf": [ @@ -184,6 +261,34 @@ { "type": "null" } ] }, + "noUselessLabel": { + "description": "Disallow unnecessary labels.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, + "noUselessRename": { + "description": "Disallow renaming import, export, and destructured assignments to the same name.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, + "noUselessSwitchCase": { + "description": "Disallow useless case in switch statements.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, + "noWith": { + "description": "Disallow with statements in non-strict contexts.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "recommended": { "description": "It enables the recommended rules for this group", "type": ["boolean", "null"] @@ -247,6 +352,27 @@ { "type": "null" } ] }, + "noGlobalObjectCalls": { + "description": "Disallow calling global object properties as functions", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, + "noInnerDeclarations": { + "description": "Disallow function and var declarations in nested blocks.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, + "noInvalidConstructorSuper": { + "description": "Prevents the incorrect use of super() inside classes. It also checks whether a call super() is missing from classes that extends other constructors.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noNewSymbol": { "description": "Disallow new operators with the Symbol object", "anyOf": [ @@ -282,6 +408,13 @@ { "type": "null" } ] }, + "noSwitchDeclarations": { + "description": "Disallow lexical declarations in switch clauses.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noUndeclaredVariables": { "description": "Prevents the usage of variables that haven't been declared inside the document", "anyOf": [ @@ -303,6 +436,13 @@ { "type": "null" } ] }, + "noUnreachableSuper": { + "description": "Ensures the super() constructor is called exactly once on every code path in a class constructor before this is accessed if the class has a superclass", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noUnsafeFinally": { "description": "Disallow control flow statements in finally blocks.", "anyOf": [ @@ -310,6 +450,20 @@ { "type": "null" } ] }, + "noUnsafeOptionalChaining": { + "description": "Disallow the use of optional chaining in contexts where the undefined value is not allowed.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, + "noUnusedLabels": { + "description": "Disallow unused labels.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noUnusedVariables": { "description": "Disallow unused variables.", "anyOf": [ @@ -341,6 +495,13 @@ { "$ref": "#/definitions/RuleConfiguration" }, { "type": "null" } ] + }, + "useYield": { + "description": "Require generator functions to contain yield.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] } } }, @@ -431,354 +592,137 @@ { "type": "null" } ] }, - "quoteStyle": { - "description": "The style for quotes. Defaults to double.", - "default": null, - "anyOf": [{ "$ref": "#/definitions/QuoteStyle" }, { "type": "null" }] - }, - "semicolons": { - "description": "Whether the formatter prints semicolons for all statements or only in for statements where it is necessary because of ASI.", - "default": null, - "anyOf": [{ "$ref": "#/definitions/Semicolons" }, { "type": "null" }] - }, - "trailingComma": { - "description": "Print trailing commas wherever possible in multi-line comma-separated syntactic structures. Defaults to \"all\".", - "default": null, - "anyOf": [ - { "$ref": "#/definitions/TrailingComma" }, - { "type": "null" } - ] - } - }, - "additionalProperties": false - }, - "JavascriptOrganizeImports": { - "type": "object", - "additionalProperties": false - }, - "LineWidth": { - "description": "Validated value for the `line_width` formatter options\n\nThe allowed range of values is 1..=320", - "type": "integer", - "format": "uint16", - "minimum": 0.0 - }, - "LinterConfiguration": { - "type": "object", - "properties": { - "enabled": { - "description": "if `false`, it disables the feature and the linter won't be executed. `true` by default", - "default": true, - "type": ["boolean", "null"] - }, - "ignore": { - "description": "A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.", - "anyOf": [{ "$ref": "#/definitions/StringSet" }, { "type": "null" }] - }, - "rules": { - "description": "List of rules", - "default": { "recommended": true }, - "anyOf": [{ "$ref": "#/definitions/Rules" }, { "type": "null" }] - } - }, - "additionalProperties": false - }, - "Nursery": { - "description": "A list of rules that belong to this group", - "type": "object", - "properties": { - "all": { - "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" } - ] - }, - "noAriaUnsupportedElements": { - "description": "Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noAssignInExpressions": { - "description": "Disallow assignments in expressions.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noBannedTypes": { - "description": "Disallow certain types.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noClassAssign": { - "description": "Disallow reassigning class members.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noCommaOperator": { - "description": "Disallow comma operator.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noConfusingArrow": { - "description": "Disallow arrow functions where they could be confused with comparisons.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noConfusingLabels": { - "description": "Disallow labeled statements that are not loops.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noConsoleLog": { - "description": "Disallow the use of console.log", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noConstantCondition": { - "description": "Disallow constant expressions in conditions", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noDuplicateCase": { - "description": "Disallow duplicate case labels. If a switch statement has duplicate test expressions in case clauses, it is likely that a programmer copied a case clause but forgot to change the test expression.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noDuplicateClassMembers": { - "description": "Disallow duplicate class members.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noDuplicateJsxProps": { - "description": "Prevents JSX properties to be assigned multiple times.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noExtraLabels": { - "description": "Disallow unnecessary labels.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noExtraSemicolons": { - "description": "Typing mistakes and misunderstandings about where semicolons are required can lead to semicolons that are unnecessary. While not technically an error, extra semicolons can cause confusion when reading code.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noForEach": { - "description": "Prefer for...of statement instead of Array.forEach.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noGlobalObjectCalls": { - "description": "Disallow calling global object properties as functions", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noInferrableTypes": { - "description": "Disallow type annotations for variables, parameters, and class properties initialized with a literal expression.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noInnerDeclarations": { - "description": "Disallow function and var declarations in nested blocks.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noInvalidConstructorSuper": { - "description": "Prevents the incorrect use of super() inside classes. It also checks whether a call super() is missing from classes that extends other constructors.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noNamespace": { - "description": "Disallow the use of TypeScript's namespaces.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noNoninteractiveElementToInteractiveRole": { - "description": "Enforce that interactive ARIA roles are not assigned to non-interactive HTML elements.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noNoninteractiveTabindex": { - "description": "Enforce that tabIndex is not assigned to non-interactive HTML elements.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noParameterAssign": { - "description": "Disallow reassigning function parameters.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noParameterProperties": { - "description": "Disallow the use of parameter properties in class constructors.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noPrototypeBuiltins": { - "description": "Disallow direct use of Object.prototype builtins.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noRedeclare": { - "description": "Disallow variable, function, class, and type redeclarations in the same scope.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noRedundantAlt": { - "description": "Enforce img alt prop does not contain the word \"image\", \"picture\", or \"photo\".", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noRedundantRoles": { - "description": "Enforce explicit role property is not the same as implicit/default role property on an element.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noRestrictedGlobals": { - "description": "This rule allows you to specify global variable names that you don’t want to use in your application.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noSelfAssign": { - "description": "Disallow assignments where both sides are exactly the same.", + "quoteStyle": { + "description": "The style for quotes. Defaults to double.", + "default": null, + "anyOf": [{ "$ref": "#/definitions/QuoteStyle" }, { "type": "null" }] + }, + "semicolons": { + "description": "Whether the formatter prints semicolons for all statements or only in for statements where it is necessary because of ASI.", + "default": null, + "anyOf": [{ "$ref": "#/definitions/Semicolons" }, { "type": "null" }] + }, + "trailingComma": { + "description": "Print trailing commas wherever possible in multi-line comma-separated syntactic structures. Defaults to \"all\".", + "default": null, "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, + { "$ref": "#/definitions/TrailingComma" }, { "type": "null" } ] + } + }, + "additionalProperties": false + }, + "JavascriptOrganizeImports": { + "type": "object", + "additionalProperties": false + }, + "LineWidth": { + "description": "Validated value for the `line_width` formatter options\n\nThe allowed range of values is 1..=320", + "type": "integer", + "format": "uint16", + "minimum": 0.0 + }, + "LinterConfiguration": { + "type": "object", + "properties": { + "enabled": { + "description": "if `false`, it disables the feature and the linter won't be executed. `true` by default", + "default": true, + "type": ["boolean", "null"] }, - "noSelfCompare": { - "description": "Disallow comparisons where both sides are exactly the same.", + "ignore": { + "description": "A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.", + "anyOf": [{ "$ref": "#/definitions/StringSet" }, { "type": "null" }] + }, + "rules": { + "description": "List of rules", + "default": { "recommended": true }, + "anyOf": [{ "$ref": "#/definitions/Rules" }, { "type": "null" }] + } + }, + "additionalProperties": false + }, + "Nursery": { + "description": "A list of rules that belong to this group", + "type": "object", + "properties": { + "all": { + "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" } ] }, - "noSvgWithoutTitle": { - "description": "Enforces the usage of the title element for the svg element.", + "noAriaUnsupportedElements": { + "description": "Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.", "anyOf": [ { "$ref": "#/definitions/RuleConfiguration" }, { "type": "null" } ] }, - "noSwitchDeclarations": { - "description": "Disallow lexical declarations in switch clauses.", + "noBannedTypes": { + "description": "Disallow certain types.", "anyOf": [ { "$ref": "#/definitions/RuleConfiguration" }, { "type": "null" } ] }, - "noUnreachableSuper": { - "description": "Ensures the super() constructor is called exactly once on every code path in a class constructor before this is accessed if the class has a superclass", + "noConfusingArrow": { + "description": "Disallow arrow functions where they could be confused with comparisons.", "anyOf": [ { "$ref": "#/definitions/RuleConfiguration" }, { "type": "null" } ] }, - "noUnsafeOptionalChaining": { - "description": "Disallow the use of optional chaining in contexts where the undefined value is not allowed.", + "noConsoleLog": { + "description": "Disallow the use of console.log", "anyOf": [ { "$ref": "#/definitions/RuleConfiguration" }, { "type": "null" } ] }, - "noUnusedLabels": { - "description": "Disallow unused labels.", + "noConstantCondition": { + "description": "Disallow constant expressions in conditions", "anyOf": [ { "$ref": "#/definitions/RuleConfiguration" }, { "type": "null" } ] }, - "noUselessCatch": { - "description": "Disallow unnecessary catch clauses.", + "noDuplicateJsxProps": { + "description": "Prevents JSX properties to be assigned multiple times.", "anyOf": [ { "$ref": "#/definitions/RuleConfiguration" }, { "type": "null" } ] }, - "noUselessConstructor": { - "description": "Disallow unnecessary constructors.", + "noForEach": { + "description": "Prefer for...of statement instead of Array.forEach.", "anyOf": [ { "$ref": "#/definitions/RuleConfiguration" }, { "type": "null" } ] }, - "noUselessRename": { - "description": "Disallow renaming import, export, and destructured assignments to the same name.", + "noNoninteractiveTabindex": { + "description": "Enforce that tabIndex is not assigned to non-interactive HTML elements.", "anyOf": [ { "$ref": "#/definitions/RuleConfiguration" }, { "type": "null" } ] }, - "noUselessSwitchCase": { - "description": "Disallow useless case in switch statements.", + "noRedundantRoles": { + "description": "Enforce explicit role property is not the same as implicit/default role property on an element.", "anyOf": [ { "$ref": "#/definitions/RuleConfiguration" }, { "type": "null" } ] }, - "noWith": { - "description": "Disallow with statements in non-strict contexts.", + "noSelfAssign": { + "description": "Disallow assignments where both sides are exactly the same.", "anyOf": [ { "$ref": "#/definitions/RuleConfiguration" }, { "type": "null" } @@ -795,13 +739,6 @@ { "type": "null" } ] }, - "useAriaPropsForRole": { - "description": "Enforce that elements with ARIA roles must have all required ARIA attributes for that role.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, "useCamelCase": { "description": "Enforce camel case naming convention.", "anyOf": [ @@ -837,13 +774,6 @@ { "type": "null" } ] }, - "useIframeTitle": { - "description": "Enforces the usage of the attribute title for the element iframe", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, "useIsNan": { "description": "Require calls to isNaN() when checking for NaN.", "anyOf": [ @@ -864,41 +794,6 @@ { "$ref": "#/definitions/RuleConfiguration" }, { "type": "null" } ] - }, - "useMediaCaption": { - "description": "Enforces that audio and video elements must have a track for captions.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "useNamespaceKeyword": { - "description": "Require using the namespace keyword over the module keyword to declare TypeScript namespaces.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "useValidAriaProps": { - "description": "Ensures that ARIA properties aria-* are all valid.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "useValidLang": { - "description": "Ensure that the attribute passed to the lang attribute is a correct ISO language and/or country.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "useYield": { - "description": "Require generator functions to contain yield.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] } } }, @@ -1052,6 +947,13 @@ { "type": "null" } ] }, + "noCommaOperator": { + "description": "Disallow comma operator.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noImplicitBoolean": { "description": "Disallow implicit true values on JSX boolean attributes", "anyOf": [ @@ -1059,6 +961,20 @@ { "type": "null" } ] }, + "noInferrableTypes": { + "description": "Disallow type annotations for variables, parameters, and class properties initialized with a literal expression.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, + "noNamespace": { + "description": "Disallow the use of TypeScript's namespaces.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noNegationElse": { "description": "Disallow negation in the condition of an if statement if it has an else clause", "anyOf": [ @@ -1073,6 +989,27 @@ { "type": "null" } ] }, + "noParameterAssign": { + "description": "Disallow reassigning function parameters.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, + "noParameterProperties": { + "description": "Disallow the use of parameter properties in class constructors.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, + "noRestrictedGlobals": { + "description": "This rule allows you to specify global variable names that you don’t want to use in your application.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noShoutyConstants": { "description": "Disallow the use of constants which its value is the upper-case version of its name.", "anyOf": [ @@ -1206,6 +1143,13 @@ { "type": "null" } ] }, + "noAssignInExpressions": { + "description": "Disallow assignments in expressions.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noAsyncPromiseExecutor": { "description": "Disallows using an async function as a Promise executor.", "anyOf": [ @@ -1220,6 +1164,13 @@ { "type": "null" } ] }, + "noClassAssign": { + "description": "Disallow reassigning class members.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noCommentText": { "description": "Prevent comments from being inserted as text nodes", "anyOf": [ @@ -1234,6 +1185,13 @@ { "type": "null" } ] }, + "noConfusingLabels": { + "description": "Disallow labeled statements that are not loops.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noConstEnum": { "description": "Disallow TypeScript const enum", "anyOf": [ @@ -1255,6 +1213,20 @@ { "type": "null" } ] }, + "noDuplicateCase": { + "description": "Disallow duplicate case labels. If a switch statement has duplicate test expressions in case clauses, it is likely that a programmer copied a case clause but forgot to change the test expression.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, + "noDuplicateClassMembers": { + "description": "Disallow duplicate class members.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noDuplicateObjectKeys": { "description": "Prevents object literals having more than one property declaration for the same name. If an object property with the same name is defined multiple times (except when combining a getter with a setter), only the last definition makes it into the object and previous definitions are ignored, which is likely a mistake.", "anyOf": [ @@ -1311,6 +1283,20 @@ { "type": "null" } ] }, + "noPrototypeBuiltins": { + "description": "Disallow direct use of Object.prototype builtins.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, + "noRedeclare": { + "description": "Disallow variable, function, class, and type redeclarations in the same scope.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noRedundantUseStrict": { "description": "Prevents from having redundant \"use strict\".", "anyOf": [ @@ -1318,6 +1304,13 @@ { "type": "null" } ] }, + "noSelfCompare": { + "description": "Disallow comparisons where both sides are exactly the same.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noShadowRestrictedNames": { "description": "Disallow identifiers from shadowing restricted names.", "anyOf": [ @@ -1350,6 +1343,13 @@ { "type": "null" } ] }, + "useNamespaceKeyword": { + "description": "Require using the namespace keyword over the module keyword to declare TypeScript namespaces.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "useValidTypeof": { "description": "This rule verifies the result of typeof $expr unary expressions is being compared to valid values, either string literals containing valid type names or other typeof expressions", "anyOf": [ diff --git a/npm/backend-jsonrpc/src/workspace.ts b/npm/backend-jsonrpc/src/workspace.ts index 251d1ce8dc1..274ce289501 100644 --- a/npm/backend-jsonrpc/src/workspace.ts +++ b/npm/backend-jsonrpc/src/workspace.ts @@ -225,10 +225,22 @@ export interface A11y { * The scope prop should be used only on elements. */ noHeaderScope?: RuleConfiguration; + /** + * Enforce that interactive ARIA roles are not assigned to non-interactive HTML elements. + */ + noNoninteractiveElementToInteractiveRole?: RuleConfiguration; /** * Prevent the usage of positive integers on tabIndex property */ noPositiveTabindex?: RuleConfiguration; + /** + * Enforce img alt prop does not contain the word "image", "picture", or "photo". + */ + noRedundantAlt?: RuleConfiguration; + /** + * Enforces the usage of the title element for the svg element. + */ + noSvgWithoutTitle?: RuleConfiguration; /** * It enables the recommended rules for this group */ @@ -241,6 +253,10 @@ export interface A11y { * Enforce that anchors have content and that the content is accessible to screen readers. */ useAnchorContent?: RuleConfiguration; + /** + * Enforce that elements with ARIA roles must have all required ARIA attributes for that role. + */ + useAriaPropsForRole?: RuleConfiguration; /** * Enforces the usage of the attribute type for the element button */ @@ -249,6 +265,10 @@ export interface A11y { * Enforce that html element has lang attribute. */ useHtmlLang?: RuleConfiguration; + /** + * Enforces the usage of the attribute title for the element iframe + */ + useIframeTitle?: RuleConfiguration; /** * Enforce onClick is accompanied by at least one of the following: onKeyUp, onKeyDown, onKeyPress. */ @@ -257,10 +277,22 @@ export interface A11y { * Enforce onMouseOver / onMouseOut are accompanied by onFocus / onBlur. */ useKeyWithMouseEvents?: RuleConfiguration; + /** + * Enforces that audio and video elements must have a track for captions. + */ + useMediaCaption?: RuleConfiguration; /** * Enforce that all anchors are valid, and they are navigable elements. */ useValidAnchor?: RuleConfiguration; + /** + * Ensures that ARIA properties aria-* are all valid. + */ + useValidAriaProps?: RuleConfiguration; + /** + * Ensure that the attribute passed to the lang attribute is a correct ISO language and/or country. + */ + useValidLang?: RuleConfiguration; } /** * A list of rules that belong to this group @@ -274,14 +306,42 @@ export interface Complexity { * Disallow unnecessary boolean casts */ noExtraBooleanCast?: RuleConfiguration; + /** + * Typing mistakes and misunderstandings about where semicolons are required can lead to semicolons that are unnecessary. While not technically an error, extra semicolons can cause confusion when reading code. + */ + noExtraSemicolon?: RuleConfiguration; /** * Disallow unclear usage of multiple space characters in regular expression literals */ noMultipleSpacesInRegularExpressionLiterals?: RuleConfiguration; + /** + * Disallow unnecessary catch clauses. + */ + noUselessCatch?: RuleConfiguration; + /** + * Disallow unnecessary constructors. + */ + noUselessConstructor?: RuleConfiguration; /** * Disallow unnecessary fragments */ noUselessFragments?: RuleConfiguration; + /** + * Disallow unnecessary labels. + */ + noUselessLabel?: RuleConfiguration; + /** + * Disallow renaming import, export, and destructured assignments to the same name. + */ + noUselessRename?: RuleConfiguration; + /** + * Disallow useless case in switch statements. + */ + noUselessSwitchCase?: RuleConfiguration; + /** + * Disallow with statements in non-strict contexts. + */ + noWith?: RuleConfiguration; /** * It enables the recommended rules for this group */ @@ -323,6 +383,18 @@ export interface Correctness { * Disallows empty destructuring patterns. */ noEmptyPattern?: RuleConfiguration; + /** + * Disallow calling global object properties as functions + */ + noGlobalObjectCalls?: RuleConfiguration; + /** + * Disallow function and var declarations in nested blocks. + */ + noInnerDeclarations?: RuleConfiguration; + /** + * Prevents the incorrect use of super() inside classes. It also checks whether a call super() is missing from classes that extends other constructors. + */ + noInvalidConstructorSuper?: RuleConfiguration; /** * Disallow new operators with the Symbol object */ @@ -343,6 +415,10 @@ export interface Correctness { * Disallow comparison of expressions modifying the string case with non-compliant value. */ noStringCaseMismatch?: RuleConfiguration; + /** + * Disallow lexical declarations in switch clauses. + */ + noSwitchDeclarations?: RuleConfiguration; /** * Prevents the usage of variables that haven't been declared inside the document */ @@ -355,10 +431,22 @@ export interface Correctness { * Disallow unreachable code */ noUnreachable?: RuleConfiguration; + /** + * Ensures the super() constructor is called exactly once on every code path in a class constructor before this is accessed if the class has a superclass + */ + noUnreachableSuper?: RuleConfiguration; /** * Disallow control flow statements in finally blocks. */ noUnsafeFinally?: RuleConfiguration; + /** + * Disallow the use of optional chaining in contexts where the undefined value is not allowed. + */ + noUnsafeOptionalChaining?: RuleConfiguration; + /** + * Disallow unused labels. + */ + noUnusedLabels?: RuleConfiguration; /** * Disallow unused variables. */ @@ -379,6 +467,10 @@ export interface Correctness { * Enforce "for" loop update clause moving the counter in the right direction. */ useValidForDirection?: RuleConfiguration; + /** + * Require generator functions to contain yield. + */ + useYield?: RuleConfiguration; } /** * A list of rules that belong to this group @@ -396,30 +488,14 @@ export interface Nursery { * Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes. */ noAriaUnsupportedElements?: RuleConfiguration; - /** - * Disallow assignments in expressions. - */ - noAssignInExpressions?: RuleConfiguration; /** * Disallow certain types. */ noBannedTypes?: RuleConfiguration; - /** - * Disallow reassigning class members. - */ - noClassAssign?: RuleConfiguration; - /** - * Disallow comma operator. - */ - noCommaOperator?: RuleConfiguration; /** * Disallow arrow functions where they could be confused with comparisons. */ noConfusingArrow?: RuleConfiguration; - /** - * Disallow labeled statements that are not loops. - */ - noConfusingLabels?: RuleConfiguration; /** * Disallow the use of console.log */ @@ -428,134 +504,26 @@ export interface Nursery { * Disallow constant expressions in conditions */ noConstantCondition?: RuleConfiguration; - /** - * Disallow duplicate case labels. If a switch statement has duplicate test expressions in case clauses, it is likely that a programmer copied a case clause but forgot to change the test expression. - */ - noDuplicateCase?: RuleConfiguration; - /** - * Disallow duplicate class members. - */ - noDuplicateClassMembers?: RuleConfiguration; /** * Prevents JSX properties to be assigned multiple times. */ noDuplicateJsxProps?: RuleConfiguration; - /** - * Disallow unnecessary labels. - */ - noExtraLabels?: RuleConfiguration; - /** - * Typing mistakes and misunderstandings about where semicolons are required can lead to semicolons that are unnecessary. While not technically an error, extra semicolons can cause confusion when reading code. - */ - noExtraSemicolons?: RuleConfiguration; /** * Prefer for...of statement instead of Array.forEach. */ noForEach?: RuleConfiguration; - /** - * Disallow calling global object properties as functions - */ - noGlobalObjectCalls?: RuleConfiguration; - /** - * Disallow type annotations for variables, parameters, and class properties initialized with a literal expression. - */ - noInferrableTypes?: RuleConfiguration; - /** - * Disallow function and var declarations in nested blocks. - */ - noInnerDeclarations?: RuleConfiguration; - /** - * Prevents the incorrect use of super() inside classes. It also checks whether a call super() is missing from classes that extends other constructors. - */ - noInvalidConstructorSuper?: RuleConfiguration; - /** - * Disallow the use of TypeScript's namespaces. - */ - noNamespace?: RuleConfiguration; - /** - * Enforce that interactive ARIA roles are not assigned to non-interactive HTML elements. - */ - noNoninteractiveElementToInteractiveRole?: RuleConfiguration; /** * Enforce that tabIndex is not assigned to non-interactive HTML elements. */ noNoninteractiveTabindex?: RuleConfiguration; - /** - * Disallow reassigning function parameters. - */ - noParameterAssign?: RuleConfiguration; - /** - * Disallow the use of parameter properties in class constructors. - */ - noParameterProperties?: RuleConfiguration; - /** - * Disallow direct use of Object.prototype builtins. - */ - noPrototypeBuiltins?: RuleConfiguration; - /** - * Disallow variable, function, class, and type redeclarations in the same scope. - */ - noRedeclare?: RuleConfiguration; - /** - * Enforce img alt prop does not contain the word "image", "picture", or "photo". - */ - noRedundantAlt?: RuleConfiguration; /** * Enforce explicit role property is not the same as implicit/default role property on an element. */ noRedundantRoles?: RuleConfiguration; - /** - * This rule allows you to specify global variable names that you don’t want to use in your application. - */ - noRestrictedGlobals?: RuleConfiguration; /** * Disallow assignments where both sides are exactly the same. */ noSelfAssign?: RuleConfiguration; - /** - * Disallow comparisons where both sides are exactly the same. - */ - noSelfCompare?: RuleConfiguration; - /** - * Enforces the usage of the title element for the svg element. - */ - noSvgWithoutTitle?: RuleConfiguration; - /** - * Disallow lexical declarations in switch clauses. - */ - noSwitchDeclarations?: RuleConfiguration; - /** - * Ensures the super() constructor is called exactly once on every code path in a class constructor before this is accessed if the class has a superclass - */ - noUnreachableSuper?: RuleConfiguration; - /** - * Disallow the use of optional chaining in contexts where the undefined value is not allowed. - */ - noUnsafeOptionalChaining?: RuleConfiguration; - /** - * Disallow unused labels. - */ - noUnusedLabels?: RuleConfiguration; - /** - * Disallow unnecessary catch clauses. - */ - noUselessCatch?: RuleConfiguration; - /** - * Disallow unnecessary constructors. - */ - noUselessConstructor?: RuleConfiguration; - /** - * Disallow renaming import, export, and destructured assignments to the same name. - */ - noUselessRename?: RuleConfiguration; - /** - * Disallow useless case in switch statements. - */ - noUselessSwitchCase?: RuleConfiguration; - /** - * Disallow with statements in non-strict contexts. - */ - noWith?: RuleConfiguration; /** * It enables the recommended rules for this group */ @@ -564,10 +532,6 @@ export interface Nursery { * Enforce that ARIA state and property values are valid. */ useAriaPropTypes?: RuleConfiguration; - /** - * Enforce that elements with ARIA roles must have all required ARIA attributes for that role. - */ - useAriaPropsForRole?: RuleConfiguration; /** * Enforce camel case naming convention. */ @@ -588,10 +552,6 @@ export interface Nursery { * Enforce that all React hooks are being called from the Top Level component functions. */ useHookAtTopLevel?: RuleConfiguration; - /** - * Enforces the usage of the attribute title for the element iframe - */ - useIframeTitle?: RuleConfiguration; /** * Require calls to isNaN() when checking for NaN. */ @@ -604,26 +564,6 @@ export interface Nursery { * Enforce the usage of a literal access to properties over computed property access. */ useLiteralKeys?: RuleConfiguration; - /** - * Enforces that audio and video elements must have a track for captions. - */ - useMediaCaption?: RuleConfiguration; - /** - * Require using the namespace keyword over the module keyword to declare TypeScript namespaces. - */ - useNamespaceKeyword?: RuleConfiguration; - /** - * Ensures that ARIA properties aria-* are all valid. - */ - useValidAriaProps?: RuleConfiguration; - /** - * Ensure that the attribute passed to the lang attribute is a correct ISO language and/or country. - */ - useValidLang?: RuleConfiguration; - /** - * Require generator functions to contain yield. - */ - useYield?: RuleConfiguration; } /** * A list of rules that belong to this group @@ -675,10 +615,22 @@ export interface Style { * Disallow the use of arguments */ noArguments?: RuleConfiguration; + /** + * Disallow comma operator. + */ + noCommaOperator?: RuleConfiguration; /** * Disallow implicit true values on JSX boolean attributes */ noImplicitBoolean?: RuleConfiguration; + /** + * Disallow type annotations for variables, parameters, and class properties initialized with a literal expression. + */ + noInferrableTypes?: RuleConfiguration; + /** + * Disallow the use of TypeScript's namespaces. + */ + noNamespace?: RuleConfiguration; /** * Disallow negation in the condition of an if statement if it has an else clause */ @@ -687,6 +639,18 @@ export interface Style { * Disallow non-null assertions using the ! postfix operator. */ noNonNullAssertion?: RuleConfiguration; + /** + * Disallow reassigning function parameters. + */ + noParameterAssign?: RuleConfiguration; + /** + * Disallow the use of parameter properties in class constructors. + */ + noParameterProperties?: RuleConfiguration; + /** + * This rule allows you to specify global variable names that you don’t want to use in your application. + */ + noRestrictedGlobals?: RuleConfiguration; /** * Disallow the use of constants which its value is the upper-case version of its name. */ @@ -768,6 +732,10 @@ export interface Suspicious { * Discourage the usage of Array index in keys. */ noArrayIndexKey?: RuleConfiguration; + /** + * Disallow assignments in expressions. + */ + noAssignInExpressions?: RuleConfiguration; /** * Disallows using an async function as a Promise executor. */ @@ -776,6 +744,10 @@ export interface Suspicious { * Disallow reassigning exceptions in catch clauses. */ noCatchAssign?: RuleConfiguration; + /** + * Disallow reassigning class members. + */ + noClassAssign?: RuleConfiguration; /** * Prevent comments from being inserted as text nodes */ @@ -784,6 +756,10 @@ export interface Suspicious { * Disallow comparing against -0 */ noCompareNegZero?: RuleConfiguration; + /** + * Disallow labeled statements that are not loops. + */ + noConfusingLabels?: RuleConfiguration; /** * Disallow TypeScript const enum */ @@ -796,6 +772,14 @@ export interface Suspicious { * Require the use of === and !== */ noDoubleEquals?: RuleConfiguration; + /** + * Disallow duplicate case labels. If a switch statement has duplicate test expressions in case clauses, it is likely that a programmer copied a case clause but forgot to change the test expression. + */ + noDuplicateCase?: RuleConfiguration; + /** + * Disallow duplicate class members. + */ + noDuplicateClassMembers?: RuleConfiguration; /** * Prevents object literals having more than one property declaration for the same name. If an object property with the same name is defined multiple times (except when combining a getter with a setter), only the last definition makes it into the object and previous definitions are ignored, which is likely a mistake. */ @@ -828,10 +812,22 @@ export interface Suspicious { * Disallow labels that share a name with a variable */ noLabelVar?: RuleConfiguration; + /** + * Disallow direct use of Object.prototype builtins. + */ + noPrototypeBuiltins?: RuleConfiguration; + /** + * Disallow variable, function, class, and type redeclarations in the same scope. + */ + noRedeclare?: RuleConfiguration; /** * Prevents from having redundant "use strict". */ noRedundantUseStrict?: RuleConfiguration; + /** + * Disallow comparisons where both sides are exactly the same. + */ + noSelfCompare?: RuleConfiguration; /** * Disallow identifiers from shadowing restricted names. */ @@ -852,6 +848,10 @@ export interface Suspicious { * Enforce default clauses in switch statements to be last */ useDefaultSwitchClauseLast?: RuleConfiguration; + /** + * Require using the namespace keyword over the module keyword to declare TypeScript namespaces. + */ + useNamespaceKeyword?: RuleConfiguration; /** * This rule verifies the result of typeof $expr unary expressions is being compared to valid values, either string literals containing valid type names or other typeof expressions */ @@ -938,148 +938,145 @@ export interface Advices { advices: Advice[]; } export type Category = + | "lint/a11y/noAccessKey" | "lint/a11y/noAutofocus" | "lint/a11y/noBlankTarget" + | "lint/a11y/noDistractingElements" + | "lint/a11y/noHeaderScope" + | "lint/a11y/noNoninteractiveElementToInteractiveRole" | "lint/a11y/noPositiveTabindex" + | "lint/a11y/noRedundantAlt" + | "lint/a11y/noSvgWithoutTitle" | "lint/a11y/useAltText" | "lint/a11y/useAnchorContent" + | "lint/a11y/useAriaPropsForRole" | "lint/a11y/useButtonType" + | "lint/a11y/useHtmlLang" + | "lint/a11y/useIframeTitle" | "lint/a11y/useKeyWithClickEvents" | "lint/a11y/useKeyWithMouseEvents" + | "lint/a11y/useMediaCaption" | "lint/a11y/useValidAnchor" - | "lint/a11y/useHtmlLang" - | "lint/a11y/noDistractingElements" - | "lint/a11y/noHeaderScope" - | "lint/a11y/noAccessKey" + | "lint/a11y/useValidAriaProps" + | "lint/a11y/useValidLang" | "lint/complexity/noExtraBooleanCast" + | "lint/complexity/noExtraSemicolon" | "lint/complexity/noMultipleSpacesInRegularExpressionLiterals" + | "lint/complexity/noUselessCatch" + | "lint/complexity/noUselessConstructor" | "lint/complexity/noUselessFragments" + | "lint/complexity/noUselessLabel" + | "lint/complexity/noUselessRename" + | "lint/complexity/noUselessSwitchCase" + | "lint/complexity/noWith" | "lint/complexity/useFlatMap" | "lint/complexity/useOptionalChain" | "lint/complexity/useSimplifiedLogicExpression" | "lint/correctness/noChildrenProp" | "lint/correctness/noConstAssign" + | "lint/correctness/noConstructorReturn" | "lint/correctness/noEmptyPattern" + | "lint/correctness/noGlobalObjectCalls" + | "lint/correctness/noInnerDeclarations" + | "lint/correctness/noInvalidConstructorSuper" | "lint/correctness/noNewSymbol" + | "lint/correctness/noPrecisionLoss" | "lint/correctness/noRenderReturnValue" + | "lint/correctness/noSetterReturn" + | "lint/correctness/noStringCaseMismatch" + | "lint/correctness/noSwitchDeclarations" | "lint/correctness/noUndeclaredVariables" | "lint/correctness/noUnnecessaryContinue" | "lint/correctness/noUnreachable" + | "lint/correctness/noUnreachableSuper" + | "lint/correctness/noUnsafeFinally" + | "lint/correctness/noUnsafeOptionalChaining" + | "lint/correctness/noUnusedLabels" | "lint/correctness/noUnusedVariables" | "lint/correctness/noVoidElementsWithChildren" - | "lint/correctness/useValidForDirection" - | "lint/correctness/noUnsafeFinally" - | "lint/correctness/noConstructorReturn" - | "lint/correctness/noPrecisionLoss" | "lint/correctness/noVoidTypeReturn" - | "lint/correctness/noStringCaseMismatch" - | "lint/correctness/noSetterReturn" - | "lint/nursery/noAssignInExpressions" - | "lint/nursery/noWith" - | "lint/nursery/noExtraSemicolons" + | "lint/correctness/useValidForDirection" + | "lint/correctness/useYield" + | "lint/nursery/noAccumulatingSpread" + | "lint/nursery/noAriaUnsupportedElements" | "lint/nursery/noBannedTypes" - | "lint/nursery/noClassAssign" - | "lint/nursery/noCommaOperator" - | "lint/nursery/noDuplicateCase" - | "lint/nursery/noExtraLabels" - | "lint/nursery/noInferrableTypes" - | "lint/nursery/noInnerDeclarations" - | "lint/nursery/noInvalidConstructorSuper" - | "lint/nursery/noConfusingLabels" - | "lint/nursery/noParameterProperties" - | "lint/nursery/noRedundantAlt" - | "lint/nursery/noRestrictedGlobals" - | "lint/nursery/noSelfCompare" + | "lint/nursery/noConfusingArrow" + | "lint/nursery/noConsoleLog" + | "lint/nursery/noConstantCondition" + | "lint/nursery/noDuplicateJsxProps" + | "lint/nursery/noForEach" + | "lint/nursery/noNoninteractiveTabindex" + | "lint/nursery/noRedundantRoles" | "lint/nursery/noSelfAssign" - | "lint/nursery/noSetterReturn" - | "lint/nursery/noStringCaseMismatch" - | "lint/nursery/noSwitchDeclarations" - | "lint/nursery/noUnreachableSuper" - | "lint/nursery/noUnusedLabels" - | "lint/nursery/noUselessSwitchCase" - | "lint/nursery/useAriaPropsForRole" | "lint/nursery/useAriaPropTypes" | "lint/nursery/useCamelCase" - | "lint/nursery/useValidLang" - | "lint/nursery/useValidAriaProps" | "lint/nursery/useExhaustiveDependencies" - | "lint/nursery/useIsNan" - | "lint/nursery/useMediaCaption" - | "lint/nursery/useIframeTitle" - | "lint/nursery/noNoninteractiveElementToInteractiveRole" - | "lint/nursery/noUselessRename" - | "lint/nursery/useValidForDirection" - | "lint/nursery/useHookAtTopLevel" - | "lint/nursery/noUnsafeOptionalChaining" - | "lint/nursery/noDuplicateJsxProps" - | "lint/nursery/noDuplicateClassMembers" - | "lint/nursery/useYield" - | "lint/nursery/noGlobalObjectCalls" - | "lint/nursery/noPrototypeBuiltins" - | "lint/nursery/noSvgWithoutTitle" - | "lint/nursery/noUselessCatch" - | "lint/nursery/noParameterAssign" - | "lint/nursery/noNamespace" - | "lint/nursery/noConfusingArrow" - | "lint/nursery/noNoninteractiveTabindex" - | "lint/nursery/noAriaUnsupportedElements" - | "lint/nursery/noConsoleLog" - | "lint/nursery/noForEach" - | "lint/nursery/useLiteralKeys" - | "lint/nursery/noUselessConstructor" - | "lint/nursery/useLiteralEnumMembers" | "lint/nursery/useGroupedTypeImport" | "lint/nursery/useHeadingContent" - | "lint/nursery/noRedeclare" - | "lint/nursery/useNamespaceKeyword" - | "lint/nursery/noRedundantRoles" - | "lint/nursery/noConstantCondition" - | "lint/nursery/noAccumulatingSpread" + | "lint/nursery/useHookAtTopLevel" + | "lint/nursery/useIsNan" + | "lint/nursery/useLiteralEnumMembers" + | "lint/nursery/useLiteralKeys" | "lint/performance/noDelete" | "lint/security/noDangerouslySetInnerHtml" | "lint/security/noDangerouslySetInnerHtmlWithChildren" | "lint/style/noArguments" + | "lint/style/noCommaOperator" | "lint/style/noImplicitBoolean" + | "lint/style/noInferrableTypes" + | "lint/style/noNamespace" | "lint/style/noNegationElse" + | "lint/style/noNonNullAssertion" + | "lint/style/noParameterAssign" + | "lint/style/noParameterProperties" + | "lint/style/noRestrictedGlobals" | "lint/style/noShoutyConstants" | "lint/style/noUnusedTemplateLiteral" + | "lint/style/noVar" | "lint/style/useBlockStatements" + | "lint/style/useConst" + | "lint/style/useDefaultParameterLast" + | "lint/style/useEnumInitializers" + | "lint/style/useExponentiationOperator" | "lint/style/useFragmentSyntax" + | "lint/style/useNumericLiterals" | "lint/style/useSelfClosingElements" | "lint/style/useShorthandArrayType" | "lint/style/useSingleCaseStatement" | "lint/style/useSingleVarDeclarator" | "lint/style/useTemplate" | "lint/style/useWhile" - | "lint/style/useExponentiationOperator" - | "lint/style/useNumericLiterals" - | "lint/style/useDefaultParameterLast" - | "lint/style/useConst" - | "lint/style/noVar" - | "lint/style/noNonNullAssertion" - | "lint/style/useEnumInitializers" | "lint/suspicious/noArrayIndexKey" + | "lint/suspicious/noAssignInExpressions" | "lint/suspicious/noAsyncPromiseExecutor" | "lint/suspicious/noCatchAssign" + | "lint/suspicious/noClassAssign" | "lint/suspicious/noCommentText" | "lint/suspicious/noCompareNegZero" + | "lint/suspicious/noConfusingLabels" + | "lint/suspicious/noConstEnum" | "lint/suspicious/noDebugger" | "lint/suspicious/noDoubleEquals" + | "lint/suspicious/noDuplicateCase" + | "lint/suspicious/noDuplicateClassMembers" + | "lint/suspicious/noDuplicateObjectKeys" | "lint/suspicious/noDuplicateParameters" + | "lint/suspicious/noEmptyInterface" | "lint/suspicious/noExplicitAny" + | "lint/suspicious/noExtraNonNullAssertion" | "lint/suspicious/noFunctionAssign" | "lint/suspicious/noImportAssign" | "lint/suspicious/noLabelVar" + | "lint/suspicious/noPrototypeBuiltins" + | "lint/suspicious/noRedeclare" + | "lint/suspicious/noRedundantUseStrict" + | "lint/suspicious/noSelfCompare" | "lint/suspicious/noShadowRestrictedNames" | "lint/suspicious/noSparseArray" | "lint/suspicious/noUnsafeNegation" - | "lint/suspicious/useValidTypeof" - | "lint/suspicious/noEmptyInterface" - | "lint/suspicious/noExtraNonNullAssertion" - | "lint/suspicious/noRedundantUseStrict" - | "lint/suspicious/noConstEnum" | "lint/suspicious/useDefaultSwitchClauseLast" - | "lint/suspicious/noDuplicateObjectKeys" + | "lint/suspicious/useNamespaceKeyword" + | "lint/suspicious/useValidTypeof" | "files/missingHandler" | "format" | "configuration" diff --git a/npm/rome/configuration_schema.json b/npm/rome/configuration_schema.json index a6670a69e9b..d11c88c2166 100644 --- a/npm/rome/configuration_schema.json +++ b/npm/rome/configuration_schema.json @@ -93,6 +93,13 @@ { "type": "null" } ] }, + "noNoninteractiveElementToInteractiveRole": { + "description": "Enforce that interactive ARIA roles are not assigned to non-interactive HTML elements.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noPositiveTabindex": { "description": "Prevent the usage of positive integers on tabIndex property", "anyOf": [ @@ -100,6 +107,20 @@ { "type": "null" } ] }, + "noRedundantAlt": { + "description": "Enforce img alt prop does not contain the word \"image\", \"picture\", or \"photo\".", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, + "noSvgWithoutTitle": { + "description": "Enforces the usage of the title element for the svg element.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "recommended": { "description": "It enables the recommended rules for this group", "type": ["boolean", "null"] @@ -118,6 +139,13 @@ { "type": "null" } ] }, + "useAriaPropsForRole": { + "description": "Enforce that elements with ARIA roles must have all required ARIA attributes for that role.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "useButtonType": { "description": "Enforces the usage of the attribute type for the element button", "anyOf": [ @@ -132,6 +160,13 @@ { "type": "null" } ] }, + "useIframeTitle": { + "description": "Enforces the usage of the attribute title for the element iframe", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "useKeyWithClickEvents": { "description": "Enforce onClick is accompanied by at least one of the following: onKeyUp, onKeyDown, onKeyPress.", "anyOf": [ @@ -146,12 +181,33 @@ { "type": "null" } ] }, + "useMediaCaption": { + "description": "Enforces that audio and video elements must have a track for captions.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "useValidAnchor": { "description": "Enforce that all anchors are valid, and they are navigable elements.", "anyOf": [ { "$ref": "#/definitions/RuleConfiguration" }, { "type": "null" } ] + }, + "useValidAriaProps": { + "description": "Ensures that ARIA properties aria-* are all valid.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, + "useValidLang": { + "description": "Ensure that the attribute passed to the lang attribute is a correct ISO language and/or country.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] } } }, @@ -170,6 +226,13 @@ { "type": "null" } ] }, + "noExtraSemicolon": { + "description": "Typing mistakes and misunderstandings about where semicolons are required can lead to semicolons that are unnecessary. While not technically an error, extra semicolons can cause confusion when reading code.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noMultipleSpacesInRegularExpressionLiterals": { "description": "Disallow unclear usage of multiple space characters in regular expression literals", "anyOf": [ @@ -177,6 +240,20 @@ { "type": "null" } ] }, + "noUselessCatch": { + "description": "Disallow unnecessary catch clauses.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, + "noUselessConstructor": { + "description": "Disallow unnecessary constructors.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noUselessFragments": { "description": "Disallow unnecessary fragments", "anyOf": [ @@ -184,6 +261,34 @@ { "type": "null" } ] }, + "noUselessLabel": { + "description": "Disallow unnecessary labels.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, + "noUselessRename": { + "description": "Disallow renaming import, export, and destructured assignments to the same name.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, + "noUselessSwitchCase": { + "description": "Disallow useless case in switch statements.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, + "noWith": { + "description": "Disallow with statements in non-strict contexts.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "recommended": { "description": "It enables the recommended rules for this group", "type": ["boolean", "null"] @@ -247,6 +352,27 @@ { "type": "null" } ] }, + "noGlobalObjectCalls": { + "description": "Disallow calling global object properties as functions", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, + "noInnerDeclarations": { + "description": "Disallow function and var declarations in nested blocks.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, + "noInvalidConstructorSuper": { + "description": "Prevents the incorrect use of super() inside classes. It also checks whether a call super() is missing from classes that extends other constructors.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noNewSymbol": { "description": "Disallow new operators with the Symbol object", "anyOf": [ @@ -282,6 +408,13 @@ { "type": "null" } ] }, + "noSwitchDeclarations": { + "description": "Disallow lexical declarations in switch clauses.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noUndeclaredVariables": { "description": "Prevents the usage of variables that haven't been declared inside the document", "anyOf": [ @@ -303,6 +436,13 @@ { "type": "null" } ] }, + "noUnreachableSuper": { + "description": "Ensures the super() constructor is called exactly once on every code path in a class constructor before this is accessed if the class has a superclass", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noUnsafeFinally": { "description": "Disallow control flow statements in finally blocks.", "anyOf": [ @@ -310,6 +450,20 @@ { "type": "null" } ] }, + "noUnsafeOptionalChaining": { + "description": "Disallow the use of optional chaining in contexts where the undefined value is not allowed.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, + "noUnusedLabels": { + "description": "Disallow unused labels.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noUnusedVariables": { "description": "Disallow unused variables.", "anyOf": [ @@ -341,6 +495,13 @@ { "$ref": "#/definitions/RuleConfiguration" }, { "type": "null" } ] + }, + "useYield": { + "description": "Require generator functions to contain yield.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] } } }, @@ -431,354 +592,137 @@ { "type": "null" } ] }, - "quoteStyle": { - "description": "The style for quotes. Defaults to double.", - "default": null, - "anyOf": [{ "$ref": "#/definitions/QuoteStyle" }, { "type": "null" }] - }, - "semicolons": { - "description": "Whether the formatter prints semicolons for all statements or only in for statements where it is necessary because of ASI.", - "default": null, - "anyOf": [{ "$ref": "#/definitions/Semicolons" }, { "type": "null" }] - }, - "trailingComma": { - "description": "Print trailing commas wherever possible in multi-line comma-separated syntactic structures. Defaults to \"all\".", - "default": null, - "anyOf": [ - { "$ref": "#/definitions/TrailingComma" }, - { "type": "null" } - ] - } - }, - "additionalProperties": false - }, - "JavascriptOrganizeImports": { - "type": "object", - "additionalProperties": false - }, - "LineWidth": { - "description": "Validated value for the `line_width` formatter options\n\nThe allowed range of values is 1..=320", - "type": "integer", - "format": "uint16", - "minimum": 0.0 - }, - "LinterConfiguration": { - "type": "object", - "properties": { - "enabled": { - "description": "if `false`, it disables the feature and the linter won't be executed. `true` by default", - "default": true, - "type": ["boolean", "null"] - }, - "ignore": { - "description": "A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.", - "anyOf": [{ "$ref": "#/definitions/StringSet" }, { "type": "null" }] - }, - "rules": { - "description": "List of rules", - "default": { "recommended": true }, - "anyOf": [{ "$ref": "#/definitions/Rules" }, { "type": "null" }] - } - }, - "additionalProperties": false - }, - "Nursery": { - "description": "A list of rules that belong to this group", - "type": "object", - "properties": { - "all": { - "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" } - ] - }, - "noAriaUnsupportedElements": { - "description": "Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noAssignInExpressions": { - "description": "Disallow assignments in expressions.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noBannedTypes": { - "description": "Disallow certain types.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noClassAssign": { - "description": "Disallow reassigning class members.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noCommaOperator": { - "description": "Disallow comma operator.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noConfusingArrow": { - "description": "Disallow arrow functions where they could be confused with comparisons.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noConfusingLabels": { - "description": "Disallow labeled statements that are not loops.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noConsoleLog": { - "description": "Disallow the use of console.log", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noConstantCondition": { - "description": "Disallow constant expressions in conditions", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noDuplicateCase": { - "description": "Disallow duplicate case labels. If a switch statement has duplicate test expressions in case clauses, it is likely that a programmer copied a case clause but forgot to change the test expression.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noDuplicateClassMembers": { - "description": "Disallow duplicate class members.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noDuplicateJsxProps": { - "description": "Prevents JSX properties to be assigned multiple times.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noExtraLabels": { - "description": "Disallow unnecessary labels.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noExtraSemicolons": { - "description": "Typing mistakes and misunderstandings about where semicolons are required can lead to semicolons that are unnecessary. While not technically an error, extra semicolons can cause confusion when reading code.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noForEach": { - "description": "Prefer for...of statement instead of Array.forEach.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noGlobalObjectCalls": { - "description": "Disallow calling global object properties as functions", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noInferrableTypes": { - "description": "Disallow type annotations for variables, parameters, and class properties initialized with a literal expression.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noInnerDeclarations": { - "description": "Disallow function and var declarations in nested blocks.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noInvalidConstructorSuper": { - "description": "Prevents the incorrect use of super() inside classes. It also checks whether a call super() is missing from classes that extends other constructors.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noNamespace": { - "description": "Disallow the use of TypeScript's namespaces.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noNoninteractiveElementToInteractiveRole": { - "description": "Enforce that interactive ARIA roles are not assigned to non-interactive HTML elements.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noNoninteractiveTabindex": { - "description": "Enforce that tabIndex is not assigned to non-interactive HTML elements.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noParameterAssign": { - "description": "Disallow reassigning function parameters.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noParameterProperties": { - "description": "Disallow the use of parameter properties in class constructors.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noPrototypeBuiltins": { - "description": "Disallow direct use of Object.prototype builtins.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noRedeclare": { - "description": "Disallow variable, function, class, and type redeclarations in the same scope.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noRedundantAlt": { - "description": "Enforce img alt prop does not contain the word \"image\", \"picture\", or \"photo\".", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noRedundantRoles": { - "description": "Enforce explicit role property is not the same as implicit/default role property on an element.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noRestrictedGlobals": { - "description": "This rule allows you to specify global variable names that you don’t want to use in your application.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "noSelfAssign": { - "description": "Disallow assignments where both sides are exactly the same.", + "quoteStyle": { + "description": "The style for quotes. Defaults to double.", + "default": null, + "anyOf": [{ "$ref": "#/definitions/QuoteStyle" }, { "type": "null" }] + }, + "semicolons": { + "description": "Whether the formatter prints semicolons for all statements or only in for statements where it is necessary because of ASI.", + "default": null, + "anyOf": [{ "$ref": "#/definitions/Semicolons" }, { "type": "null" }] + }, + "trailingComma": { + "description": "Print trailing commas wherever possible in multi-line comma-separated syntactic structures. Defaults to \"all\".", + "default": null, "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, + { "$ref": "#/definitions/TrailingComma" }, { "type": "null" } ] + } + }, + "additionalProperties": false + }, + "JavascriptOrganizeImports": { + "type": "object", + "additionalProperties": false + }, + "LineWidth": { + "description": "Validated value for the `line_width` formatter options\n\nThe allowed range of values is 1..=320", + "type": "integer", + "format": "uint16", + "minimum": 0.0 + }, + "LinterConfiguration": { + "type": "object", + "properties": { + "enabled": { + "description": "if `false`, it disables the feature and the linter won't be executed. `true` by default", + "default": true, + "type": ["boolean", "null"] }, - "noSelfCompare": { - "description": "Disallow comparisons where both sides are exactly the same.", + "ignore": { + "description": "A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.", + "anyOf": [{ "$ref": "#/definitions/StringSet" }, { "type": "null" }] + }, + "rules": { + "description": "List of rules", + "default": { "recommended": true }, + "anyOf": [{ "$ref": "#/definitions/Rules" }, { "type": "null" }] + } + }, + "additionalProperties": false + }, + "Nursery": { + "description": "A list of rules that belong to this group", + "type": "object", + "properties": { + "all": { + "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" } ] }, - "noSvgWithoutTitle": { - "description": "Enforces the usage of the title element for the svg element.", + "noAriaUnsupportedElements": { + "description": "Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.", "anyOf": [ { "$ref": "#/definitions/RuleConfiguration" }, { "type": "null" } ] }, - "noSwitchDeclarations": { - "description": "Disallow lexical declarations in switch clauses.", + "noBannedTypes": { + "description": "Disallow certain types.", "anyOf": [ { "$ref": "#/definitions/RuleConfiguration" }, { "type": "null" } ] }, - "noUnreachableSuper": { - "description": "Ensures the super() constructor is called exactly once on every code path in a class constructor before this is accessed if the class has a superclass", + "noConfusingArrow": { + "description": "Disallow arrow functions where they could be confused with comparisons.", "anyOf": [ { "$ref": "#/definitions/RuleConfiguration" }, { "type": "null" } ] }, - "noUnsafeOptionalChaining": { - "description": "Disallow the use of optional chaining in contexts where the undefined value is not allowed.", + "noConsoleLog": { + "description": "Disallow the use of console.log", "anyOf": [ { "$ref": "#/definitions/RuleConfiguration" }, { "type": "null" } ] }, - "noUnusedLabels": { - "description": "Disallow unused labels.", + "noConstantCondition": { + "description": "Disallow constant expressions in conditions", "anyOf": [ { "$ref": "#/definitions/RuleConfiguration" }, { "type": "null" } ] }, - "noUselessCatch": { - "description": "Disallow unnecessary catch clauses.", + "noDuplicateJsxProps": { + "description": "Prevents JSX properties to be assigned multiple times.", "anyOf": [ { "$ref": "#/definitions/RuleConfiguration" }, { "type": "null" } ] }, - "noUselessConstructor": { - "description": "Disallow unnecessary constructors.", + "noForEach": { + "description": "Prefer for...of statement instead of Array.forEach.", "anyOf": [ { "$ref": "#/definitions/RuleConfiguration" }, { "type": "null" } ] }, - "noUselessRename": { - "description": "Disallow renaming import, export, and destructured assignments to the same name.", + "noNoninteractiveTabindex": { + "description": "Enforce that tabIndex is not assigned to non-interactive HTML elements.", "anyOf": [ { "$ref": "#/definitions/RuleConfiguration" }, { "type": "null" } ] }, - "noUselessSwitchCase": { - "description": "Disallow useless case in switch statements.", + "noRedundantRoles": { + "description": "Enforce explicit role property is not the same as implicit/default role property on an element.", "anyOf": [ { "$ref": "#/definitions/RuleConfiguration" }, { "type": "null" } ] }, - "noWith": { - "description": "Disallow with statements in non-strict contexts.", + "noSelfAssign": { + "description": "Disallow assignments where both sides are exactly the same.", "anyOf": [ { "$ref": "#/definitions/RuleConfiguration" }, { "type": "null" } @@ -795,13 +739,6 @@ { "type": "null" } ] }, - "useAriaPropsForRole": { - "description": "Enforce that elements with ARIA roles must have all required ARIA attributes for that role.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, "useCamelCase": { "description": "Enforce camel case naming convention.", "anyOf": [ @@ -837,13 +774,6 @@ { "type": "null" } ] }, - "useIframeTitle": { - "description": "Enforces the usage of the attribute title for the element iframe", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, "useIsNan": { "description": "Require calls to isNaN() when checking for NaN.", "anyOf": [ @@ -864,41 +794,6 @@ { "$ref": "#/definitions/RuleConfiguration" }, { "type": "null" } ] - }, - "useMediaCaption": { - "description": "Enforces that audio and video elements must have a track for captions.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "useNamespaceKeyword": { - "description": "Require using the namespace keyword over the module keyword to declare TypeScript namespaces.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "useValidAriaProps": { - "description": "Ensures that ARIA properties aria-* are all valid.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "useValidLang": { - "description": "Ensure that the attribute passed to the lang attribute is a correct ISO language and/or country.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] - }, - "useYield": { - "description": "Require generator functions to contain yield.", - "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, - { "type": "null" } - ] } } }, @@ -1052,6 +947,13 @@ { "type": "null" } ] }, + "noCommaOperator": { + "description": "Disallow comma operator.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noImplicitBoolean": { "description": "Disallow implicit true values on JSX boolean attributes", "anyOf": [ @@ -1059,6 +961,20 @@ { "type": "null" } ] }, + "noInferrableTypes": { + "description": "Disallow type annotations for variables, parameters, and class properties initialized with a literal expression.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, + "noNamespace": { + "description": "Disallow the use of TypeScript's namespaces.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noNegationElse": { "description": "Disallow negation in the condition of an if statement if it has an else clause", "anyOf": [ @@ -1073,6 +989,27 @@ { "type": "null" } ] }, + "noParameterAssign": { + "description": "Disallow reassigning function parameters.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, + "noParameterProperties": { + "description": "Disallow the use of parameter properties in class constructors.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, + "noRestrictedGlobals": { + "description": "This rule allows you to specify global variable names that you don’t want to use in your application.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noShoutyConstants": { "description": "Disallow the use of constants which its value is the upper-case version of its name.", "anyOf": [ @@ -1206,6 +1143,13 @@ { "type": "null" } ] }, + "noAssignInExpressions": { + "description": "Disallow assignments in expressions.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noAsyncPromiseExecutor": { "description": "Disallows using an async function as a Promise executor.", "anyOf": [ @@ -1220,6 +1164,13 @@ { "type": "null" } ] }, + "noClassAssign": { + "description": "Disallow reassigning class members.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noCommentText": { "description": "Prevent comments from being inserted as text nodes", "anyOf": [ @@ -1234,6 +1185,13 @@ { "type": "null" } ] }, + "noConfusingLabels": { + "description": "Disallow labeled statements that are not loops.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noConstEnum": { "description": "Disallow TypeScript const enum", "anyOf": [ @@ -1255,6 +1213,20 @@ { "type": "null" } ] }, + "noDuplicateCase": { + "description": "Disallow duplicate case labels. If a switch statement has duplicate test expressions in case clauses, it is likely that a programmer copied a case clause but forgot to change the test expression.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, + "noDuplicateClassMembers": { + "description": "Disallow duplicate class members.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noDuplicateObjectKeys": { "description": "Prevents object literals having more than one property declaration for the same name. If an object property with the same name is defined multiple times (except when combining a getter with a setter), only the last definition makes it into the object and previous definitions are ignored, which is likely a mistake.", "anyOf": [ @@ -1311,6 +1283,20 @@ { "type": "null" } ] }, + "noPrototypeBuiltins": { + "description": "Disallow direct use of Object.prototype builtins.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, + "noRedeclare": { + "description": "Disallow variable, function, class, and type redeclarations in the same scope.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noRedundantUseStrict": { "description": "Prevents from having redundant \"use strict\".", "anyOf": [ @@ -1318,6 +1304,13 @@ { "type": "null" } ] }, + "noSelfCompare": { + "description": "Disallow comparisons where both sides are exactly the same.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noShadowRestrictedNames": { "description": "Disallow identifiers from shadowing restricted names.", "anyOf": [ @@ -1350,6 +1343,13 @@ { "type": "null" } ] }, + "useNamespaceKeyword": { + "description": "Require using the namespace keyword over the module keyword to declare TypeScript namespaces.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "useValidTypeof": { "description": "This rule verifies the result of typeof $expr unary expressions is being compared to valid values, either string literals containing valid type names or other typeof expressions", "anyOf": [ diff --git a/website/src/pages/lint/rules/index.mdx b/website/src/pages/lint/rules/index.mdx index ef5807a2c62..91459620118 100644 --- a/website/src/pages/lint/rules/index.mdx +++ b/website/src/pages/lint/rules/index.mdx @@ -49,6 +49,13 @@ Enforces that no distracting elements are used. The scope prop should be used only on <th> elements.
+

+ noNoninteractiveElementToInteractiveRole + recommended +

+Enforce that interactive ARIA roles are not assigned to non-interactive HTML elements. +
+

noPositiveTabindex recommended @@ -56,6 +63,20 @@ The scope prop should be used only on <th> elements. Prevent the usage of positive integers on tabIndex property

+

+ noRedundantAlt + recommended +

+Enforce img alt prop does not contain the word "image", "picture", or "photo". +
+
+

+ noSvgWithoutTitle + recommended +

+Enforces the usage of the title element for the svg element. +
+

useAltText recommended @@ -70,6 +91,13 @@ Enforce that all elements that require alternative text have meaningful informat Enforce that anchors have content and that the content is accessible to screen readers.

+

+ useAriaPropsForRole + recommended +

+Enforce that elements with ARIA roles must have all required ARIA attributes for that role. +
+

useButtonType recommended @@ -84,6 +112,13 @@ Enforces the usage of the attribute type for the element butt Enforce that html element has lang attribute.

+

+ useIframeTitle + recommended +

+Enforces the usage of the attribute title for the element iframe +
+

useKeyWithClickEvents recommended @@ -98,12 +133,33 @@ Enforce onClick is accompanied by at least one of the following: onKeyUponMouseOver / onMouseOut are accompanied by onFocus / onBlur.

+

+ useMediaCaption + recommended +

+Enforces that audio and video elements must have a track for captions. +
+

useValidAnchor recommended

Enforce that all anchors are valid, and they are navigable elements.
+
+

+ useValidAriaProps + recommended +

+Ensures that ARIA properties aria-* are all valid. +
+
+

+ useValidLang + recommended +

+Ensure that the attribute passed to the lang attribute is a correct ISO language and/or country. +
@@ -119,6 +175,14 @@ Rules that focus on inspecting complex code that could be simplified. Disallow unnecessary boolean casts
+

+ noExtraSemicolon + recommended +

+Typing mistakes and misunderstandings about where semicolons are required can lead to semicolons that are unnecessary. +While not technically an error, extra semicolons can cause confusion when reading code. +
+

noMultipleSpacesInRegularExpressionLiterals recommended @@ -126,12 +190,54 @@ Disallow unnecessary boolean casts Disallow unclear usage of multiple space characters in regular expression literals

+

+ noUselessCatch + recommended +

+Disallow unnecessary catch clauses. +
+
+

+ noUselessConstructor + recommended +

+Disallow unnecessary constructors. +
+

noUselessFragments

Disallow unnecessary fragments
+

+ noUselessLabel + recommended +

+Disallow unnecessary labels. +
+
+

+ noUselessRename + recommended +

+Disallow renaming import, export, and destructured assignments to the same name. +
+
+

+ noUselessSwitchCase + recommended +

+Disallow useless case in switch statements. +
+
+

+ noWith + recommended +

+Disallow with statements in non-strict contexts. +
+

useFlatMap recommended @@ -187,6 +293,28 @@ Disallow returning a value from a constructor. Disallows empty destructuring patterns.

+

+ noGlobalObjectCalls + recommended +

+Disallow calling global object properties as functions +
+
+

+ noInnerDeclarations + recommended +

+Disallow function and var declarations in nested blocks. +
+
+

+ noInvalidConstructorSuper + recommended +

+Prevents the incorrect use of super() inside classes. +It also checks whether a call super() is missing from classes that extends other constructors. +
+

noNewSymbol recommended @@ -222,6 +350,13 @@ Disallow returning a value from a setter Disallow comparison of expressions modifying the string case with non-compliant value.

+

+ noSwitchDeclarations + recommended +

+Disallow lexical declarations in switch clauses. +
+

noUndeclaredVariables

@@ -242,6 +377,15 @@ Avoid using unnecessary continue. Disallow unreachable code
+

+ noUnreachableSuper + recommended +

+Ensures the super() constructor is called exactly once on every code +path in a class constructor before this is accessed if the class has +a superclass +
+

noUnsafeFinally recommended @@ -249,6 +393,20 @@ Disallow unreachable code Disallow control flow statements in finally blocks.

+

+ noUnsafeOptionalChaining + recommended +

+Disallow the use of optional chaining in contexts where the undefined value is not allowed. +
+
+

+ noUnusedLabels + recommended +

+Disallow unused labels. +
+

noUnusedVariables

@@ -275,6 +433,13 @@ Disallow returning a value from a function with the return type 'void' Enforce "for" loop update clause moving the counter in the right direction.
+
+

+ useYield + recommended +

+Require generator functions to contain yield. +
@@ -325,12 +490,32 @@ Rules enforcing a consistent and idiomatic way of writing your code. Disallow the use of arguments
+

+ noCommaOperator + recommended +

+Disallow comma operator. +
+

noImplicitBoolean

Disallow implicit true values on JSX boolean attributes
+

+ noInferrableTypes + recommended +

+Disallow type annotations for variables, parameters, and class properties initialized with a literal expression. +
+
+

+ noNamespace +

+Disallow the use of TypeScript's namespaces. +
+

noNegationElse

@@ -344,6 +529,25 @@ Disallow negation in the condition of an if statement if it has an Disallow non-null assertions using the ! postfix operator.
+

+ noParameterAssign + recommended +

+Disallow reassigning function parameters. +
+
+

+ noParameterProperties +

+Disallow the use of parameter properties in class constructors. +
+
+

+ noRestrictedGlobals +

+This rule allows you to specify global variable names that you don’t want to use in your application. +
+

noShoutyConstants

@@ -467,6 +671,13 @@ Rules that detect code that is likely to be incorrect or useless. Discourage the usage of Array index in keys.
+

+ noAssignInExpressions + recommended +

+Disallow assignments in expressions. +
+

noAsyncPromiseExecutor recommended @@ -481,6 +692,13 @@ Disallows using an async function as a Promise executor. Disallow reassigning exceptions in catch clauses.

+

+ noClassAssign + recommended +

+Disallow reassigning class members. +
+

noCommentText recommended @@ -495,6 +713,13 @@ Prevent comments from being inserted as text nodes Disallow comparing against -0

+

+ noConfusingLabels + recommended +

+Disallow labeled statements that are not loops. +
+

noConstEnum recommended @@ -516,6 +741,21 @@ Disallow the use of debugger Require the use of === and !==

+

+ noDuplicateCase + recommended +

+Disallow duplicate case labels. +If a switch statement has duplicate test expressions in case clauses, it is likely that a programmer copied a case clause but forgot to change the test expression. +
+
+

+ noDuplicateClassMembers + recommended +

+Disallow duplicate class members. +
+

noDuplicateObjectKeys recommended @@ -573,12 +813,33 @@ Disallow assigning to imported bindings Disallow labels that share a name with a variable

+

+ noPrototypeBuiltins + recommended +

+Disallow direct use of Object.prototype builtins. +
+
+

+ noRedeclare + recommended +

+Disallow variable, function, class, and type redeclarations in the same scope. +
+

noRedundantUseStrict

Prevents from having redundant "use strict".
+

+ noSelfCompare + recommended +

+Disallow comparisons where both sides are exactly the same. +
+

noShadowRestrictedNames recommended @@ -607,6 +868,13 @@ Disallow using unsafe negation. Enforce default clauses in switch statements to be last

+

+ useNamespaceKeyword + recommended +

+Require using the namespace keyword over the module keyword to declare TypeScript namespaces. +
+

useValidTypeof recommended @@ -642,42 +910,18 @@ Disallow the use of spread (...) syntax on accumulators. Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.

-

- noAssignInExpressions -

-Disallow assignments in expressions. -
-

noBannedTypes

Disallow certain types.
-

- noClassAssign -

-Disallow reassigning class members. -
-
-

- noCommaOperator -

-Disallow comma operator. -
-

noConfusingArrow

Disallow arrow functions where they could be confused with comparisons.
-

- noConfusingLabels -

-Disallow labeled statements that are not loops. -
-

noConsoleLog

@@ -690,215 +934,42 @@ Disallow the use of console.log Disallow constant expressions in conditions
-

- noDuplicateCase -

-Disallow duplicate case labels. -If a switch statement has duplicate test expressions in case clauses, it is likely that a programmer copied a case clause but forgot to change the test expression. -
-
-

- noDuplicateClassMembers -

-Disallow duplicate class members. -
-

noDuplicateJsxProps

Prevents JSX properties to be assigned multiple times.
-

- noExtraLabels -

-Disallow unnecessary labels. -
-
-

- noExtraSemicolons -

-Typing mistakes and misunderstandings about where semicolons are required can lead to semicolons that are unnecessary. -While not technically an error, extra semicolons can cause confusion when reading code. -
-

noForEach

Prefer for...of statement instead of Array.forEach.
-

- noGlobalObjectCalls -

-Disallow calling global object properties as functions -
-
-

- noInferrableTypes -

-Disallow type annotations for variables, parameters, and class properties initialized with a literal expression. -
-
-

- noInnerDeclarations -

-Disallow function and var declarations in nested blocks. -
-
-

- noInvalidConstructorSuper -

-Prevents the incorrect use of super() inside classes. -It also checks whether a call super() is missing from classes that extends other constructors. -
-
-

- noNamespace -

-Disallow the use of TypeScript's namespaces. -
-
-

- noNoninteractiveElementToInteractiveRole -

-Enforce that interactive ARIA roles are not assigned to non-interactive HTML elements. -
-

noNoninteractiveTabindex

Enforce that tabIndex is not assigned to non-interactive HTML elements.
-

- noParameterAssign -

-Disallow reassigning function parameters. -
-
-

- noParameterProperties -

-Disallow the use of parameter properties in class constructors. -
-
-

- noPrototypeBuiltins -

-Disallow direct use of Object.prototype builtins. -
-
-

- noRedeclare -

-Disallow variable, function, class, and type redeclarations in the same scope. -
-
-

- noRedundantAlt -

-Enforce img alt prop does not contain the word "image", "picture", or "photo". -
-

noRedundantRoles

Enforce explicit role property is not the same as implicit/default role property on an element.
-

- noRestrictedGlobals -

-This rule allows you to specify global variable names that you don’t want to use in your application. -
-

noSelfAssign

Disallow assignments where both sides are exactly the same.
-

- noSelfCompare -

-Disallow comparisons where both sides are exactly the same. -
-
-

- noSvgWithoutTitle -

-Enforces the usage of the title element for the svg element. -
-
-

- noSwitchDeclarations -

-Disallow lexical declarations in switch clauses. -
-
-

- noUnreachableSuper -

-Ensures the super() constructor is called exactly once on every code -path in a class constructor before this is accessed if the class has -a superclass -
-
-

- noUnsafeOptionalChaining -

-Disallow the use of optional chaining in contexts where the undefined value is not allowed. -
-
-

- noUnusedLabels -

-Disallow unused labels. -
-
-

- noUselessCatch -

-Disallow unnecessary catch clauses. -
-
-

- noUselessConstructor -

-Disallow unnecessary constructors. -
-
-

- noUselessRename -

-Disallow renaming import, export, and destructured assignments to the same name. -
-
-

- noUselessSwitchCase -

-Disallow useless case in switch statements. -
-
-

- noWith -

-Disallow with statements in non-strict contexts. -
-

useAriaPropTypes

Enforce that ARIA state and property values are valid.
-

- useAriaPropsForRole -

-Enforce that elements with ARIA roles must have all required ARIA attributes for that role. -
-

useCamelCase

@@ -931,12 +1002,6 @@ Enforce that all React hooks are being called from the Top Level component functions.
-

- useIframeTitle -

-Enforces the usage of the attribute title for the element iframe -
-

useIsNan

@@ -954,35 +1019,5 @@ Require all enum members to be literal values. Enforce the usage of a literal access to properties over computed property access.
-
-

- useMediaCaption -

-Enforces that audio and video elements must have a track for captions. -
-
-

- useNamespaceKeyword -

-Require using the namespace keyword over the module keyword to declare TypeScript namespaces. -
-
-

- useValidAriaProps -

-Ensures that ARIA properties aria-* are all valid. -
-
-

- useValidLang -

-Ensure that the attribute passed to the lang attribute is a correct ISO language and/or country. -
-
-

- useYield -

-Require generator functions to contain yield. -
diff --git a/website/src/pages/lint/rules/noAccumulatingSpread.md b/website/src/pages/lint/rules/noAccumulatingSpread.md index 438545f5ef0..afad174bbc1 100644 --- a/website/src/pages/lint/rules/noAccumulatingSpread.md +++ b/website/src/pages/lint/rules/noAccumulatingSpread.md @@ -3,7 +3,7 @@ title: Lint Rule noAccumulatingSpread parent: lint/rules/index --- -# noAccumulatingSpread (since vnext) +# noAccumulatingSpread (since v12.1.0) Disallow the use of spread (`...`) syntax on accumulators. diff --git a/website/src/pages/lint/rules/noAriaUnsupportedElements.md b/website/src/pages/lint/rules/noAriaUnsupportedElements.md index 9bab065d4ce..599cdc1904c 100644 --- a/website/src/pages/lint/rules/noAriaUnsupportedElements.md +++ b/website/src/pages/lint/rules/noAriaUnsupportedElements.md @@ -3,7 +3,7 @@ title: Lint Rule noAriaUnsupportedElements parent: lint/rules/index --- -# noAriaUnsupportedElements (since vnext) +# noAriaUnsupportedElements (since v12.1.0) Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes. diff --git a/website/src/pages/lint/rules/noAssignInExpressions.md b/website/src/pages/lint/rules/noAssignInExpressions.md index 7b5077908c1..9505cf2e5fc 100644 --- a/website/src/pages/lint/rules/noAssignInExpressions.md +++ b/website/src/pages/lint/rules/noAssignInExpressions.md @@ -5,6 +5,8 @@ parent: lint/rules/index # noAssignInExpressions (since v12.0.0) +> This rule is recommended by Rome. + Disallow assignments in expressions. In expressions, it is common to mistype a comparison operator (such as `==`) as an assignment operator (such as `=`). @@ -20,7 +22,7 @@ let a, b; a = (b = 1) + 1; ``` -
nursery/noAssignInExpressions.js:2:6 lint/nursery/noAssignInExpressions  FIXABLE  ━━━━━━━━━━━━━━━━━━
+
suspicious/noAssignInExpressions.js:2:6 lint/suspicious/noAssignInExpressions  FIXABLE  ━━━━━━━━━━━━
 
    The assignment should not be in an expression.
   
@@ -44,7 +46,7 @@ if (a = 1) {
 }
 ```
 
-
nursery/noAssignInExpressions.js:2:5 lint/nursery/noAssignInExpressions  FIXABLE  ━━━━━━━━━━━━━━━━━━
+
suspicious/noAssignInExpressions.js:2:5 lint/suspicious/noAssignInExpressions  FIXABLE  ━━━━━━━━━━━━
 
    The assignment should not be in an expression.
   
@@ -69,7 +71,7 @@ function f(a) {
 }
 ```
 
-
nursery/noAssignInExpressions.js:2:12 lint/nursery/noAssignInExpressions  FIXABLE  ━━━━━━━━━━━━━━━━━
+
suspicious/noAssignInExpressions.js:2:12 lint/suspicious/noAssignInExpressions  FIXABLE  ━━━━━━━━━━━
 
    The assignment should not be in an expression.
   
diff --git a/website/src/pages/lint/rules/noClassAssign.md b/website/src/pages/lint/rules/noClassAssign.md
index fba10b8bc51..0eada5e0ab2 100644
--- a/website/src/pages/lint/rules/noClassAssign.md
+++ b/website/src/pages/lint/rules/noClassAssign.md
@@ -5,6 +5,8 @@ parent: lint/rules/index
 
 # noClassAssign (since v12.0.0)
 
+> This rule is recommended by Rome.
+
 Disallow reassigning class members.
 
 A class declaration creates a variable that we can modify, however, the modification is a mistake in most cases.
@@ -18,7 +20,7 @@ class A {}
 A = 0;
 ```
 
-
nursery/noClassAssign.js:2:1 lint/nursery/noClassAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
suspicious/noClassAssign.js:2:1 lint/suspicious/noClassAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    'A' is a class.
   
@@ -41,7 +43,7 @@ A = 0;
 class A {}
 ```
 
-
nursery/noClassAssign.js:1:1 lint/nursery/noClassAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
suspicious/noClassAssign.js:1:1 lint/suspicious/noClassAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    'A' is a class.
   
@@ -67,7 +69,7 @@ class A {
 }
 ```
 
-
nursery/noClassAssign.js:3:3 lint/nursery/noClassAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
suspicious/noClassAssign.js:3:3 lint/suspicious/noClassAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    'A' is a class.
   
@@ -96,7 +98,7 @@ let A = class A {
 }
 ```
 
-
nursery/noClassAssign.js:3:3 lint/nursery/noClassAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
suspicious/noClassAssign.js:3:3 lint/suspicious/noClassAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    'A' is a class.
   
diff --git a/website/src/pages/lint/rules/noCommaOperator.md b/website/src/pages/lint/rules/noCommaOperator.md
index 28af9a0417d..44fbc28a6c4 100644
--- a/website/src/pages/lint/rules/noCommaOperator.md
+++ b/website/src/pages/lint/rules/noCommaOperator.md
@@ -5,6 +5,8 @@ parent: lint/rules/index
 
 # noCommaOperator (since v12.0.0)
 
+> This rule is recommended by Rome.
+
 Disallow comma operator.
 
 The comma operator includes multiple expressions where only one is expected.
@@ -23,7 +25,7 @@ Source: https://eslint.org/docs/latest/rules/no-sequences
 const foo = doSomething(), 0;
 ```
 
-
nursery/noCommaOperator.js:1:28 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
style/noCommaOperator.js:1:28 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    expected an identifier, an array pattern, or an object pattern but instead found '0'
   
@@ -43,7 +45,7 @@ const foo = doSomething(), 0;
 for (; doSomething(), !!test; ) {}
 ```
 
-
nursery/noCommaOperator.js:1:21 lint/nursery/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
style/noCommaOperator.js:1:21 lint/style/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    The comma operator is disallowed.
   
@@ -61,7 +63,7 @@ let a, b;
 a = 1, b = 2;
 ```
 
-
nursery/noCommaOperator.js:3:6 lint/nursery/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
style/noCommaOperator.js:3:6 lint/style/noCommaOperator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    The comma operator is disallowed.
   
diff --git a/website/src/pages/lint/rules/noConfusingArrow.md b/website/src/pages/lint/rules/noConfusingArrow.md
index 716764779cf..68524534494 100644
--- a/website/src/pages/lint/rules/noConfusingArrow.md
+++ b/website/src/pages/lint/rules/noConfusingArrow.md
@@ -3,7 +3,7 @@ title: Lint Rule noConfusingArrow
 parent: lint/rules/index
 ---
 
-# noConfusingArrow (since vnext)
+# noConfusingArrow (since v12.1.0)
 
 Disallow arrow functions where they could be confused with comparisons.
 
diff --git a/website/src/pages/lint/rules/noConfusingLabels.md b/website/src/pages/lint/rules/noConfusingLabels.md
index f363f6ce98f..b64055b62e4 100644
--- a/website/src/pages/lint/rules/noConfusingLabels.md
+++ b/website/src/pages/lint/rules/noConfusingLabels.md
@@ -5,6 +5,8 @@ parent: lint/rules/index
 
 # noConfusingLabels (since v12.0.0)
 
+> This rule is recommended by Rome.
+
 Disallow labeled statements that are not loops.
 
 Labeled statements in JavaScript are used in conjunction with `break` and `continue` to control flow around multiple loops.
@@ -20,7 +22,7 @@ Source: https://eslint.org/docs/latest/rules/no-labels
 label: f();
 ```
 
-
nursery/noConfusingLabels.js:1:1 lint/nursery/noConfusingLabels ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
suspicious/noConfusingLabels.js:1:1 lint/suspicious/noConfusingLabels ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    Unexpected label.
   
@@ -40,7 +42,7 @@ label: {
 }
 ```
 
-
nursery/noConfusingLabels.js:1:1 lint/nursery/noConfusingLabels ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
suspicious/noConfusingLabels.js:1:1 lint/suspicious/noConfusingLabels ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    Unexpected label.
   
@@ -61,7 +63,7 @@ label: if (a) {
 }
 ```
 
-
nursery/noConfusingLabels.js:1:1 lint/nursery/noConfusingLabels ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
suspicious/noConfusingLabels.js:1:1 lint/suspicious/noConfusingLabels ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    Unexpected label.
   
@@ -82,7 +84,7 @@ label: switch (a) {
 }
 ```
 
-
nursery/noConfusingLabels.js:1:1 lint/nursery/noConfusingLabels ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
suspicious/noConfusingLabels.js:1:1 lint/suspicious/noConfusingLabels ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    Unexpected label.
   
diff --git a/website/src/pages/lint/rules/noConsoleLog.md b/website/src/pages/lint/rules/noConsoleLog.md
index 52e21aae5e2..3082b5ab19e 100644
--- a/website/src/pages/lint/rules/noConsoleLog.md
+++ b/website/src/pages/lint/rules/noConsoleLog.md
@@ -3,7 +3,7 @@ title: Lint Rule noConsoleLog
 parent: lint/rules/index
 ---
 
-# noConsoleLog (since vnext)
+# noConsoleLog (since v12.1.0)
 
 Disallow the use of `console.log`
 
diff --git a/website/src/pages/lint/rules/noConstantCondition.md b/website/src/pages/lint/rules/noConstantCondition.md
index 6fc77a88625..af5a01f58c9 100644
--- a/website/src/pages/lint/rules/noConstantCondition.md
+++ b/website/src/pages/lint/rules/noConstantCondition.md
@@ -3,7 +3,7 @@ title: Lint Rule noConstantCondition
 parent: lint/rules/index
 ---
 
-# noConstantCondition (since vnext)
+# noConstantCondition (since v12.1.0)
 
 Disallow constant expressions in conditions
 
diff --git a/website/src/pages/lint/rules/noDuplicateCase.md b/website/src/pages/lint/rules/noDuplicateCase.md
index 311185b5a73..5491bdcbf4c 100644
--- a/website/src/pages/lint/rules/noDuplicateCase.md
+++ b/website/src/pages/lint/rules/noDuplicateCase.md
@@ -5,6 +5,8 @@ parent: lint/rules/index
 
 # noDuplicateCase (since v12.0.0)
 
+> This rule is recommended by Rome.
+
 Disallow duplicate case labels.
 If a switch statement has duplicate test expressions in case clauses, it is likely that a programmer copied a case clause but forgot to change the test expression.
 
@@ -25,7 +27,7 @@ switch (a) {
 }
 ```
 
-
nursery/noDuplicateCase.js:4:10 lint/nursery/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
suspicious/noDuplicateCase.js:4:10 lint/suspicious/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    Duplicate case label.
   
@@ -57,7 +59,7 @@ switch (a) {
 }
 ```
 
-
nursery/noDuplicateCase.js:4:10 lint/nursery/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
suspicious/noDuplicateCase.js:4:10 lint/suspicious/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    Duplicate case label.
   
@@ -89,7 +91,7 @@ switch (a) {
 }
 ```
 
-
nursery/noDuplicateCase.js:4:10 lint/nursery/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
suspicious/noDuplicateCase.js:4:10 lint/suspicious/noDuplicateCase ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    Duplicate case label.
   
diff --git a/website/src/pages/lint/rules/noDuplicateClassMembers.md b/website/src/pages/lint/rules/noDuplicateClassMembers.md
index ba61d32688b..7c851796c18 100644
--- a/website/src/pages/lint/rules/noDuplicateClassMembers.md
+++ b/website/src/pages/lint/rules/noDuplicateClassMembers.md
@@ -5,6 +5,8 @@ parent: lint/rules/index
 
 # noDuplicateClassMembers (since v12.0.0)
 
+> This rule is recommended by Rome.
+
 Disallow duplicate class members.
 
 If there are declarations of the same name among class members,
@@ -22,7 +24,7 @@ class Foo {
 }
 ```
 
-
nursery/noDuplicateClassMembers.js:3:3 lint/nursery/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━
+
suspicious/noDuplicateClassMembers.js:3:3 lint/suspicious/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━
 
    Duplicate class member name "bar"
   
@@ -42,7 +44,7 @@ class Foo {
 }
 ```
 
-
nursery/noDuplicateClassMembers.js:3:3 lint/nursery/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━
+
suspicious/noDuplicateClassMembers.js:3:3 lint/suspicious/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━
 
    Duplicate class member name "bar"
   
@@ -62,7 +64,7 @@ class Foo {
 }
 ```
 
-
nursery/noDuplicateClassMembers.js:3:3 lint/nursery/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━
+
suspicious/noDuplicateClassMembers.js:3:3 lint/suspicious/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━
 
    Duplicate class member name "bar"
   
@@ -82,7 +84,7 @@ class Foo {
 }
 ```
 
-
nursery/noDuplicateClassMembers.js:3:3 lint/nursery/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━━━━━━━
+
suspicious/noDuplicateClassMembers.js:3:3 lint/suspicious/noDuplicateClassMembers ━━━━━━━━━━━━━━━━━━
 
    Duplicate class member name "bar"
   
diff --git a/website/src/pages/lint/rules/noDuplicateJsxProps.md b/website/src/pages/lint/rules/noDuplicateJsxProps.md
index f7ef5630a11..47efaffa19b 100644
--- a/website/src/pages/lint/rules/noDuplicateJsxProps.md
+++ b/website/src/pages/lint/rules/noDuplicateJsxProps.md
@@ -3,7 +3,7 @@ title: Lint Rule noDuplicateJsxProps
 parent: lint/rules/index
 ---
 
-# noDuplicateJsxProps (since v13.0.0)
+# noDuplicateJsxProps (since v12.1.0)
 
 Prevents JSX properties to be assigned multiple times.
 
diff --git a/website/src/pages/lint/rules/noExtraSemicolons.md b/website/src/pages/lint/rules/noExtraSemicolon.md
similarity index 80%
rename from website/src/pages/lint/rules/noExtraSemicolons.md
rename to website/src/pages/lint/rules/noExtraSemicolon.md
index 72263b9dc92..1c346b4727e 100644
--- a/website/src/pages/lint/rules/noExtraSemicolons.md
+++ b/website/src/pages/lint/rules/noExtraSemicolon.md
@@ -1,9 +1,11 @@
 ---
-title: Lint Rule noExtraSemicolons
+title: Lint Rule noExtraSemicolon
 parent: lint/rules/index
 ---
 
-# noExtraSemicolons (since v12.0.0)
+# noExtraSemicolon (since v12.0.0)
+
+> This rule is recommended by Rome.
 
 Typing mistakes and misunderstandings about where semicolons are required can lead to semicolons that are unnecessary.
 While not technically an error, extra semicolons can cause confusion when reading code.
@@ -18,7 +20,7 @@ This rule disallows unnecessary semicolons.
   const x = 5;;
 ```
 
-
nursery/noExtraSemicolons.js:1:15 lint/nursery/noExtraSemicolons  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━
+
complexity/noExtraSemicolon.js:1:15 lint/complexity/noExtraSemicolon  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━
 
    Unnecessary semicolon.
   
@@ -38,7 +40,7 @@ This rule disallows unnecessary semicolons.
  }
 ```
 
-
nursery/noExtraSemicolons.js:2:19 lint/nursery/noExtraSemicolons  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━
+
complexity/noExtraSemicolon.js:2:19 lint/complexity/noExtraSemicolon  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━
 
    Unnecessary semicolon.
   
@@ -60,7 +62,7 @@ This rule disallows unnecessary semicolons.
   };
 ```
 
-
nursery/noExtraSemicolons.js:3:4 lint/nursery/noExtraSemicolons  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━
+
complexity/noExtraSemicolon.js:3:4 lint/complexity/noExtraSemicolon  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━
 
    Unnecessary semicolon.
   
@@ -90,7 +92,7 @@ This rule disallows unnecessary semicolons.
     }
 ```
 
-
nursery/noExtraSemicolons.js:2:13 lint/nursery/noExtraSemicolons  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━
+
complexity/noExtraSemicolon.js:2:13 lint/complexity/noExtraSemicolon  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━
 
    Unnecessary semicolon.
   
@@ -120,7 +122,7 @@ This rule disallows unnecessary semicolons.
    }
 ```
 
-
nursery/noExtraSemicolons.js:6:7 lint/nursery/noExtraSemicolons  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━
+
complexity/noExtraSemicolon.js:6:7 lint/complexity/noExtraSemicolon  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━
 
    Unnecessary semicolon.
   
@@ -151,7 +153,7 @@ This rule disallows unnecessary semicolons.
    }
 ```
 
-
nursery/noExtraSemicolons.js:10:7 lint/nursery/noExtraSemicolons  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━
+
complexity/noExtraSemicolon.js:10:7 lint/complexity/noExtraSemicolon  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━
 
    Unnecessary semicolon.
   
@@ -182,7 +184,7 @@ This rule disallows unnecessary semicolons.
    };
 ```
 
-
nursery/noExtraSemicolons.js:11:5 lint/nursery/noExtraSemicolons  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━
+
complexity/noExtraSemicolon.js:11:5 lint/complexity/noExtraSemicolon  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━
 
    Unnecessary semicolon.
   
diff --git a/website/src/pages/lint/rules/noForEach.md b/website/src/pages/lint/rules/noForEach.md
index a5ab4bde11c..0f6f94d883c 100644
--- a/website/src/pages/lint/rules/noForEach.md
+++ b/website/src/pages/lint/rules/noForEach.md
@@ -3,7 +3,7 @@ title: Lint Rule noForEach
 parent: lint/rules/index
 ---
 
-# noForEach (since vnext)
+# noForEach (since v12.1.0)
 
 Prefer `for...of` statement instead of `Array.forEach`.
 
diff --git a/website/src/pages/lint/rules/noGlobalObjectCalls.md b/website/src/pages/lint/rules/noGlobalObjectCalls.md
index dfa50ba4fdd..d5e8bbb6f65 100644
--- a/website/src/pages/lint/rules/noGlobalObjectCalls.md
+++ b/website/src/pages/lint/rules/noGlobalObjectCalls.md
@@ -5,6 +5,8 @@ parent: lint/rules/index
 
 # noGlobalObjectCalls (since v12.0.0)
 
+> This rule is recommended by Rome.
+
 Disallow calling global object properties as functions
 
 ECMAScript provides several global objects that are intended to be used as-is.
@@ -30,7 +32,7 @@ The Intl object does not have a [[Call]] internal method; it is not possible to
 var math = Math();
 ```
 
-
nursery/noGlobalObjectCalls.js:1:12 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
correctness/noGlobalObjectCalls.js:1:12 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━
 
    Math is not a function.
   
@@ -44,7 +46,7 @@ var math = Math();
 var newMath = new Math();
 ```
 
-
nursery/noGlobalObjectCalls.js:1:15 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
correctness/noGlobalObjectCalls.js:1:15 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━
 
    Math is not a function.
   
@@ -58,7 +60,7 @@ var newMath = new Math();
 var json = JSON();
 ```
 
-
nursery/noGlobalObjectCalls.js:1:12 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
correctness/noGlobalObjectCalls.js:1:12 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━
 
    JSON is not a function.
   
@@ -72,7 +74,7 @@ var json = JSON();
 var newJSON = new JSON();
 ```
 
-
nursery/noGlobalObjectCalls.js:1:15 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
correctness/noGlobalObjectCalls.js:1:15 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━
 
    JSON is not a function.
   
@@ -86,7 +88,7 @@ var newJSON = new JSON();
 var reflect = Reflect();
 ```
 
-
nursery/noGlobalObjectCalls.js:1:15 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
correctness/noGlobalObjectCalls.js:1:15 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━
 
    Reflect is not a function.
   
@@ -100,7 +102,7 @@ var reflect = Reflect();
 var newReflect = new Reflect();
 ```
 
-
nursery/noGlobalObjectCalls.js:1:18 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
correctness/noGlobalObjectCalls.js:1:18 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━
 
    Reflect is not a function.
   
@@ -114,7 +116,7 @@ var newReflect = new Reflect();
 var atomics = Atomics();
 ```
 
-
nursery/noGlobalObjectCalls.js:1:15 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
correctness/noGlobalObjectCalls.js:1:15 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━
 
    Atomics is not a function.
   
@@ -128,7 +130,7 @@ var atomics = Atomics();
 var newAtomics = new Atomics();
 ```
 
-
nursery/noGlobalObjectCalls.js:1:18 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
correctness/noGlobalObjectCalls.js:1:18 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━
 
    Atomics is not a function.
   
@@ -142,7 +144,7 @@ var newAtomics = new Atomics();
 var intl = Intl();
 ```
 
-
nursery/noGlobalObjectCalls.js:1:12 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
correctness/noGlobalObjectCalls.js:1:12 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━
 
    Intl is not a function.
   
@@ -156,7 +158,7 @@ var intl = Intl();
 var newIntl = new Intl();
 ```
 
-
nursery/noGlobalObjectCalls.js:1:15 lint/nursery/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
correctness/noGlobalObjectCalls.js:1:15 lint/correctness/noGlobalObjectCalls ━━━━━━━━━━━━━━━━━━━━━━━
 
    Intl is not a function.
   
diff --git a/website/src/pages/lint/rules/noInferrableTypes.md b/website/src/pages/lint/rules/noInferrableTypes.md
index 045f74de77c..1932803e0cc 100644
--- a/website/src/pages/lint/rules/noInferrableTypes.md
+++ b/website/src/pages/lint/rules/noInferrableTypes.md
@@ -5,6 +5,8 @@ parent: lint/rules/index
 
 # noInferrableTypes (since v12.0.0)
 
+> This rule is recommended by Rome.
+
 Disallow type annotations for variables, parameters, and class properties initialized with a literal expression.
 
 TypeScript is able to infer the types of parameters, properties, and variables from their default or initial values.
@@ -25,7 +27,7 @@ Source: https://typescript-eslint.io/rules/no-inferrable-types
 const variable: 1 = 1;
 ```
 
-
nursery/noInferrableTypes.js:1:15 lint/nursery/noInferrableTypes  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━
+
style/noInferrableTypes.js:1:15 lint/style/noInferrableTypes  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    This type annotation is trivially inferred from its initialization.
   
@@ -43,7 +45,7 @@ const variable: 1 = 1;
 let variable: number = 1;
 ```
 
-
nursery/noInferrableTypes.js:1:13 lint/nursery/noInferrableTypes  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━
+
style/noInferrableTypes.js:1:13 lint/style/noInferrableTypes  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    This type annotation is trivially inferred from its initialization.
   
@@ -63,7 +65,7 @@ class SomeClass {
 }
 ```
 
-
nursery/noInferrableTypes.js:2:17 lint/nursery/noInferrableTypes  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━
+
style/noInferrableTypes.js:2:17 lint/style/noInferrableTypes  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    This type annotation is trivially inferred from its initialization.
   
@@ -85,7 +87,7 @@ class SomeClass {
 }
 ```
 
-
nursery/noInferrableTypes.js:2:8 lint/nursery/noInferrableTypes  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━
+
style/noInferrableTypes.js:2:8 lint/style/noInferrableTypes  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    This type annotation is trivially inferred from its initialization.
   
@@ -105,7 +107,7 @@ class SomeClass {
 function f(param: number = 1): void {}
 ```
 
-
nursery/noInferrableTypes.js:1:17 lint/nursery/noInferrableTypes  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━
+
style/noInferrableTypes.js:1:17 lint/style/noInferrableTypes  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    This type annotation is trivially inferred from its initialization.
   
diff --git a/website/src/pages/lint/rules/noInnerDeclarations.md b/website/src/pages/lint/rules/noInnerDeclarations.md
index 0cf1e656e2c..15766eeee95 100644
--- a/website/src/pages/lint/rules/noInnerDeclarations.md
+++ b/website/src/pages/lint/rules/noInnerDeclarations.md
@@ -5,6 +5,8 @@ parent: lint/rules/index
 
 # noInnerDeclarations (since v12.0.0)
 
+> This rule is recommended by Rome.
+
 Disallow `function` and `var` declarations in nested blocks.
 
 A `function` and a `var` are accessible in the whole body of the
@@ -30,7 +32,7 @@ if (test) {
 }
 ```
 
-
nursery/noInnerDeclarations.js:2:5 lint/nursery/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
correctness/noInnerDeclarations.js:2:5 lint/correctness/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━
 
    This function should be declared at the root of the module.
   
@@ -51,7 +53,7 @@ if (test) {
 }
 ```
 
-
nursery/noInnerDeclarations.js:2:5 lint/nursery/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
correctness/noInnerDeclarations.js:2:5 lint/correctness/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━
 
    This var should be declared at the root of the module.
   
@@ -74,7 +76,7 @@ function f() {
 }
 ```
 
-
nursery/noInnerDeclarations.js:3:9 lint/nursery/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
correctness/noInnerDeclarations.js:3:9 lint/correctness/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━
 
    This function should be declared at the root of the enclosing function.
   
@@ -98,7 +100,7 @@ function f() {
 }
 ```
 
-
nursery/noInnerDeclarations.js:3:9 lint/nursery/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
correctness/noInnerDeclarations.js:3:9 lint/correctness/noInnerDeclarations ━━━━━━━━━━━━━━━━━━━━━━━━
 
    This var should be declared at the root of the enclosing function.
   
diff --git a/website/src/pages/lint/rules/noInvalidConstructorSuper.md b/website/src/pages/lint/rules/noInvalidConstructorSuper.md
index 6ab5d40b1b3..5f87a8d4f91 100644
--- a/website/src/pages/lint/rules/noInvalidConstructorSuper.md
+++ b/website/src/pages/lint/rules/noInvalidConstructorSuper.md
@@ -5,6 +5,8 @@ parent: lint/rules/index
 
 # noInvalidConstructorSuper (since v10.0.0)
 
+> This rule is recommended by Rome.
+
 Prevents the incorrect use of `super()` inside classes.
 It also checks whether a call `super()` is missing from classes that extends other constructors.
 
@@ -20,7 +22,7 @@ class A {
 }
 ```
 
-
nursery/noInvalidConstructorSuper.js:3:9 lint/nursery/noInvalidConstructorSuper ━━━━━━━━━━━━━━━━━━━━
+
correctness/noInvalidConstructorSuper.js:3:9 lint/correctness/noInvalidConstructorSuper ━━━━━━━━━━━━
 
    This class should not have a super() call. You should remove it.
   
@@ -41,7 +43,7 @@ class A extends undefined {
 }
 ```
 
-
nursery/noInvalidConstructorSuper.js:3:9 lint/nursery/noInvalidConstructorSuper ━━━━━━━━━━━━━━━━━━━━
+
correctness/noInvalidConstructorSuper.js:3:9 lint/correctness/noInvalidConstructorSuper ━━━━━━━━━━━━
 
    This class calls super(), but the class extends from a non-constructor.
   
diff --git a/website/src/pages/lint/rules/noNamespace.md b/website/src/pages/lint/rules/noNamespace.md
index 67a500ea51f..206f166431e 100644
--- a/website/src/pages/lint/rules/noNamespace.md
+++ b/website/src/pages/lint/rules/noNamespace.md
@@ -21,9 +21,9 @@ Source: https://typescript-eslint.io/rules/no-namespace
 module foo {}
 ```
 
-
nursery/noNamespace.js:1:1 lint/nursery/noNamespace ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
style/noNamespace.js:1:1 lint/style/noNamespace ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
-   TypeScript's namespaces are an oudated way to organize code.
+   TypeScript's namespaces are an oudated way to organize code.
   
   > 1 │ module foo {}
    ^^^^^^^^^^^^^
@@ -37,9 +37,9 @@ module foo {}
 declare module foo {}
 ```
 
-
nursery/noNamespace.js:1:9 lint/nursery/noNamespace ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
style/noNamespace.js:1:9 lint/style/noNamespace ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
-   TypeScript's namespaces are an oudated way to organize code.
+   TypeScript's namespaces are an oudated way to organize code.
   
   > 1 │ declare module foo {}
            ^^^^^^^^^^^^^
@@ -53,9 +53,9 @@ declare module foo {}
 namespace foo {}
 ```
 
-
nursery/noNamespace.js:1:1 lint/nursery/noNamespace ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
style/noNamespace.js:1:1 lint/style/noNamespace ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
-   TypeScript's namespaces are an oudated way to organize code.
+   TypeScript's namespaces are an oudated way to organize code.
   
   > 1 │ namespace foo {}
    ^^^^^^^^^^^^^^^^
@@ -69,9 +69,9 @@ namespace foo {}
 declare namespace foo {}
 ```
 
-
nursery/noNamespace.js:1:9 lint/nursery/noNamespace ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
style/noNamespace.js:1:9 lint/style/noNamespace ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
-   TypeScript's namespaces are an oudated way to organize code.
+   TypeScript's namespaces are an oudated way to organize code.
   
   > 1 │ declare namespace foo {}
            ^^^^^^^^^^^^^^^^
diff --git a/website/src/pages/lint/rules/noNoninteractiveElementToInteractiveRole.md b/website/src/pages/lint/rules/noNoninteractiveElementToInteractiveRole.md
index 7e9cda19755..a616826d134 100644
--- a/website/src/pages/lint/rules/noNoninteractiveElementToInteractiveRole.md
+++ b/website/src/pages/lint/rules/noNoninteractiveElementToInteractiveRole.md
@@ -5,6 +5,8 @@ parent: lint/rules/index
 
 # noNoninteractiveElementToInteractiveRole (since v12.0.0)
 
+> This rule is recommended by Rome.
+
 Enforce that interactive ARIA roles are not assigned to non-interactive HTML elements.
 
 Non-interactive HTML elements indicate _content_ and _containers_ in the user interface.
@@ -24,7 +26,7 @@ Interactive ARIA roles include `button`, `link`, `checkbox`, `menuitem`, `menuit
 

Some text

``` -
nursery/noNoninteractiveElementToInteractiveRole.js:1:5 lint/nursery/noNoninteractiveElementToInteractiveRole ━━━━━━━━━━
+
a11y/noNoninteractiveElementToInteractiveRole.js:1:5 lint/a11y/noNoninteractiveElementToInteractiveRole ━━━━━━━━━━
 
    The HTML element h1 is non-interactive and should not have an interactive role.
   
diff --git a/website/src/pages/lint/rules/noNoninteractiveTabindex.md b/website/src/pages/lint/rules/noNoninteractiveTabindex.md
index 14e42ccf9d2..b08643f778d 100644
--- a/website/src/pages/lint/rules/noNoninteractiveTabindex.md
+++ b/website/src/pages/lint/rules/noNoninteractiveTabindex.md
@@ -3,7 +3,7 @@ title: Lint Rule noNoninteractiveTabindex
 parent: lint/rules/index
 ---
 
-# noNoninteractiveTabindex (since vnext)
+# noNoninteractiveTabindex (since v12.1.0)
 
 Enforce that `tabIndex` is not assigned to non-interactive HTML elements.
 
diff --git a/website/src/pages/lint/rules/noParameterAssign.md b/website/src/pages/lint/rules/noParameterAssign.md
index 748033c5c00..2bad402deda 100644
--- a/website/src/pages/lint/rules/noParameterAssign.md
+++ b/website/src/pages/lint/rules/noParameterAssign.md
@@ -5,6 +5,8 @@ parent: lint/rules/index
 
 # noParameterAssign (since v12.0.0)
 
+> This rule is recommended by Rome.
+
 Disallow reassigning `function` parameters.
 
 Assignment to a `function` parameters can be misleading and confusing,
@@ -26,7 +28,7 @@ function f(param) {
 }
 ```
 
-
nursery/noParameterAssign.js:2:5 lint/nursery/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
style/noParameterAssign.js:2:5 lint/style/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    Reassigning a function parameter is confusing.
   
@@ -53,7 +55,7 @@ function f(param) {
 }
 ```
 
-
nursery/noParameterAssign.js:2:5 lint/nursery/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
style/noParameterAssign.js:2:5 lint/style/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    Reassigning a function parameter is confusing.
   
@@ -80,7 +82,7 @@ function f(param) {
 }
 ```
 
-
nursery/noParameterAssign.js:2:10 lint/nursery/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
style/noParameterAssign.js:2:10 lint/style/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    Reassigning a function parameter is confusing.
   
@@ -109,7 +111,7 @@ class C {
 }
 ```
 
-
nursery/noParameterAssign.js:3:9 lint/nursery/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
style/noParameterAssign.js:3:9 lint/style/noParameterAssign ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    Reassigning a function parameter is confusing.
   
diff --git a/website/src/pages/lint/rules/noParameterProperties.md b/website/src/pages/lint/rules/noParameterProperties.md
index 89b93d71829..d97da013cc9 100644
--- a/website/src/pages/lint/rules/noParameterProperties.md
+++ b/website/src/pages/lint/rules/noParameterProperties.md
@@ -24,7 +24,7 @@ class A {
 }
 ```
 
-
nursery/noParameterProperties.js:2:17 lint/nursery/noParameterProperties ━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
style/noParameterProperties.js:2:17 lint/style/noParameterProperties ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    Use a more explicit class property instead of a parameter property.
   
diff --git a/website/src/pages/lint/rules/noPrototypeBuiltins.md b/website/src/pages/lint/rules/noPrototypeBuiltins.md
index 6f6169d9ac4..c2443021b68 100644
--- a/website/src/pages/lint/rules/noPrototypeBuiltins.md
+++ b/website/src/pages/lint/rules/noPrototypeBuiltins.md
@@ -5,6 +5,8 @@ parent: lint/rules/index
 
 # noPrototypeBuiltins (since v12.0.0)
 
+> This rule is recommended by Rome.
+
 Disallow direct use of `Object.prototype` builtins.
 
 ECMAScript 5.1 added `Object.create` which allows the creation of an object with a custom prototype.
@@ -24,9 +26,9 @@ As for the `hasOwn` method, `foo.hasOwn("bar")` should be replaced with `Object.
 var invalid = foo.hasOwnProperty("bar");
 ```
 
-
nursery/noPrototypeBuiltins.js:1:19 lint/nursery/noPrototypeBuiltins ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
suspicious/noPrototypeBuiltins.js:1:19 lint/suspicious/noPrototypeBuiltins ━━━━━━━━━━━━━━━━━━━━━━━━━
 
-   Do not access Object.prototype method 'hasOwnProperty' from target object.
+   Do not access Object.prototype method 'hasOwnProperty' from target object.
   
   > 1 │ var invalid = foo.hasOwnProperty("bar");
                      ^^^^^^^^^^^^^^
@@ -42,9 +44,9 @@ var invalid = foo.hasOwnProperty("bar");
 var invalid = foo.isPrototypeOf(bar);
 ```
 
-
nursery/noPrototypeBuiltins.js:1:19 lint/nursery/noPrototypeBuiltins ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
suspicious/noPrototypeBuiltins.js:1:19 lint/suspicious/noPrototypeBuiltins ━━━━━━━━━━━━━━━━━━━━━━━━━
 
-   Do not access Object.prototype method 'isPrototypeOf' from target object.
+   Do not access Object.prototype method 'isPrototypeOf' from target object.
   
   > 1 │ var invalid = foo.isPrototypeOf(bar);
                      ^^^^^^^^^^^^^
@@ -56,9 +58,9 @@ var invalid = foo.isPrototypeOf(bar);
 var invalid = foo.propertyIsEnumerable("bar");
 ```
 
-
nursery/noPrototypeBuiltins.js:1:19 lint/nursery/noPrototypeBuiltins ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
suspicious/noPrototypeBuiltins.js:1:19 lint/suspicious/noPrototypeBuiltins ━━━━━━━━━━━━━━━━━━━━━━━━━
 
-   Do not access Object.prototype method 'propertyIsEnumerable' from target object.
+   Do not access Object.prototype method 'propertyIsEnumerable' from target object.
   
   > 1 │ var invalid = foo.propertyIsEnumerable("bar");
                      ^^^^^^^^^^^^^^^^^^^^
diff --git a/website/src/pages/lint/rules/noRedeclare.md b/website/src/pages/lint/rules/noRedeclare.md
index 13ec58c303c..a5bf36e1e9f 100644
--- a/website/src/pages/lint/rules/noRedeclare.md
+++ b/website/src/pages/lint/rules/noRedeclare.md
@@ -5,6 +5,8 @@ parent: lint/rules/index
 
 # noRedeclare (since v12.0.0)
 
+> This rule is recommended by Rome.
+
 Disallow variable, function, class, and type redeclarations in the same scope.
 
 Source: https://typescript-eslint.io/rules/no-redeclare
@@ -18,7 +20,7 @@ var a = 3;
 var a = 10;
 ```
 
-
nursery/noRedeclare.js:2:5 lint/nursery/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
suspicious/noRedeclare.js:2:5 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    Shouldn't redeclare 'a'. Consider to delete it or rename it.
   
@@ -41,7 +43,7 @@ let a = 3;
 let a = 10;
 ```
 
-
nursery/noRedeclare.js:2:5 lint/nursery/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
suspicious/noRedeclare.js:2:5 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    Shouldn't redeclare 'a'. Consider to delete it or rename it.
   
@@ -64,7 +66,7 @@ function f() {}
 function f() {}
 ```
 
-
nursery/noRedeclare.js:2:10 lint/nursery/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
suspicious/noRedeclare.js:2:10 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    Shouldn't redeclare 'f'. Consider to delete it or rename it.
   
@@ -91,7 +93,7 @@ class C {
 }
 ```
 
-
nursery/noRedeclare.js:4:13 lint/nursery/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
suspicious/noRedeclare.js:4:13 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    Shouldn't redeclare 'c'. Consider to delete it or rename it.
   
@@ -118,7 +120,7 @@ type Person = { name: string; }
 class Person { name: string; }
 ```
 
-
nursery/noRedeclare.js:2:7 lint/nursery/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
suspicious/noRedeclare.js:2:7 lint/suspicious/noRedeclare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    Shouldn't redeclare 'Person'. Consider to delete it or rename it.
   
diff --git a/website/src/pages/lint/rules/noRedundantAlt.md b/website/src/pages/lint/rules/noRedundantAlt.md
index ee67687b9d7..1f2931bda65 100644
--- a/website/src/pages/lint/rules/noRedundantAlt.md
+++ b/website/src/pages/lint/rules/noRedundantAlt.md
@@ -5,6 +5,8 @@ parent: lint/rules/index
 
 # noRedundantAlt (since v12.0.0)
 
+> This rule is recommended by Rome.
+
 Enforce `img` alt prop does not contain the word "image", "picture", or "photo".
 
 The rule will first check if `aria-hidden` is truthy to determine whether to enforce the rule. If the image is
@@ -18,7 +20,7 @@ hidden, then the rule will always succeed.
 photo content;
 ```
 
-
nursery/noRedundantAlt.js:1:20 lint/nursery/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
a11y/noRedundantAlt.js:1:20 lint/a11y/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    Avoid the words "image", "picture", or "photo" in img element alt text.
   
@@ -34,7 +36,7 @@ hidden, then the rule will always succeed.
 {`picture;
 ```
 
-
nursery/noRedundantAlt.js:1:10 lint/nursery/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
a11y/noRedundantAlt.js:1:10 lint/a11y/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    Avoid the words "image", "picture", or "photo" in img element alt text.
   
@@ -50,7 +52,7 @@ hidden, then the rule will always succeed.
 picture of cool person;
 ```
 
-
nursery/noRedundantAlt.js:1:10 lint/nursery/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
a11y/noRedundantAlt.js:1:10 lint/a11y/noRedundantAlt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    Avoid the words "image", "picture", or "photo" in img element alt text.
   
diff --git a/website/src/pages/lint/rules/noRedundantRoles.md b/website/src/pages/lint/rules/noRedundantRoles.md
index a7816d0fee0..1650811f2f1 100644
--- a/website/src/pages/lint/rules/noRedundantRoles.md
+++ b/website/src/pages/lint/rules/noRedundantRoles.md
@@ -3,7 +3,7 @@ title: Lint Rule noRedundantRoles
 parent: lint/rules/index
 ---
 
-# noRedundantRoles (since vnext)
+# noRedundantRoles (since v12.1.0)
 
 Enforce explicit `role` property is not the same as implicit/default role property on an element.
 
diff --git a/website/src/pages/lint/rules/noRestrictedGlobals.md b/website/src/pages/lint/rules/noRestrictedGlobals.md
index ab2a3ceb01e..7e6e0fe748e 100644
--- a/website/src/pages/lint/rules/noRestrictedGlobals.md
+++ b/website/src/pages/lint/rules/noRestrictedGlobals.md
@@ -19,7 +19,7 @@ global variables by enabling an environment, but still want to disallow some of
 console.log(event)
 ```
 
-
nursery/noRestrictedGlobals.js:1:13 lint/nursery/noRestrictedGlobals ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
style/noRestrictedGlobals.js:1:13 lint/style/noRestrictedGlobals ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    Do not use the global variable event.
   
diff --git a/website/src/pages/lint/rules/noSelfCompare.md b/website/src/pages/lint/rules/noSelfCompare.md
index 3a287d245d2..2dfbcae4649 100644
--- a/website/src/pages/lint/rules/noSelfCompare.md
+++ b/website/src/pages/lint/rules/noSelfCompare.md
@@ -5,12 +5,15 @@ parent: lint/rules/index
 
 # noSelfCompare (since v12.0.0)
 
+> This rule is recommended by Rome.
+
 Disallow comparisons where both sides are exactly the same.
 
 >Comparing a variable against itself is usually an error, either a typo or refactoring error. It is confusing to the reader and may potentially introduce a runtime error.
 
 
->The only time you would compare a variable against itself is when you are testing for `NaN`. However, it is far more appropriate to use `typeof x === 'number' && isNaN(x)` or the [Number.isNaN ES2015 function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN) for that use case rather than leaving the reader of the code to determine the intent of self comparison.
+>The only time you would compare a variable against itself is when you are testing for `NaN`.
+However, it is far more appropriate to use `typeof x === 'number' && Number.isNaN(x)` for that use case rather than leaving the reader of the code to determine the intent of self comparison.
 
 
 Source: [no-self-compare](https://eslint.org/docs/latest/rules/no-self-compare).
@@ -23,7 +26,7 @@ Source: [no-self-compare](https://eslint.org/docs/latest/rules/no-self-compare).
 if (x === x) {}
 ```
 
-
nursery/noSelfCompare.js:1:5 lint/nursery/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
suspicious/noSelfCompare.js:1:5 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    Comparing to itself is potentially pointless.
   
@@ -37,7 +40,7 @@ if (x === x) {}
 if (a.b.c() !== a.b .c()) {}
 ```
 
-
nursery/noSelfCompare.js:1:5 lint/nursery/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
suspicious/noSelfCompare.js:1:5 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    Comparing to itself is potentially pointless.
   
diff --git a/website/src/pages/lint/rules/noSvgWithoutTitle.md b/website/src/pages/lint/rules/noSvgWithoutTitle.md
index 70a1f92ac54..f39a17484db 100644
--- a/website/src/pages/lint/rules/noSvgWithoutTitle.md
+++ b/website/src/pages/lint/rules/noSvgWithoutTitle.md
@@ -5,6 +5,8 @@ parent: lint/rules/index
 
 # noSvgWithoutTitle (since v12.0.0)
 
+> This rule is recommended by Rome.
+
 Enforces the usage of the `title` element for the `svg` element.
 
 It is not possible to specify the `alt` attribute for the `svg` as for the `img`.
@@ -21,7 +23,7 @@ To make svg accessible, the following methods are available:
 foo
 ```
 
-
nursery/noSvgWithoutTitle.js:1:1 lint/nursery/noSvgWithoutTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
a11y/noSvgWithoutTitle.js:1:1 lint/a11y/noSvgWithoutTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    Alternative text title element cannot be empty
   
@@ -45,7 +47,7 @@ To make svg accessible, the following methods are available:
 foo
 ```
 
-
nursery/noSvgWithoutTitle.js:7:4 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
a11y/noSvgWithoutTitle.js:7:4 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    unterminated template literal
   
diff --git a/website/src/pages/lint/rules/noSwitchDeclarations.md b/website/src/pages/lint/rules/noSwitchDeclarations.md
index 6786c9720cd..6dedca5760c 100644
--- a/website/src/pages/lint/rules/noSwitchDeclarations.md
+++ b/website/src/pages/lint/rules/noSwitchDeclarations.md
@@ -5,6 +5,8 @@ parent: lint/rules/index
 
 # noSwitchDeclarations (since v12.0.0)
 
+> This rule is recommended by Rome.
+
 Disallow lexical declarations in `switch` clauses.
 
 Lexical declarations in `switch` clauses are accessible in the entire `switch`.
@@ -29,7 +31,7 @@ switch (foo) {
 }
 ```
 
-
nursery/noSwitchDeclarations.js:3:9 lint/nursery/noSwitchDeclarations  FIXABLE  ━━━━━━━━━━━━━━━━━━━━
+
correctness/noSwitchDeclarations.js:3:9 lint/correctness/noSwitchDeclarations  FIXABLE  ━━━━━━━━━━━━
 
    Other switch clauses can erroneously access this declaration.
     Wrap the declaration in a block to restrict its access to the switch clause.
@@ -78,7 +80,7 @@ switch (foo) {
 }
 ```
 
-
nursery/noSwitchDeclarations.js:3:9 lint/nursery/noSwitchDeclarations  FIXABLE  ━━━━━━━━━━━━━━━━━━━━
+
correctness/noSwitchDeclarations.js:3:9 lint/correctness/noSwitchDeclarations  FIXABLE  ━━━━━━━━━━━━
 
    Other switch clauses can erroneously access this declaration.
     Wrap the declaration in a block to restrict its access to the switch clause.
@@ -127,7 +129,7 @@ switch (foo) {
 }
 ```
 
-
nursery/noSwitchDeclarations.js:3:9 lint/nursery/noSwitchDeclarations  FIXABLE  ━━━━━━━━━━━━━━━━━━━━
+
correctness/noSwitchDeclarations.js:3:9 lint/correctness/noSwitchDeclarations  FIXABLE  ━━━━━━━━━━━━
 
    Other switch clauses can erroneously access this declaration.
     Wrap the declaration in a block to restrict its access to the switch clause.
diff --git a/website/src/pages/lint/rules/noUnreachableSuper.md b/website/src/pages/lint/rules/noUnreachableSuper.md
index c271ae2256e..2353a85e511 100644
--- a/website/src/pages/lint/rules/noUnreachableSuper.md
+++ b/website/src/pages/lint/rules/noUnreachableSuper.md
@@ -5,6 +5,8 @@ parent: lint/rules/index
 
 # noUnreachableSuper (since v12.0.0)
 
+> This rule is recommended by Rome.
+
 Ensures the `super()` constructor is called exactly once on every code
 path in a class constructor before `this` is accessed if the class has
 a superclass
@@ -19,7 +21,7 @@ class A extends B {
 }
 ```
 
-
nursery/noUnreachableSuper.js:2:5 lint/nursery/noUnreachableSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
correctness/noUnreachableSuper.js:2:5 lint/correctness/noUnreachableSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    This constructor has code paths that return without calling `super()`.
   
@@ -42,7 +44,7 @@ class A extends B {
 }
 ```
 
-
nursery/noUnreachableSuper.js:2:5 lint/nursery/noUnreachableSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
correctness/noUnreachableSuper.js:2:5 lint/correctness/noUnreachableSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    This constructor has code paths accessing `this` before `super()` is called.
   
@@ -88,7 +90,7 @@ class A extends B {
 }
 ```
 
-
nursery/noUnreachableSuper.js:2:5 lint/nursery/noUnreachableSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
correctness/noUnreachableSuper.js:2:5 lint/correctness/noUnreachableSuper ━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    This constructor has code paths that return without calling `super()`.
   
diff --git a/website/src/pages/lint/rules/noUnsafeOptionalChaining.md b/website/src/pages/lint/rules/noUnsafeOptionalChaining.md
index 7b22e105cbd..6b7d7434c29 100644
--- a/website/src/pages/lint/rules/noUnsafeOptionalChaining.md
+++ b/website/src/pages/lint/rules/noUnsafeOptionalChaining.md
@@ -5,6 +5,8 @@ parent: lint/rules/index
 
 # noUnsafeOptionalChaining (since v12.0.0)
 
+> This rule is recommended by Rome.
+
 Disallow the use of optional chaining in contexts where the undefined value is not allowed.
 
 The optional chaining (?.) expression can short-circuit with a return value of undefined.
@@ -19,7 +21,7 @@ Also, parentheses limit the scope of short-circuiting in chains.
 1 in obj?.foo;
 ```
 
-
nursery/noUnsafeOptionalChaining.js:1:9 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━
+
correctness/noUnsafeOptionalChaining.js:1:9 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━
 
    Unsafe usage of optional chaining.
   
@@ -39,7 +41,7 @@ Also, parentheses limit the scope of short-circuiting in chains.
 with (obj?.foo);
 ```
 
-
nursery/noUnsafeOptionalChaining.js:1:10 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━
+
correctness/noUnsafeOptionalChaining.js:1:10 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━
 
    Unsafe usage of optional chaining.
   
@@ -59,7 +61,7 @@ with (obj?.foo);
 for (bar of obj?.foo);
 ```
 
-
nursery/noUnsafeOptionalChaining.js:1:16 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━
+
correctness/noUnsafeOptionalChaining.js:1:16 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━
 
    Unsafe usage of optional chaining.
   
@@ -79,7 +81,7 @@ for (bar of obj?.foo);
 bar instanceof obj?.foo;
 ```
 
-
nursery/noUnsafeOptionalChaining.js:1:19 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━
+
correctness/noUnsafeOptionalChaining.js:1:19 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━
 
    Unsafe usage of optional chaining.
   
@@ -99,7 +101,7 @@ bar instanceof obj?.foo;
 const { bar } = obj?.foo;
 ```
 
-
nursery/noUnsafeOptionalChaining.js:1:20 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━
+
correctness/noUnsafeOptionalChaining.js:1:20 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━
 
    Unsafe usage of optional chaining.
   
@@ -119,7 +121,7 @@ const { bar } = obj?.foo;
 (obj?.foo)();
 ```
 
-
nursery/noUnsafeOptionalChaining.js:1:5 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━
+
correctness/noUnsafeOptionalChaining.js:1:5 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━
 
    Unsafe usage of optional chaining.
   
@@ -139,7 +141,7 @@ const { bar } = obj?.foo;
 (baz?.bar).foo;
 ```
 
-
nursery/noUnsafeOptionalChaining.js:1:5 lint/nursery/noUnsafeOptionalChaining ━━━━━━━━━━━━━━━━━━━━━━
+
correctness/noUnsafeOptionalChaining.js:1:5 lint/correctness/noUnsafeOptionalChaining ━━━━━━━━━━━━━━
 
    Unsafe usage of optional chaining.
   
diff --git a/website/src/pages/lint/rules/noUnusedLabels.md b/website/src/pages/lint/rules/noUnusedLabels.md
index 3db409b534b..e6cce7383cc 100644
--- a/website/src/pages/lint/rules/noUnusedLabels.md
+++ b/website/src/pages/lint/rules/noUnusedLabels.md
@@ -5,6 +5,8 @@ parent: lint/rules/index
 
 # noUnusedLabels (since v12.0.0)
 
+> This rule is recommended by Rome.
+
 Disallow unused labels.
 
 Labels that are declared and never used are most likely an error due to incomplete refactoring.
@@ -24,7 +26,7 @@ LOOP: for (const x of xs) {
 }
 ```
 
-
nursery/noUnusedLabels.js:1:1 lint/nursery/noUnusedLabels  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
correctness/noUnusedLabels.js:1:1 lint/correctness/noUnusedLabels  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━
 
    Unused label.
   
diff --git a/website/src/pages/lint/rules/noUselessCatch.md b/website/src/pages/lint/rules/noUselessCatch.md
index cdae299b332..9c46380b865 100644
--- a/website/src/pages/lint/rules/noUselessCatch.md
+++ b/website/src/pages/lint/rules/noUselessCatch.md
@@ -5,6 +5,8 @@ parent: lint/rules/index
 
 # noUselessCatch (since v12.0.0)
 
+> This rule is recommended by Rome.
+
 Disallow unnecessary `catch` clauses.
 
 A `catch` clause that only rethrows the original error is redundant,
@@ -26,7 +28,7 @@ try {
 }
 ```
 
-
nursery/noUselessCatch.js:4:5 lint/nursery/noUselessCatch ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
complexity/noUselessCatch.js:4:5 lint/complexity/noUselessCatch ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    The catch clause that only rethrows the original error is redundant.
   
@@ -51,7 +53,7 @@ try {
 }
 ```
 
-
nursery/noUselessCatch.js:4:5 lint/nursery/noUselessCatch ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
complexity/noUselessCatch.js:4:5 lint/complexity/noUselessCatch ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    The catch clause that only rethrows the original error is redundant.
   
diff --git a/website/src/pages/lint/rules/noUselessConstructor.md b/website/src/pages/lint/rules/noUselessConstructor.md
index 0cfe6d1f24a..85ef255c75f 100644
--- a/website/src/pages/lint/rules/noUselessConstructor.md
+++ b/website/src/pages/lint/rules/noUselessConstructor.md
@@ -5,6 +5,8 @@ parent: lint/rules/index
 
 # noUselessConstructor (since vnext)
 
+> This rule is recommended by Rome.
+
 Disallow unnecessary constructors.
 
 _ES2015_ provides a default class constructor if one is not specified.
@@ -22,7 +24,7 @@ class A {
 }
 ```
 
-
nursery/noUselessConstructor.js:2:5 lint/nursery/noUselessConstructor  FIXABLE  ━━━━━━━━━━━━━━━━━━━━
+
complexity/noUselessConstructor.js:2:5 lint/complexity/noUselessConstructor  FIXABLE  ━━━━━━━━━━━━━━
 
    This constructor is unnecessary.
   
@@ -49,7 +51,7 @@ class B extends A {
 }
 ```
 
-
nursery/noUselessConstructor.js:2:5 lint/nursery/noUselessConstructor  FIXABLE  ━━━━━━━━━━━━━━━━━━━━
+
complexity/noUselessConstructor.js:2:5 lint/complexity/noUselessConstructor  FIXABLE  ━━━━━━━━━━━━━━
 
    This constructor is unnecessary.
   
@@ -82,7 +84,7 @@ class C {
 }
 ```
 
-
nursery/noUselessConstructor.js:5:5 lint/nursery/noUselessConstructor  FIXABLE  ━━━━━━━━━━━━━━━━━━━━
+
complexity/noUselessConstructor.js:5:5 lint/complexity/noUselessConstructor  FIXABLE  ━━━━━━━━━━━━━━
 
    This constructor is unnecessary.
   
diff --git a/website/src/pages/lint/rules/noExtraLabels.md b/website/src/pages/lint/rules/noUselessLabel.md
similarity index 87%
rename from website/src/pages/lint/rules/noExtraLabels.md
rename to website/src/pages/lint/rules/noUselessLabel.md
index 7d43c07ec6e..b7b38e165cf 100644
--- a/website/src/pages/lint/rules/noExtraLabels.md
+++ b/website/src/pages/lint/rules/noUselessLabel.md
@@ -1,9 +1,11 @@
 ---
-title: Lint Rule noExtraLabels
+title: Lint Rule noUselessLabel
 parent: lint/rules/index
 ---
 
-# noExtraLabels (since v12.0.0)
+# noUselessLabel (since v12.0.0)
+
+> This rule is recommended by Rome.
 
 Disallow unnecessary labels.
 
@@ -21,7 +23,7 @@ loop: while(a) {
 }
 ```
 
-
nursery/noExtraLabels.js:2:11 lint/nursery/noExtraLabels  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
complexity/noUselessLabel.js:2:11 lint/complexity/noUselessLabel  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━
 
    Unnecessary label.
   
diff --git a/website/src/pages/lint/rules/noUselessRename.md b/website/src/pages/lint/rules/noUselessRename.md
index 2cbba5d6d47..5a9889329e5 100644
--- a/website/src/pages/lint/rules/noUselessRename.md
+++ b/website/src/pages/lint/rules/noUselessRename.md
@@ -5,6 +5,8 @@ parent: lint/rules/index
 
 # noUselessRename (since v12.0.0)
 
+> This rule is recommended by Rome.
+
 Disallow renaming import, export, and destructured assignments to the same name.
 
 ES2015 allows for the renaming of references in import and export statements as well as destructuring assignments.
@@ -29,7 +31,7 @@ Source: https://eslint.org/docs/latest/rules/no-useless-rename
 import { foo as foo } from "bar";
 ```
 
-
nursery/noUselessRename.js:1:10 lint/nursery/noUselessRename  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
complexity/noUselessRename.js:1:10 lint/complexity/noUselessRename  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━
 
    Useless rename.
   
@@ -47,7 +49,7 @@ import { foo as foo } from "bar";
 export { foo as foo };
 ```
 
-
nursery/noUselessRename.js:1:10 lint/nursery/noUselessRename  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
complexity/noUselessRename.js:1:10 lint/complexity/noUselessRename  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━
 
    Useless rename.
   
@@ -65,7 +67,7 @@ export { foo as foo };
 let { foo: foo } = bar;
 ```
 
-
nursery/noUselessRename.js:1:7 lint/nursery/noUselessRename  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
complexity/noUselessRename.js:1:7 lint/complexity/noUselessRename  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━
 
    Useless rename.
   
diff --git a/website/src/pages/lint/rules/noUselessSwitchCase.md b/website/src/pages/lint/rules/noUselessSwitchCase.md
index b0a1409aa84..45960f4f7dd 100644
--- a/website/src/pages/lint/rules/noUselessSwitchCase.md
+++ b/website/src/pages/lint/rules/noUselessSwitchCase.md
@@ -5,6 +5,8 @@ parent: lint/rules/index
 
 # noUselessSwitchCase (since v12.0.0)
 
+> This rule is recommended by Rome.
+
 Disallow useless `case` in `switch` statements.
 
 A `switch` statement can optionally have a `default` clause.
@@ -28,7 +30,7 @@ switch (foo) {
 }
 ```
 
-
nursery/noUselessSwitchCase.js:2:5 lint/nursery/noUselessSwitchCase  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━
+
complexity/noUselessSwitchCase.js:2:5 lint/complexity/noUselessSwitchCase  FIXABLE  ━━━━━━━━━━━━━━━━
 
    Useless case clause.
   
@@ -70,7 +72,7 @@ switch (foo) {
 }
 ```
 
-
nursery/noUselessSwitchCase.js:3:5 lint/nursery/noUselessSwitchCase  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━
+
complexity/noUselessSwitchCase.js:3:5 lint/complexity/noUselessSwitchCase  FIXABLE  ━━━━━━━━━━━━━━━━
 
    Useless case clause.
   
diff --git a/website/src/pages/lint/rules/noWith.md b/website/src/pages/lint/rules/noWith.md
index d365eec8ed4..a74865a6540 100644
--- a/website/src/pages/lint/rules/noWith.md
+++ b/website/src/pages/lint/rules/noWith.md
@@ -5,6 +5,8 @@ parent: lint/rules/index
 
 # noWith (since v12.0.0)
 
+> This rule is recommended by Rome.
+
 Disallow `with` statements in non-strict contexts.
 
 The `with` statement is potentially problematic because it adds members of an object to the current
@@ -22,7 +24,7 @@ function f() {
 }
 ```
 
-
nursery/noWith.js:2:3 lint/nursery/noWith ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
complexity/noWith.js:2:3 lint/complexity/noWith ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    Unexpected use of with statement.
   
diff --git a/website/src/pages/lint/rules/useAriaPropsForRole.md b/website/src/pages/lint/rules/useAriaPropsForRole.md
index df41a8f14e2..475819c0b96 100644
--- a/website/src/pages/lint/rules/useAriaPropsForRole.md
+++ b/website/src/pages/lint/rules/useAriaPropsForRole.md
@@ -5,6 +5,8 @@ parent: lint/rules/index
 
 # useAriaPropsForRole (since v11.0.0)
 
+> This rule is recommended by Rome.
+
 Enforce that elements with ARIA roles must have all required ARIA attributes for that role.
 
 ## Examples
@@ -15,7 +17,7 @@ Enforce that elements with ARIA roles must have all required ARIA attributes for
 
 ```
 
-
nursery/useAriaPropsForRole.js:1:7 lint/nursery/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
a11y/useAriaPropsForRole.js:1:7 lint/a11y/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    The element with the checkbox ARIA role does not have the required ARIA attributes.
   
@@ -33,7 +35,7 @@ Enforce that elements with ARIA roles must have all required ARIA attributes for
 
 ```
 
-
nursery/useAriaPropsForRole.js:1:7 lint/nursery/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
a11y/useAriaPropsForRole.js:1:7 lint/a11y/useAriaPropsForRole ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    The element with the heading ARIA role does not have the required ARIA attributes.
   
diff --git a/website/src/pages/lint/rules/useGroupedTypeImport.md b/website/src/pages/lint/rules/useGroupedTypeImport.md
index a7de21065ca..00018a11d32 100644
--- a/website/src/pages/lint/rules/useGroupedTypeImport.md
+++ b/website/src/pages/lint/rules/useGroupedTypeImport.md
@@ -3,7 +3,7 @@ title: Lint Rule useGroupedTypeImport
 parent: lint/rules/index
 ---
 
-# useGroupedTypeImport (since vnext)
+# useGroupedTypeImport (since v12.1.0)
 
 Enforce the use of `import type` when an `import` only has specifiers with `type` qualifier.
 
diff --git a/website/src/pages/lint/rules/useHeadingContent.md b/website/src/pages/lint/rules/useHeadingContent.md
index 6b31f39ea56..2aa722b5322 100644
--- a/website/src/pages/lint/rules/useHeadingContent.md
+++ b/website/src/pages/lint/rules/useHeadingContent.md
@@ -3,7 +3,7 @@ title: Lint Rule useHeadingContent
 parent: lint/rules/index
 ---
 
-# useHeadingContent (since vnext)
+# useHeadingContent (since v12.1.0)
 
 Enforce that heading elements (h1, h2, etc.) have content and that the content is accessible to screen readers.
 Accessible means that it is not hidden using the aria-hidden prop.
diff --git a/website/src/pages/lint/rules/useIframeTitle.md b/website/src/pages/lint/rules/useIframeTitle.md
index cdd8b50c53c..f5604ff28a5 100644
--- a/website/src/pages/lint/rules/useIframeTitle.md
+++ b/website/src/pages/lint/rules/useIframeTitle.md
@@ -5,6 +5,8 @@ parent: lint/rules/index
 
 # useIframeTitle (since v12.0.0)
 
+> This rule is recommended by Rome.
+
 Enforces the usage of the attribute `title` for the element `iframe`
 
 ## Examples
@@ -15,7 +17,7 @@ Enforces the usage of the attribute `title` for the element `iframe`
     
 ```
 
-
nursery/useIframeTitle.js:1:5 lint/nursery/useIframeTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
a11y/useIframeTitle.js:1:5 lint/a11y/useIframeTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    Provide a title attribute when using iframe elements.
   
@@ -47,7 +49,7 @@ Enforces the usage of the attribute `title` for the element `iframe`
     
 ```
 
-
nursery/useIframeTitle.js:1:5 lint/nursery/useIframeTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
a11y/useIframeTitle.js:1:5 lint/a11y/useIframeTitle ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
    Provide a title attribute when using iframe elements.
   
@@ -95,7 +97,7 @@ Enforces the usage of the attribute `title` for the element `iframe`