-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Rule: consistent RuleTester.errors property #59
Comments
Sure, this seems reasonable to me. I don't have any strong opinions about what the options would be like -- maybe a list of required keys in options objects? I'm open to other design suggestions too. |
The hard part about this rule is how to configure it and what the default options are. With the addition of the
That's what I'm thinking for sure. I suppose there is nothing wrong with an opinionated default list of required keys, and if someone is using this rule, they can override the defaults? Not sure it'd be the best experience, but I don't see another way forward for this rule. |
When writing ESLint rule tests using RuleTester, it can be beneficial to enforce consistent usage of the
errors
property in this RuleTester docs screenshot:For example, I usually always want to enforce
errors
to be an object, and I want to require that object to include themessage
,line
, andcolumn
properties.Thoughts on adding a rule like this? Still thinking through what the name could be and what the default options would be for this rule.
The text was updated successfully, but these errors were encountered: