chore: fix JavaScript lint errors (issue #10000) - [x] Read, understood, and followed the [contributing guidelines](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md)#10307
Conversation
Replace undefined `proc` references with `process` in module-scoped callback functions. The `proc` variable is only declared inside the `plugin()` function scope, but the callbacks `onError`, `onFinish`, `stdout`, and `stderr` are defined at module scope and need to access the Node.js global `process` object for exitCode and stdio streams.
|
Hello! Thank you for your contribution to stdlib. We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:
This acknowledgment confirms that you've read the guidelines, which include:
We can't review or accept contributions without this acknowledgment. Thank you for your understanding and cooperation. We look forward to reviewing your contribution! |
|
Hello! Thank you for your contribution to stdlib. We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:
This acknowledgment confirms that you've read the guidelines, which include:
We can't review or accept contributions without this acknowledgment. Thank you for your understanding and cooperation. We look forward to reviewing your contribution! |
|
Hello! Thank you for your contribution to stdlib. We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:
This acknowledgment confirms that you've read the guidelines, which include:
We can't review or accept contributions without this acknowledgment. Thank you for your understanding and cooperation. We look forward to reviewing your contribution! |
4 similar comments
|
Hello! Thank you for your contribution to stdlib. We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:
This acknowledgment confirms that you've read the guidelines, which include:
We can't review or accept contributions without this acknowledgment. Thank you for your understanding and cooperation. We look forward to reviewing your contribution! |
|
Hello! Thank you for your contribution to stdlib. We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:
This acknowledgment confirms that you've read the guidelines, which include:
We can't review or accept contributions without this acknowledgment. Thank you for your understanding and cooperation. We look forward to reviewing your contribution! |
|
Hello! Thank you for your contribution to stdlib. We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:
This acknowledgment confirms that you've read the guidelines, which include:
We can't review or accept contributions without this acknowledgment. Thank you for your understanding and cooperation. We look forward to reviewing your contribution! |
|
Hello! Thank you for your contribution to stdlib. We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:
This acknowledgment confirms that you've read the guidelines, which include:
We can't review or accept contributions without this acknowledgment. Thank you for your understanding and cooperation. We look forward to reviewing your contribution! |
Fixed the
no-undefESLint errors inmakie-install-node-addons/lib/main.jsby replacing undefinedprocreferences withprocess.Resolves #10000
Problem
Four module-scoped callback functions (
onError,onFinish,stdout,stderr) referenceproc, butprocis only declared as a local variable inside theplugin()function. This causes 4 ESLintno-undeferrors:Fix
The callbacks use
proc.exitCode,proc.stdout.write(), andproc.stderr.write()these are operations on the Node.js globalprocessobject, not the child process spawned insideplugin(). Replaced all 4 occurrences ofprocwithprocessin the module-scoped callbacks:function onError( error ) { - proc.exitCode = 1; + process.exitCode = 1; function onFinish( code ) { - proc.exitCode = code; + process.exitCode = code; function stdout( data ) { - proc.stdout.write( data ); + process.stdout.write( data ); function stderr( data ) { - proc.stderr.write( data ); + process.stderr.write( data );The local
var procinsideplugin()continues to hold the child process handle fromspawn()and is unaffected.