lint: activate n/no-process-exit by Uzlopak · Pull Request #4548 · nodejs/undici (original) (raw)

Pull Request Overview

This PR activates the ESLint rule n/no-process-exit to enforce better error handling practices by discouraging the use of process.exit() in favor of more appropriate alternatives like test skipping options or process.exitCode.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file

File Description
eslint.config.js Adds the n/no-process-exit rule to enforce better exit handling
test/interceptors/dump-interceptor.js Replaces process.exit with test skip option for Windows compatibility
test/autobahn/report.js Changes process.exit to process.exitCode assignment
test/autobahn/client.js Changes process.exit to process.exitCode assignment
test/web-platform-tests/wpt-runner.mjs Adds eslint-disable comment for legitimate process.exit usage
test/web-platform-tests/runner/test-runner.mjs Adds eslint-disable comments for legitimate process.exit usage
build/wasm.js Replaces one process.exit with throw statement, adds eslint-disable for legitimate usage
benchmarks/wait.js Changes process.exit to process.exitCode assignment

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.