-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Closed
Labels
archived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussionevaluatingThe team will evaluate this issue to decide whether it meets the criteria for inclusionThe team will evaluate this issue to decide whether it meets the criteria for inclusionfeatureThis change adds a new feature to ESLintThis change adds a new feature to ESLintruleRelates to ESLint's core rulesRelates to ESLint's core rules
Description
In Node.js we would like to add a rule that allows to verify that callbacks are properly in place. This would massively help to prevent using async APIs that do not add a callback.
The fs module is such a case where it is planned to throw in case no callback is provided. Users would get a much better experience if they could get notified with a eslint rule.
For fs that is possible by checking if the used function contains sync in it's name or not and if not, if the last argument is a callback or not. Other than that I would not know how to check this. There will be multiple cases that the rule could not catch but it is probably still helpful.
See also nodejs/node#18668.
Do you think that is feasible?
Metadata
Metadata
Assignees
Labels
archived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussionevaluatingThe team will evaluate this issue to decide whether it meets the criteria for inclusionThe team will evaluate this issue to decide whether it meets the criteria for inclusionfeatureThis change adds a new feature to ESLintThis change adds a new feature to ESLintruleRelates to ESLint's core rulesRelates to ESLint's core rules