You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, node:test.test() is defined as returning Promise. As a result, every test definition causes an eslint error about hanging promises, which requires a separate line for suppression:
// eslint-disable-next-line @typescript-eslint/no-floating-promises
What is the feature you are proposing to solve the problem?
Would it be possible to introduce a sync alias for the "test" function, which could be used to avoid having typed all these eslint overrides for every test we are writing? It would return void instead of Promise.
Pick any name you want, even something as ugly as sync_test() or synchronous_test() would do the trick.
What alternatives have you considered?
As you've probably already guessed, I have a line
// eslint-disable-next-line @typescript-eslint/no-floating-promises
proceeding every test I've written so far.
The text was updated successfully, but these errors were encountered:
Closing as a duplicate of #51292. My understanding is that typescript-eslint has a workaround for this now. I'm also considering dropping the return type in Node 23.
What is the problem this feature will solve?
Currently, node:test.test() is defined as returning Promise. As a result, every test definition causes an eslint error about hanging promises, which requires a separate line for suppression:
// eslint-disable-next-line @typescript-eslint/no-floating-promises
What is the feature you are proposing to solve the problem?
Would it be possible to introduce a sync alias for the "test" function, which could be used to avoid having typed all these eslint overrides for every test we are writing? It would return void instead of Promise.
Pick any name you want, even something as ugly as sync_test() or synchronous_test() would do the trick.
What alternatives have you considered?
As you've probably already guessed, I have a line
// eslint-disable-next-line @typescript-eslint/no-floating-promises
proceeding every test I've written so far.
The text was updated successfully, but these errors were encountered: