add option to no-undeclared-env
to include additional objects
#8369
juliusmarminge
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Goals
t3-env
(https://env.t3.gg) or other validator based approaches to use this rule and get proper lintingNon-goals
Background
Currently, the rule is hard-coded to only check explicit access of keys on
import.meta.env
andprocess.env
. This will not work for people who validate their environment variables using a validator based approach likeLater usage of
env.FOO
will not trigger a lint warningProposal
Add configuration to specify additional object names to apply the lint rule on. For example, Drizzle has
drizzleObjectName
config option: https://orm.drizzle.team/docs/eslint-pluginBeta Was this translation helpful? Give feedback.
All reactions