Skip to content

Commit 067ebd0

Browse files
committed
implement use_single_js_doc_asterisk
Remove inaccurate comment add invalid examples
1 parent 8e77d65 commit 067ebd0

File tree

14 files changed

+619
-12
lines changed

14 files changed

+619
-12
lines changed

.changeset/honest-bikes-smell.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@biomejs/biome": minor
3+
---
4+
5+
Add [useSingleJsDocAsterisk](https://biomejs.dev/linter/rules/use-single-js-doc-asterisk/)

crates/biome_analyze/src/rule.rs

+6
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,8 @@ pub enum RuleSource {
260260
EslintJest(&'static str),
261261
/// Rules from [Eslint Plugin JSX A11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y)
262262
EslintJsxA11y(&'static str),
263+
/// Rules from [Eslint Plugin JSDOc](https://github.com/gajus/eslint-plugin-jsdoc)
264+
EslintJsDoc(&'static str),
263265
/// Rules from [Eslint Plugin React](https://github.com/jsx-eslint/eslint-plugin-react)
264266
EslintReact(&'static str),
265267
/// Rules from [Eslint Plugin React Hooks](https://github.com/facebook/react/blob/main/packages/eslint-plugin-react-hooks/README.md)
@@ -313,6 +315,7 @@ impl std::fmt::Display for RuleSource {
313315
Self::EslintImportAccess(_) => write!(f, "eslint-plugin-import-access"),
314316
Self::EslintJest(_) => write!(f, "eslint-plugin-jest"),
315317
Self::EslintJsxA11y(_) => write!(f, "eslint-plugin-jsx-a11y"),
318+
Self::EslintJsDoc(_) => write!(f, "eslint-plugin-jsdoc"),
316319
Self::EslintReact(_) => write!(f, "eslint-plugin-react"),
317320
Self::EslintReactHooks(_) => write!(f, "eslint-plugin-react-hooks"),
318321
Self::EslintReactRefresh(_) => write!(f, "eslint-plugin-react-refresh"),
@@ -367,6 +370,7 @@ impl RuleSource {
367370
| Self::EslintImportAccess(rule_name)
368371
| Self::EslintJest(rule_name)
369372
| Self::EslintJsxA11y(rule_name)
373+
| Self::EslintJsDoc(rule_name)
370374
| Self::EslintReact(rule_name)
371375
| Self::EslintReactHooks(rule_name)
372376
| Self::EslintReactRefresh(rule_name)
@@ -396,6 +400,7 @@ impl RuleSource {
396400
Self::EslintImportAccess(rule_name) => format!("import-access/{rule_name}"),
397401
Self::EslintJest(rule_name) => format!("jest/{rule_name}"),
398402
Self::EslintJsxA11y(rule_name) => format!("jsx-a11y/{rule_name}"),
403+
Self::EslintJsDoc(rule_name) => format!("jsdoc/{rule_name}"),
399404
Self::EslintReact(rule_name) => format!("react/{rule_name}"),
400405
Self::EslintReactHooks(rule_name) => format!("react-hooks/{rule_name}"),
401406
Self::EslintReactRefresh(rule_name) => format!("react-refresh/{rule_name}"),
@@ -426,6 +431,7 @@ impl RuleSource {
426431
Self::EslintImportAccess(_) => "https://github.com/uhyo/eslint-plugin-import-access".to_string(),
427432
Self::EslintJest(rule_name) => format!("https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/{rule_name}.md"),
428433
Self::EslintJsxA11y(rule_name) => format!("https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/{rule_name}.md"),
434+
Self::EslintJsDoc(rule_name) => format!("https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/{rule_name}.md"),
429435
Self::EslintReact(rule_name) => format!("https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/{rule_name}.md"),
430436
Self::EslintReactHooks(_) => "https://github.com/facebook/react/blob/main/packages/eslint-plugin-react-hooks/README.md".to_string(),
431437
Self::EslintReactRefresh(_) => "https://github.com/ArnaudBarre/eslint-plugin-react-refresh".to_string(),

crates/biome_cli/src/execute/migrate/eslint_any_rule_to_biome.rs

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/biome_configuration/src/analyzer/linter/rules.rs

+32-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/biome_diagnostics_categories/src/categories.rs

+1
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ define_categories! {
228228
"lint/nursery/useNamingConvention": "https://biomejs.dev/linter/rules/use-naming-convention",
229229
"lint/nursery/useNumericSeparators": "https://biomejs.dev/linter/rules/use-numeric-separators",
230230
"lint/nursery/useParseIntRadix": "https://biomejs.dev/linter/rules/use-parse-int-radix",
231+
"lint/nursery/useSingleJsDocAsterisk": "https://biomejs.dev/linter/rules/use-single-js-doc-asterisk",
231232
"lint/nursery/useSortedClasses": "https://biomejs.dev/linter/rules/use-sorted-classes",
232233
"lint/nursery/useSortedProperties": "https://biomejs.dev/linter/rules/use-sorted-properties",
233234
"lint/nursery/useStrictMode": "https://biomejs.dev/linter/rules/use-strict-mode",

crates/biome_js_analyze/src/lint/nursery.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,10 @@ pub mod use_guard_for_in;
5959
pub mod use_iterable_callback_return;
6060
pub mod use_numeric_separators;
6161
pub mod use_parse_int_radix;
62+
pub mod use_single_js_doc_asterisk;
6263
pub mod use_sorted_classes;
6364
pub mod use_strict_mode;
6465
pub mod use_symbol_description;
6566
pub mod use_trim_start_end;
6667
pub mod use_valid_autocomplete;
67-
declare_lint_group! { pub Nursery { name : "nursery" , rules : [self :: no_await_in_loop :: NoAwaitInLoop , self :: no_bitwise_operators :: NoBitwiseOperators , self :: no_common_js :: NoCommonJs , self :: no_constant_binary_expression :: NoConstantBinaryExpression , self :: no_destructured_props :: NoDestructuredProps , self :: no_document_cookie :: NoDocumentCookie , self :: no_document_import_in_page :: NoDocumentImportInPage , self :: no_duplicate_else_if :: NoDuplicateElseIf , self :: no_dynamic_namespace_import_access :: NoDynamicNamespaceImportAccess , self :: no_enum :: NoEnum , self :: no_exported_imports :: NoExportedImports , self :: no_floating_promises :: NoFloatingPromises , self :: no_global_dirname_filename :: NoGlobalDirnameFilename , self :: no_head_element :: NoHeadElement , self :: no_head_import_in_document :: NoHeadImportInDocument , self :: no_img_element :: NoImgElement , self :: no_import_cycles :: NoImportCycles , self :: no_irregular_whitespace :: NoIrregularWhitespace , self :: no_nested_ternary :: NoNestedTernary , self :: no_noninteractive_element_interactions :: NoNoninteractiveElementInteractions , self :: no_octal_escape :: NoOctalEscape , self :: no_process_env :: NoProcessEnv , self :: no_process_global :: NoProcessGlobal , self :: no_restricted_elements :: NoRestrictedElements , self :: no_restricted_imports :: NoRestrictedImports , self :: no_restricted_types :: NoRestrictedTypes , self :: no_secrets :: NoSecrets , self :: no_shadow :: NoShadow , self :: no_static_element_interactions :: NoStaticElementInteractions , self :: no_substr :: NoSubstr , self :: no_template_curly_in_string :: NoTemplateCurlyInString , self :: no_ts_ignore :: NoTsIgnore , self :: no_unresolved_imports :: NoUnresolvedImports , self :: no_unwanted_polyfillio :: NoUnwantedPolyfillio , self :: no_useless_backref_in_regex :: NoUselessBackrefInRegex , self :: no_useless_escape_in_regex :: NoUselessEscapeInRegex , self :: no_useless_escape_in_string :: NoUselessEscapeInString , self :: no_useless_string_raw :: NoUselessStringRaw , self :: no_useless_undefined :: NoUselessUndefined , self :: use_adjacent_overload_signatures :: UseAdjacentOverloadSignatures , self :: use_aria_props_supported_by_role :: UseAriaPropsSupportedByRole , self :: use_at_index :: UseAtIndex , self :: use_collapsed_if :: UseCollapsedIf , self :: use_component_export_only_modules :: UseComponentExportOnlyModules , self :: use_consistent_curly_braces :: UseConsistentCurlyBraces , self :: use_consistent_member_accessibility :: UseConsistentMemberAccessibility , self :: use_consistent_object_definition :: UseConsistentObjectDefinition , self :: use_explicit_type :: UseExplicitType , self :: use_exports_last :: UseExportsLast , self :: use_for_component :: UseForComponent , self :: use_google_font_display :: UseGoogleFontDisplay , self :: use_google_font_preconnect :: UseGoogleFontPreconnect , self :: use_guard_for_in :: UseGuardForIn , self :: use_iterable_callback_return :: UseIterableCallbackReturn , self :: use_numeric_separators :: UseNumericSeparators , self :: use_parse_int_radix :: UseParseIntRadix , self :: use_sorted_classes :: UseSortedClasses , self :: use_strict_mode :: UseStrictMode , self :: use_symbol_description :: UseSymbolDescription , self :: use_trim_start_end :: UseTrimStartEnd , self :: use_valid_autocomplete :: UseValidAutocomplete ,] } }
68+
declare_lint_group! { pub Nursery { name : "nursery" , rules : [self :: no_await_in_loop :: NoAwaitInLoop , self :: no_bitwise_operators :: NoBitwiseOperators , self :: no_common_js :: NoCommonJs , self :: no_constant_binary_expression :: NoConstantBinaryExpression , self :: no_destructured_props :: NoDestructuredProps , self :: no_document_cookie :: NoDocumentCookie , self :: no_document_import_in_page :: NoDocumentImportInPage , self :: no_duplicate_else_if :: NoDuplicateElseIf , self :: no_dynamic_namespace_import_access :: NoDynamicNamespaceImportAccess , self :: no_enum :: NoEnum , self :: no_exported_imports :: NoExportedImports , self :: no_floating_promises :: NoFloatingPromises , self :: no_global_dirname_filename :: NoGlobalDirnameFilename , self :: no_head_element :: NoHeadElement , self :: no_head_import_in_document :: NoHeadImportInDocument , self :: no_img_element :: NoImgElement , self :: no_import_cycles :: NoImportCycles , self :: no_irregular_whitespace :: NoIrregularWhitespace , self :: no_nested_ternary :: NoNestedTernary , self :: no_noninteractive_element_interactions :: NoNoninteractiveElementInteractions , self :: no_octal_escape :: NoOctalEscape , self :: no_process_env :: NoProcessEnv , self :: no_process_global :: NoProcessGlobal , self :: no_restricted_elements :: NoRestrictedElements , self :: no_restricted_imports :: NoRestrictedImports , self :: no_restricted_types :: NoRestrictedTypes , self :: no_secrets :: NoSecrets , self :: no_shadow :: NoShadow , self :: no_static_element_interactions :: NoStaticElementInteractions , self :: no_substr :: NoSubstr , self :: no_template_curly_in_string :: NoTemplateCurlyInString , self :: no_ts_ignore :: NoTsIgnore , self :: no_unresolved_imports :: NoUnresolvedImports , self :: no_unwanted_polyfillio :: NoUnwantedPolyfillio , self :: no_useless_backref_in_regex :: NoUselessBackrefInRegex , self :: no_useless_escape_in_regex :: NoUselessEscapeInRegex , self :: no_useless_escape_in_string :: NoUselessEscapeInString , self :: no_useless_string_raw :: NoUselessStringRaw , self :: no_useless_undefined :: NoUselessUndefined , self :: use_adjacent_overload_signatures :: UseAdjacentOverloadSignatures , self :: use_aria_props_supported_by_role :: UseAriaPropsSupportedByRole , self :: use_at_index :: UseAtIndex , self :: use_collapsed_if :: UseCollapsedIf , self :: use_component_export_only_modules :: UseComponentExportOnlyModules , self :: use_consistent_curly_braces :: UseConsistentCurlyBraces , self :: use_consistent_member_accessibility :: UseConsistentMemberAccessibility , self :: use_consistent_object_definition :: UseConsistentObjectDefinition , self :: use_explicit_type :: UseExplicitType , self :: use_exports_last :: UseExportsLast , self :: use_for_component :: UseForComponent , self :: use_google_font_display :: UseGoogleFontDisplay , self :: use_google_font_preconnect :: UseGoogleFontPreconnect , self :: use_guard_for_in :: UseGuardForIn , self :: use_iterable_callback_return :: UseIterableCallbackReturn , self :: use_numeric_separators :: UseNumericSeparators , self :: use_parse_int_radix :: UseParseIntRadix , self :: use_single_js_doc_asterisk :: UseSingleJsDocAsterisk , self :: use_sorted_classes :: UseSortedClasses , self :: use_strict_mode :: UseStrictMode , self :: use_symbol_description :: UseSymbolDescription , self :: use_trim_start_end :: UseTrimStartEnd , self :: use_valid_autocomplete :: UseValidAutocomplete ,] } }

0 commit comments

Comments
 (0)