Skip to content

💅 bug in code action for noFloatingPromises rule #7999

@tidefield

Description

@tidefield

I used the playground to debug #7332 and found a bug in the action log.

See console pane in playground.

    ℹ Unsafe fix: Add await operator.
  
    11 11 │     readonly.returnPromise();
    12 12 │     // ✅
    13    │ - ··object.returnPromise();
       13 │ + ··await·//·✅
       14 │ + ··object.returnPromise();
    14 15 │   }
    15 16 │

Rule name

noFloatingPromises

Playground link

link

Expected result

It should say

  ℹ Unsafe fix: Add await operator.
  
    11 11 │     readonly.returnPromise();
    12 12 │     // ✅
    13    │ - ··object.returnPromise();
       14 │ + ··await object.returnPromise();
    14 15 │   }
    15 16 │   

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Metadata

Metadata

Assignees

Labels

S-Bug-confirmedStatus: report has been confirmed as a valid bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions