Problem: Sometimes functions are needlessly marked async


Problem: Sometimes functions are needlessly marked async.

Solution: typescript-eslint/require-await.

This ESLint rule finds functions where the async keyword is unnecessary (because the function doesn't return a promise).

I just added this rule to a project and found over 100 different spots! The previous developers needlessly marked every function async "just in case".

This rule made that mistake easy to clean up.

https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/require-await.md
Correction: Here's a better link per @JoshuaKGoldberg that contains the full docs: https://typescript-eslint.io/rules/require-await/

View original on X