[improvement]: warn about extra environment variables
Hi!
We use envalid almost everywhere and it made our env usage much better. The only missing option is ability to warn about provided, but unused environment variables.
This warning can be optional and exclude $HOME, $USER and other default variables.
Example of warning:
Environment contains extra variables: OPENAI_KEY, OLD_SECRET,.... Remove these variables or add them to exclusion list
Please tell if you think if this feature can be useful in this package
Cool idea! I don't think I would include this in the core package (trying to keep it as lean as possible) but I would love to see this implemented as a middleware and posted in this ticket for future reference, I'm sure others would find it valuable
Implemented by Claude Code
https://github.com/Short-io/envalid-unused / https://www.npmjs.com/package/envalid-unused