Skip to content

Commit

Permalink
feat(lint): implement noFloatingPromises rule for reguler async f…
Browse files Browse the repository at this point in the history
…unction (#4911)
  • Loading branch information
kaykdm authored Jan 23, 2025
1 parent 069cbb4 commit d400d69
Show file tree
Hide file tree
Showing 17 changed files with 876 additions and 104 deletions.
5 changes: 5 additions & 0 deletions .changeset/add_the_new_rule_nofloatingpromises.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
cli: minor
---

# Add the new rule [`noFloatingPromises`](https://biomejs.dev/linter/rules/no-floating-promises)
11 changes: 11 additions & 0 deletions crates/biome_cli/src/execute/migrate/eslint_any_rule_to_biome.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

228 changes: 124 additions & 104 deletions crates/biome_configuration/src/analyzer/linter/rules.rs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions crates/biome_diagnostics_categories/src/categories.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ define_categories! {
"lint/nursery/noDynamicNamespaceImportAccess": "https://biomejs.dev/linter/rules/no-dynamic-namespace-import-access",
"lint/nursery/noEnum": "https://biomejs.dev/linter/rules/no-enum",
"lint/nursery/noExportedImports": "https://biomejs.dev/linter/rules/no-exported-imports",
"lint/nursery/noFloatingPromises": "https://biomejs.dev/linter/rules/no-floating-promises",
"lint/nursery/noGlobalDirnameFilename": "https://biomejs.dev/linter/rules/no-global-dirname-filename",
"lint/nursery/noHeadElement": "https://biomejs.dev/linter/rules/no-head-element",
"lint/nursery/noHeadImportInDocument": "https://biomejs.dev/linter/rules/no-head-import-in-document",
Expand Down
2 changes: 2 additions & 0 deletions crates/biome_js_analyze/src/lint/nursery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ pub mod no_duplicate_else_if;
pub mod no_dynamic_namespace_import_access;
pub mod no_enum;
pub mod no_exported_imports;
pub mod no_floating_promises;
pub mod no_global_dirname_filename;
pub mod no_head_element;
pub mod no_head_import_in_document;
Expand Down Expand Up @@ -60,6 +61,7 @@ declare_lint_group! {
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 ,
Expand Down
Loading

0 comments on commit d400d69

Please sign in to comment.