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
Reevaluate the meta.docs.suggestion
property
#14312
Comments
Thanks for writing all of this up! I do think the fourth option is probably closest to what we want, though perhaps |
TSC Summary: This issue outlines that we have documented a TSC Question: How do we want to proceed here? And do we want to include this in v8.0.0 (somewhat related to #13349)? |
Perhaps we could call it |
That’s fine with me. We can always finalize the wording on the implementation PR. |
Shall I prepare an RFC and/or implementation PR with Option 4? |
Coming out of Thursday's TSC meeting, we're all aligned around option 4. We discussed Since this will be a breaking change, we'll want to include this in a blog post prior to the v8.0.0 release to give everyone a heads up, and the PR should be included in at least one beta release to give plugin authors time to change the property and ship a new release before v8.0.0 final. Normally we do RFCs for breaking changes, but hopefully we can use |
The implementation will be very similar to #14292 which I closed. It will contain:
Does that sound good? If so, I'll open the implementation PR. |
@bmish that looks good to me. Thanks for offering! |
Another addition to the implementation: I'd like to disallow / throw an exception when the old property |
I have opened #14573 with the implementation. |
The problem you want to solve.
There is a rule property
meta.docs.suggestion
mentioned in the Rule Basics documentation that was added along with the Suggestions API / Suggestions RFC:There are a few potential problems with this property:
meta.docs.suggestion
property in some examples #14298).meta.fixable
.meta.fixable
whose presence is enforced for autofixable rules) (more discussion in: Fix: Throw error when rule is missingmeta.docs.suggestion
property #14292).Use cases for having a convenient static property to determine which rules are suggestable:
Note that ESLint itself doesn't currently need to know which rules are suggestable (provide suggestions), whereas it does need to know which rules are fixable, so differences between
meta.docs.suggestion
andmeta.fixable
could be justified if we wanted to keepmeta.docs.suggestion
as an optional property (as opposed tometa.fixable
which is a required property).Your take on the correct solution to the problem.
There are several potential solutions here of varying size.
meta.docs.suggestion
as an optional property, fully document it, and add a lint rule eslint-plugin/require-meta-docs-suggestion for those wishing to enforce its presence.meta.docs.suggestion
, and begin to enforce its presence as a required property for suggestable rules. Implementation in Fix: Throw error when rule is missingmeta.docs.suggestion
property #14292.meta.fixable
which would both be required propertiesmeta.docs.suggestion
property entirely and do not add a replacement for it.meta.suggestable
for consistency withmeta.fixable
, and enforce its presence for suggestable rules.meta.fixable
My preferred solution is 4 because it yields the most useful and consistent end-result, although this is also the most disruptive change, so I'm interested to hear what others prefer.
Are you willing to submit a pull request to implement this change?
Yes
CC the original RFC/PR author: @ilyavolodin @wdoug
The text was updated successfully, but these errors were encountered: