Menu

Stress testing Biome's noFloatingPromises lint rule
📰
0

Stress testing Biome's noFloatingPromises lint rule

Vercel News·Dimitri Mitropoulos·4 days ago
#XBUIobER
#vercel#promise#reject#floating#type#article
Reading 0:00
15s threshold

Recently we partnered with the Biome team to strengthen their noFloatingPromises lint rule to catch more subtle edge cases. This rule prevents unhandled Promises, which can cause silent errors and unpredictable behavior. Once Biome had an early version ready, they asked if we could help stress test it with some test cases. At Vercel, we know good tests require creativity just as much as attention to detail. To ensure strong coverage, we wanted to stretch the rule to its limits and so we thought it would be fun to turn this into a friendly internal competition. Who could come up with the trickiest examples that would still break the updated lint rule? Part of the fun was learning together, but before we dive into the snippets, let’s revisit what makes a Promise “float”. Link to heading What is a floating Promise? A Promise is “floating” when it’s created in a way that its errors can never be handled or observed.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More