From e5e758ea0cd238220127ae7bcbd967f1d8920f28 Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Tue, 6 Aug 2024 04:22:42 +1200 Subject: [PATCH] docs(process-exit-as-throw): update wording (#323) --- docs/rules/process-exit-as-throw.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/rules/process-exit-as-throw.md b/docs/rules/process-exit-as-throw.md index ab878662..4416adcf 100644 --- a/docs/rules/process-exit-as-throw.md +++ b/docs/rules/process-exit-as-throw.md @@ -16,9 +16,9 @@ function foo(a) { } ``` -ESLint does not address `process.exit()` as stop in code path analysis, then [consistent-return] rule will warn the above code. +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. -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. +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. This rule itself never warn code.