Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no-process-env: support custom error message "use the env wrapper" #319

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

devinrhode2
Copy link

This is the first time I've ever touched eslint rule stuff, but I feel pretty good about this change, and was able to maintain the 100% test coverage on this rule.

closes mysticatea#318 (no-process-env: accept a custom error message)
"node/no-process-env": [
"error",
{
"customMessage": "Use the env wrapper instead."
Copy link
Author

@devinrhode2 devinrhode2 Jan 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made this sample message deliberately bad to drive the point that users need to edit it for their use case.

In my case it'll be something like: "Use safeEnv from 'src/env' instead."

@voxpelli
Copy link

eslint-plugin-n is the maintained version of this module.

We switched to it in eg. eslint-config-standard / standard and it is maintained by me and other members of the official ESLint community organization.

Try that module out and if it isn't fixed there, then open a new PR in that project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants