-
Notifications
You must be signed in to change notification settings - Fork 145
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
consistent-data-testid: add support for custom error message #718
Comments
Hi @patriscus! Thanks for opening this issue. No worries, you used the right issue template 👌. This is a great idea actually, so please if you want to give it a shot, go ahead! Let us know if you need help with anything. |
) Closes #718 * feat(consistent-data-testid): add support for custom message in the rule configuration * feat(consistent-data-testid): update docs * feat(consistent-data-testid): use undefined as default value for customMessage * feat(consistent-data-testid): add comment to test case Co-authored-by: Patrick Ahmetovic <[email protected]>
🎉 This issue has been resolved in version 5.10.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version 6.0.0-alpha.15 🎉 The release is available on: Your semantic-release bot 📦🚀 |
What rule do you want to change?
consistent-data-testid
Does this change cause the rule to produce more or fewer warnings?
More warnings
How will the change be implemented?
The changes will be implemented by extending the possible rule configuration values by a new field (e.g.
customMessage
), and consuming it, if present.Example code
Example ESLint config:
How does the current rule affect the code?
Example ESLint config:
Example code:
Example error:
How will the new rule affect the code?
Example ESLint config:
Example code:
Example error:
Anything else?
First things first, I hope I've used the right issue template. Also, I am more than happy to have a go at this issue and open a PR, in case you all agree to proceed with this change.
In my opinion adding this change would support devs in providing more meaningful (error) messages. In my example, the developer does not need to think about what the regex means, but is just shown a straight-forward message.
Any feedback is welcome :)
Do you want to submit a pull request to change the rule?
Yes
The text was updated successfully, but these errors were encountered: