feat: report malformed rule deprecation metadata#147
Conversation
nzakas
left a comment
There was a problem hiding this comment.
Overall LGTM. Just left a couple of notes for clarification.
|
|
||
| ## Drawbacks | ||
|
|
||
| This is a breaking change for rule packages whose tests currently pass with malformed deprecation metadata. Some projects may also be storing custom, nonstandard fields under `meta.deprecated`; those projects will need to remove those fields or move them elsewhere. |
There was a problem hiding this comment.
Worth noting that we've decided breaking changes to RuleTester are acceptable outside of major version bumps because they affect plugin developers only and not end users. The utility is meant to ensure compatibility with the version of ESLint being used.
There was a problem hiding this comment.
I don't recall us deciding that, can you provide a link (to a TSC meeting where we discussed this?). As far as I'm aware, all breaking changes to RuleTester were always considered breaking changes to ESLint as well and thus required a major version bump.
Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
|
@xbinaryx there's some feedback for you to consider. |
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
nzakas
left a comment
There was a problem hiding this comment.
This looks like it's in good shape to me so moving to Final Commenting.
fasttime
left a comment
There was a problem hiding this comment.
LGTM pending @mdjermanovic's suggestion.
|
The final commenting period has expired, so merging. |
Summary
RuleTestershould validate the shape ofmeta.deprecatedon the rule under test and throw an assertion error when the value does not match the documentedboolean | DeprecatedInfocontract.Related Issues
eslint/eslint#20603