Skip to content

Commit e5e758e

Browse files
authoredAug 5, 2024··
docs(process-exit-as-throw): update wording (#323)
1 parent 388cef9 commit e5e758e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎docs/rules/process-exit-as-throw.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ function foo(a) {
1616
}
1717
```
1818

19-
ESLint does not address `process.exit()` as stop in code path analysis, then [consistent-return] rule will warn the above code.
19+
ESLint does not mark code after `process.exit()` calls as unreachable like it does with `throw` and `return` expressions, meaning rules like [consistent-return] will still warn.
2020

21-
If you turn this rule on, ESLint comes to address `process.exit()` as throw in code path analysis. So, above code will get expected code path.
21+
This rule overrides the default code path analyzer so that code after `process.exit()` calls are marked as unreachable, meaning code like the above will not trigger warnings.
2222

2323
This rule itself never warn code.
2424

0 commit comments

Comments
 (0)
Please sign in to comment.