Assigning undefined to process.env vars does not work since it will be converted to a string ('undefined'):
$ node
Welcome to Node.js v20.17.0.
Type ".help" for more information.
> process.env.FOO
undefined
> process.env.FOO = 'bar'
'bar'
> process.env.FOO = undefined
undefined
> typeof process.env.FOO
'string'
> delete process.env.FOO
true
> typeof process.env.FOO
'undefined'
See https://nodejs.org/docs/latest-v20.x/api/process.html#processenv for additional details. It also states "Use delete to delete a property from process.env." Please also note that an assignment of undefined is deprecated and future versions will throw an error.
lint/performance/noDelete
The rule should not suggest assigning undefined to process.env vars, but instead an assignment of undefined should be reported as error.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too