Open
Description
Environment information
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.
Rule name
lint/performance/noDelete
Playground link
Expected result
The rule should not suggest assigning undefined to process.env vars, but instead an assignment of undefined should be reported as error.
Code of Conduct
- I agree to follow Biome's Code of Conduct