-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
bugSomething isn't workingSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin
Description
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have read the FAQ and my problem is not listed.
Repro
{
"rules": {
"@typescript-eslint/return-await": "error",
}
}
async function test() {
try {
const anyCallback = () => {};
return Promise.resolve(5); // not considered an error
} finally {
return Promise.resolve(2);
}
Expected Result
I expect this rule to consider the comment-marked line an error, because a promise is returned without
being first awaited
Actual Result
But it isn't considered an error.
No errors are generated while linting.
PR
I submitted a fix PR (#3601). It uses a stack during AST
traversal to allow nested functions to be handled correctly.
Please let me know if there is anything I missed for contributing.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin