Enhancement: [prefer-nullish-coalescing] Ignore env vars #9162
Labels
enhancement: plugin rule option
New rule option for an existing eslint-plugin rule
locked due to age
Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
wontfix
This will not be worked on
Before You File a Proposal Please Confirm You Have Done The Following...
My proposal is suitable for this project
Link to the rule's documentation
https://typescript-eslint.io/rules/prefer-nullish-coalescing/
Description
Hi there,
A proposal of prefer-nullish-coalescing, it would be useful to have an option to ignore env vars i.e.
process.env
also import.meta.env. Env vars could be given likeFOO= node foo.js
, and the FOO is a string''
in node.js. However, in many case it expects the same asunset FOO
, so??
does not work as expected since''
is valid string.Fail
Pass
Additional Info
No response
The text was updated successfully, but these errors were encountered: