We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
no-unsafe-finally
1 parent e3999c0 commit 75f4c00Copy full SHA for 75f4c00
examples/bad/overwrite.js
@@ -8,3 +8,14 @@ try {
8
} catch (e) {
9
e = 10; // Overwrite the reference to the error.
10
}
11
+
12
+/*eslint no-unsafe-finally: "error"*/
13
+(() => {
14
+ try {
15
+ return 1; // 1 is returned but suspended until finally block ends
16
+ } catch(err) {
17
+ return 2;
18
+ } finally {
19
+ return 3; // 3 is returned before 1, which we did not expect
20
+ }
21
+})(); // We expect this function to return 1, but result is 3.
0 commit comments