Hacker News new | ask | show | jobs
by nfriedly 2232 days ago
I think that's part of the typescript plugin, not part of eslint core - https://github.com/typescript-eslint/typescript-eslint/blob/... (I assume that means it only works on TypeScript.)

But, I agree with your point, that rule can catch a lot of bugs.

1 comments

There are many ways to get this rule, but the primary one being: https://www.npmjs.com/package/eslint-plugin-promise
I don't think that plugin catches floating promises, i.e. promises that are not waited (either via await or then/catch method). The rules listed in that package's readme don't seem to mention it at least (unless I'm totally misreading something). You kinda need TypeScript for that because you need the type info to know if a value whether some value is a Promsie to give the warning.